CLI Setup

Install and configure the DevOur CLI to manage your projects from the command line.

Prerequisites

Installation

Install the DevOur CLI globally using npm:

npm install -g @devourapp/cli

Or using yarn:

yarn global add @devourapp/cli

Verify the installation:

devour --help

Get Your API Key

The CLI uses API keys for authentication. Generate one from your DevOur dashboard:

  1. Log in to your DevOur account
  2. Click your profile icon in the top navigation
  3. Select API Keys
  4. Enter a Friendly name for your key, such as "My Laptop"
  5. Click Create an API key
  6. Copy the generated key

Keep your API key secure. Never share it or commit it to version control.

Configure the CLI

Run the setup command and paste your API key when prompted:

devour setup-key

The CLI checks that the key is 64 characters long and stores it in your system's user configuration directory. Every command uses this saved key. If no key is saved, the command asks for one before it runs.

Verify Setup

List your projects to confirm everything works:

devour ls

You should see your DevOur projects, oldest first, as ID - name.

Basic Commands

List Projects

devour ls

Download a Project

devour fetch <projectId>

Replace <projectId> with the ID shown in the project list. The project will be extracted to your current directory.

Create a New Project

devour create

Follow the prompt or provide a project name directly:

devour create "My New Project"

Remove API Key

devour logout

Get Help

devour --help
devour <command> --help

Running the CLI from an Agent or a Pipeline

When an AI agent or a CI pipeline drives the CLI, nobody is there to answer a prompt:

  1. Run devour setup-key once on that machine. It reads the key from a prompt.
  2. Set DEVOUR_NON_INTERACTIVE=1. Commands that are missing a project then fail with an error instead of opening a project picker, and devour setup skips deletions unless you pass --yes. CI has the same effect.
  3. Pass the project ID to each command, or keep the project's id in your config file.

Some commands still ask for confirmation. The CLI Reference lists them.

After Downloading a Project

Once you download a project, start it from its directory with Docker Compose:

cd your-project-name
docker compose up -d --force-recreate --build

See Downloading and Running Your Project for details.

Troubleshooting

"Invalid API key format": The key you pasted isn't 64 characters long. Copy the whole key from the dashboard and run devour setup-key again.

"Authentication failed": The saved key is wrong or was deleted from the dashboard. Create a new key and run devour setup-key again.

"Cannot find module" errors: Ensure Node.js 20+ is installed and the CLI was installed globally.

"Project not found": Check that the project ID exists in your account with devour ls.

Permission errors during download: Ensure you have write permissions in the target directory.

Next Steps