agentcmd
Reference

CLI Reference

Complete command-line reference for the agentcmd CLI tool.

Installation

# Run without installing
npx agentcmd [command]

# Install globally
npm install -g agentcmd
agentcmd [command]

Global Options

Available on all commands:

OptionDescription
-V, --versionOutput the version number
-h, --helpDisplay help for command

Commands

agentcmd install

Initialize database and configuration for agentcmd.

Usage:

agentcmd install [options]

Options:

OptionDescriptionDefault
--forceOverwrite existing databasefalse

Examples:

# First-time installation
agentcmd install

# Reinstall and reset database
agentcmd install --force

What it does:

  1. Creates SQLite database at ~/.agentcmd/agentcmd.db
  2. Runs Prisma migrations
  3. Initializes configuration file at ~/.agentcmd/config.json
  4. Sets up default workflow templates

Warning: --force flag will delete your existing database and all data. Use with caution.


agentcmd start

Start the agentcmd server (frontend, backend, and Inngest dev server).

Usage:

agentcmd start [options]

Options:

OptionDescriptionDefault
-p, --port <number>Backend API server port4100
--inngest-port <number>Inngest dev UI port8288
--host <address>Server host address127.0.0.1

Examples:

# Start with default ports
agentcmd start

# Custom backend port
agentcmd start --port 4000

# Custom Inngest port
agentcmd start --inngest-port 9000

# Bind to all interfaces
agentcmd start --host 0.0.0.0

Services Started:

ServiceDefault PortAccess
AgentCmd UI & API4100http://localhost:4100
Inngest Dev UI8288http://localhost:8288

Environment Variables: The start command respects these environment variables:

  • PORT - Backend port (overridden by --port)
  • HOST - Server host (overridden by --host)
  • INNGEST_DEV_PORT - Inngest port (overridden by --inngest-port)
  • DATABASE_URL - Custom database location
  • LOG_LEVEL - Logging verbosity (debug, info, warn, error)

Keep the terminal open to see live logs from workflows. Open a new tab for other commands.


agentcmd config

Manage agentcmd configuration.

Usage:

agentcmd config [options]

Options:

OptionDescription
--showDisplay current configuration
--editOpen config file in $EDITOR
--get <key>Get value of specific key
--set <key=value>Set value of specific key
--pathPrint config file path

Examples:

# Display all configuration
agentcmd config --show

# Output:
```text title="Config Display"
{
  "database": {
    "url": "file:/Users/you/.agentcmd/agentcmd.db"
  },
  "server": {
    "port": 4100,
    "host": "127.0.0.1"
  },
  "inngest": {
    "devPort": 8288
  }
}
# Get specific value
agentcmd config --get server.port

# Output:
```text title="Config Value Output"
4100
# Set server port
agentcmd config --set server.port=4000

# Set multiple values
agentcmd config --set server.port=4000
agentcmd config --set server.host=0.0.0.0
# Open in default editor
agentcmd config --edit

# Set custom editor first
export EDITOR=vim
agentcmd config --edit

Config File Location:

# Print config path
agentcmd config --path

# Typical locations:
# macOS/Linux: ~/.agentcmd/config.json
# Windows: %USERPROFILE%\.agentcmd\config.json

Configuration File

Default Configuration

The default config file at ~/.agentcmd/config.json:

~/.agentcmd/config.json
{
  "database": {
    "url": "file:~/.agentcmd/agentcmd.db"
  },
  "server": {
    "port": 4100,
    "host": "127.0.0.1"
  },
  "inngest": {
    "devPort": 8288,
    "signingKey": "",
    "eventKey": ""
  },
  "ai": {
    "defaultProvider": "claude",
    "providers": {
      "claude": {
        "apiKey": ""
      },
      "openai": {
        "apiKey": ""
      },
      "gemini": {
        "apiKey": ""
      }
    }
  },
  "workflows": {
    "templatesPath": "~/.agentcmd/workflows",
    "maxConcurrent": 5
  }
}

Configuration Schema

Database Configuration (database):

KeyTypeDescriptionDefault
urlstringSQLite database file pathfile:~/.agentcmd/agentcmd.db

Server Configuration (server):

KeyTypeDescriptionDefault
portnumberBackend API port4100
hoststringServer bind address127.0.0.1

Inngest Configuration (inngest):

KeyTypeDescriptionDefault
devPortnumberInngest dev UI port8288
signingKeystringInngest signing key (optional)""
eventKeystringInngest event key (optional)""

AI Provider Configuration (ai):

KeyTypeDescriptionDefault
defaultProviderstringDefault AI provider"claude"
providers.claude.apiKeystringAnthropic API key""
providers.openai.apiKeystringOpenAI API key""
providers.gemini.apiKeystringGoogle Gemini API key""

Workflow Configuration (workflows):

KeyTypeDescriptionDefault
templatesPathstringCustom workflow templates directory~/.agentcmd/workflows
maxConcurrentnumberMax concurrent workflow executions5

Environment Variables

Development

VariableDescriptionDefault
NODE_ENVEnvironment modedevelopment
LOG_LEVELLogging verbosityinfo
PORTBackend server port4100
HOSTServer host address127.0.0.1
DATABASE_URLDatabase connection stringfile:~/.agentcmd/agentcmd.db

Inngest

VariableDescriptionRequired
INNGEST_DEV_PORTInngest dev UI portNo
INNGEST_SIGNING_KEYInngest signing key (prod)Production only
INNGEST_EVENT_KEYInngest event key (prod)Production only

AI Providers

VariableDescriptionRequired
ANTHROPIC_API_KEYClaude API keyFor Claude agents
OPENAI_API_KEYOpenAI API keyFor GPT/Codex agents
GOOGLE_AI_API_KEYGemini API keyFor Gemini agents

API keys can be set via environment variables or in the config file. Environment variables take precedence.

Exit Codes

CodeMeaning
0Success
1General error
2Invalid arguments
3Database error
4Port already in use
5Missing dependencies