Creating Projects from CLI
Create and configure DevOur projects directly from your terminal using the CLI.
Prerequisites
- DevOur CLI installed and configured (CLI Setup)
- Valid API key configured with
devour setup-key
Create a Project
From a Name
devour create "My Project"
The CLI prints the new project's ID. Without a name, it uses the name from a
configuration file in the current directory, or asks for one.
From a Configuration File
Write a configuration file, then apply it. setup creates the project and
configures it in one step:
devour setup --config devour.json
When the file has no id, setup creates a project named after its name,
applies everything in the file, and writes the new project's id into it. If a
project with that name already exists, setup asks whether to update it
instead.
devour create --config devour.json only takes the project name from the file.
Configuration Files
Configuration files hold your project's settings so you can write them once and reuse them.
JSON Format
Create a devour.json file:
{
"name": "My Project",
"description": "Customer portal for my store",
"stripePublicKey": "pk_test_...",
"stripeSecretKey": "sk_test_...",
"firebaseApiKey": "AIzaSy...",
"firebaseAuthDomain": "my-project.firebaseapp.com",
"firebaseProjectId": "my-project",
"firebaseServiceAccount": "/path/to/service-account.json",
"colorMain": "#3B82F6",
"colorSecondary": "#10B981"
}
YAML Format
YAML format uses fewer characters than JSON, making it ideal for AI coding agents where token efficiency matters.
Create a devour.yml file:
name: My Project
description: Customer portal for my store
stripePublicKey: pk_test_...
stripeSecretKey: sk_test_...
firebaseApiKey: AIzaSy...
firebaseAuthDomain: my-project.firebaseapp.com
firebaseProjectId: my-project
firebaseServiceAccount: /path/to/service-account.json
colorMain: '#3B82F6'
colorSecondary: '#10B981'
Every key you can use is listed under Available Settings in the CLI Reference.
Configure Project Settings
Apply a Configuration File
devour setup --config devour.json
Once the file has an id, setup updates that project: its settings, logo,
Firebase service account, collections, pages, navigation, and locales. It first
prints what it will create, update, and delete, and asks before deleting
anything on the server that the file no longer has. Pass --yes to skip that
question.
setup refuses to run if the project changed on the server since your last
devour sync, so a file that fell behind never deletes something by accident.
Update a Single Setting
Update one setting at a time using key-value pairs:
devour setup --key colorMain --value "#3B82F6"
Or be prompted for the value:
devour setup --key stripePublicKey
Use the Interactive Menu
devour setup <projectId>
With no configuration file in the current directory, or with --ignore-config,
setup opens a menu of the project's settings to update one by one.
Sync Settings
Pull the project from the server into your local configuration file:
devour sync
sync writes the project's settings, collections, forms, pages, and navigation
into the file, its locales into a locales/ folder, and its logo into an
assets/ folder. Forms you added to the file are sent to the server first.
Sync Options
devour sync --overwrite # Use the remote value wherever local and remote differ
devour sync --local # Keep local values, fill in what's missing from remote
devour sync --new # Replace the local settings with the remote ones
devour sync --json # Write the file as JSON
devour sync --yaml # Write the file as YAML
Without --overwrite, --local, or --new, sync asks you to choose the
local or remote value for each setting that differs.
Edit an Existing Project
- Pull the latest state:
devour sync - Edit the configuration file and the files in
locales/ - Apply your edits:
devour setup --config devour.json
If setup says the project changed since your last sync, keep your edits across
a refresh:
devour stash
devour sync
devour stash pop
devour setup --config devour.json
Example Workflow
-
Write a
devour.ymlwith your project's name and integration keys. -
Create and configure the project:
devour setup --config devour.yml
- Sync, so later changes have a base to compare against:
devour sync --overwrite
- Add collections, pages, or translations to the file, then apply them:
devour setup --config devour.yml
- Create a version, build its bundle, and download it:
devour version create
devour version bundle
devour fetch