Skip to main content
Version: 0.10

Create an app

Learn how to build an app.

Before you begin, make sure you've set up your environment.

  1. Confirm that you are running the latest version of the devvit CLI. Run:

npm install -g devvit

  1. 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>
TemplateDescription
app-settingsScaffolding for setting and retrieving app settings.
custom-postA custom post template with menu action for instantiating.
emptyThe default, boilerplate project template.
formsDemonstrates how to use forms to solicit user information.
image-uploadsDemonstrates how to upload and use images in apps.
menu-actionIllustrates the different places and configurations you can use on your custom Menu actions.
redisDemonstrates how to read and persist data in redis between renders.
triggersDemonstrates how to respond to a trigger.

View your app

To see your app in action:

  1. Navigate to reddit.com.
  2. Go to the subreddit where you installed your app.
  3. Make sure there is at least one post.
  4. 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.