CLI Command Reference
Complete guide to all AgentPress CLI commands for creating, managing, and maintaining your projects.
Installation
Run the latest version with npx (no installation required):
npx @agentpress/cli@latest <command>Commands
create
Create a new AgentPress project from the official template.
npx @agentpress/cli@latest create <project-name> [options]Arguments:
<project-name>- Name for your new project directory
Options:
--template <url>- Use a custom template repository (default: official AgentPress template)--version <tag>- Clone a specific template version/tag--verbose- Enable detailed logging
Interactive Prompts:
-
GitHub Personal Access Token - For cloning the template (requires
reposcope)⚠️ Beta Access: Contact the AgentPress team for repository access before generating your token.
-
npm Access Token - For installing private packages
⚠️ Beta Access: Request an npm token from the AgentPress team.
-
Run setup wizard? - Configure now or later
What it does:
- Validates tokens and clones the template
- Installs dependencies
- Optionally runs setup wizard (database, admin account, API keys, environment)
Examples:
# Create with default template
npx @agentpress/cli@latest create my-app
# Create with custom template
npx @agentpress/cli@latest create my-app --template https://github.com/your-org/custom-template.git
# Create with specific version
npx @agentpress/cli@latest create my-app --version v1.2.3
# Create with verbose logging
npx @agentpress/cli@latest create my-app --verbosesetup
Run the interactive setup wizard to configure an existing AgentPress project.
npx @agentpress/cli@latest setupPrerequisites:
- Must be run from an AgentPress project root directory
- PostgreSQL database accessible
Configuration Steps:
- Database - Connection details (host, port, name, credentials), creates database if needed
- Admin Password - For
admin@agent.press(8+ chars, uppercase, lowercase, number) - API Keys (optional) - OpenAI, Anthropic, Google, xAI, Ultravox
- Environment Files - Generates
.envfiles with all configuration - Migrations - Sets up database schema
What it generates:
my-app/
├── apps/
│ ├── api/
│ │ └── .env # Generated with database and API configs
│ └── console/
│ └── .env # Generated with API endpoint configsync
Synchronize your project with the latest AgentPress template updates.
npx @agentpress/cli@latest sync [options]Options:
--verbose- Show detailed sync information
Prerequisites:
- Must be run from an AgentPress project root directory
What it does:
- Validates project structure
- Compares package versions with template
- Syncs new database migrations
- Updates dependencies in
package.json - Generates sync report
Sync Process:
# 1. Sync your project
npx @agentpress/cli@latest sync
# 2. Install updated dependencies
bun install
# 3. Run new migrations (if any)
cd apps/api && bun run db:migrate
# 4. Restart your development servers
bun devWhat gets synced:
- Package versions in
package.jsonfiles - Database migration files in
apps/api/src/db/migrations - Dependencies and devDependencies
What is NOT synced:
- Your custom code and agents
- Environment variables (
.envfiles) - Database data
- Custom configuration
reset-password
Reset the admin account password.
npx @agentpress/cli@latest reset-passwordPrerequisites:
- Must be run from an AgentPress project root directory
- Database must be configured and accessible
Resets the password for admin@agent.press with the same validation as the setup wizard.
Workflow Examples
Starting a New Project
npx @agentpress/cli@latest create my-app
cd my-app
bun install
bun build
bun dev
# Console: http://localhost:3000
# API: http://localhost:3001Setting Up Later
npx @agentpress/cli@latest create my-app # Decline setup wizard
cd my-app
npx @agentpress/cli@latest setupKeeping Project Updated
npx @agentpress/cli@latest sync --verbose
bun install
cd apps/api && bun run db:migrate
bun devProject Structure Requirements
The CLI validates your project structure by checking for:
Required Files:
package.json- Root monorepo configuration with AgentPress dependenciesapps/api/package.json- Backend application packageapps/console/package.json- Frontend application package
Required Directories:
apps/- Contains application packages (api, console)packages/- Contains shared packages (@repo/*)
AgentPress Markers:
- Dependencies with
@agentpress/*or@repo/*namespaces - Proper workspace configuration
Environment Requirements
- Node.js 18 or higher
- Bun package manager (latest version recommended)
- Git for template cloning and version control
- PostgreSQL 13 or higher (with pgvector support)
Recommended Setup:
# Install Bun (if not installed)
curl -fsSL https://bun.sh/install | bash
# Verify installations
node --version # Should be 18+
bun --version # Latest recommended
psql --version # 13+Troubleshooting
Command Not Found
Use npx @agentpress/cli@latest <command> or install globally with npm install -g @agentpress/cli
Project Not Recognized
Run from project root. Verify apps/ and packages/ directories exist and package.json contains @agentpress/* dependencies.
Sync Failures
Run npx @agentpress/cli@latest sync --verbose. Ensure clean git state with git status.
Database Connection Issues
Check PostgreSQL is running (pg_isready), credentials are correct, and port 5432 isn’t blocked.
# Start PostgreSQL
brew services start postgresql # macOS
sudo systemctl start postgresql # Linux
# Or use Docker
docker run --name agentpress-db -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgresToken Authentication Failures
Verify token permissions (GitHub: repo, npm: Read), hasn’t expired, and no extra spaces when pasting.
Advanced Usage
Custom Templates:
npx @agentpress/cli@latest create my-app --template https://github.com/your-org/template.gitVersion Pinning:
npx @agentpress/cli@latest create my-app --version v1.0.0CI/CD: Decline the setup wizard and configure via environment variables or scripts.
Getting Help
npx @agentpress/cli@latest --help # All commands
npx @agentpress/cli@latest create --help # Specific command
npx @agentpress/cli@latest --version # CLI version