Create an app
Learn how to build an app.
Before you begin, make sure you've set up your environment.
- Confirm that you are running the latest version of the
devvitCLI. Run:
npm install -g devvit
- Create your app from scratch or use an app template to start with complete, functioning code examples.
- To create a new app, navigate to your selected app folder and run the create command.
$ devvit new <app-name>
note
Project names must be six or more characters, all lowercase, can't start with numerals and include only a-z, 0-9 or '-'. We recommend "kebob-case" names.
Templates
To create an app based on a template, use the --template flag to create a new project. The following example creates an app based on the Remind Me template.
devvit new --template remind-me <app-name>
| Template | Description |
|---|---|
| app-settings | Scaffolding for setting and retrieving app settings. |
| custom-post | A custom post template with menu action for instantiating. |
| empty | The default, boilerplate project template. |
| forms | Demonstrates how to use forms to solicit user information. |
| image-uploads | Demonstrates how to upload and use images in apps. |
| menu-action | Illustrates the different places and configurations you can use on your custom Menu actions. |
| redis | Demonstrates how to read and persist data in redis between renders. |
| triggers | Demonstrates how to respond to a trigger. |
View your app
To see your app in action:
- Navigate to reddit.com.
- Go to the subreddit where you installed your app.
- Make sure there is at least one post.
- Click the three dots on the bottom of the post. You'll see several robot icons with your app's associated actions at the bottom of the menu.