> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
last_verified: 2026-05-13
title: Commands Reference
category: CLI
description: Complete reference for all AGNT5 CLI commands and their options
hideRightSidebar: true
---


**Top-level commands**: `agnt5 init`, `agnt5 run`, `agnt5 deploy`, `agnt5 logs`, `agnt5 config`, `agnt5 auth`, `agnt5 project`, `agnt5 context`, `agnt5 list`
**Invocation shape**: `agnt5 <command> [args] [options]`
**Help**: `agnt5 --help` for top-level; `agnt5 <command> --help` per subcommand


### `agnt5 init`

Initialize a new AGNT5 project with templates, configuration, and best practices.

```bash
agnt5 init <project-name> [options]
```

**Options:**
- `--template <name>` - Project template (python, typescript, go, minimal)
- `--minimal` - Create a minimal project structure
- `--no-install` - Skip dependency installation
- `--git` - Initialize git repository (default: true)

**Examples:**
```bash
agnt5 init my-project
agnt5 init my-ai-agent --template python
agnt5 init simple-workflow --minimal
agnt5 init my-project --no-install --no-git
```

### `agnt5 run`

Execute workflows locally or remotely with comprehensive logging and error handling.

```bash
agnt5 run <workflow> [options]
```

**Options:**
- `--input <file>` - Input data file (JSON)
- `--env <environment>` - Target environment (local, dev, staging, prod)
- `--remote` - Execute on remote AGNT5 runtime
- `--watch` - Watch for file changes and re-run
- `--debug` - Enable debug output

**Examples:**
```bash
agnt5 run my-workflow
agnt5 run data-processor --input data.json
agnt5 run my-workflow --remote --env staging
agnt5 run my-workflow --watch --debug
```

## Deployment Commands

### `agnt5 deploy`

Deploy your workflows to production with zero-downtime deployments and automatic scaling.

```bash
agnt5 deploy [options]
```

**Options:**
- `--env <environment>` - Target environment (staging, production)
- `--watch` - Watch deployment status
- `--no-build` - Skip build step
- `--force` - Force deployment even with warnings
- `--rollback` - Rollback to previous deployment

**Examples:**
```bash
agnt5 deploy
agnt5 deploy --env staging
agnt5 deploy --watch --env production
agnt5 deploy --rollback
```

### `agnt5 build`

Build your project for deployment.

```bash
agnt5 build [options]
```

**Options:**
- `--env <environment>` - Build for specific environment
- `--output <directory>` - Output directory (default: dist)
- `--minify` - Minify output files
- `--sourcemap` - Generate source maps

**Examples:**
```bash
agnt5 build
agnt5 build --env production --minify
agnt5 build --output ./build --sourcemap
```

## Monitoring Commands

### `agnt5 logs`

Stream real-time logs from your workflows with filtering, search, and export capabilities.

```bash
agnt5 logs [options]
```

**Options:**
- `--follow, -f` - Follow log output in real-time
- `--filter <level>` - Filter by log level (error, warn, info, debug)
- `--grep <pattern>` - Filter logs by pattern
- `--tail <number>` - Show last N lines (default: 100)
- `--env <environment>` - Target environment
- `--export <file>` - Export logs to file

**Examples:**
```bash
agnt5 logs
agnt5 logs --follow --filter error
agnt5 logs --grep "workflow-123" --tail 50
agnt5 logs --env production --export logs.json
```

### `agnt5 status`

Check the status of your workflows, deployments, and system health across environments.

```bash
agnt5 status [options]
```

**Options:**
- `--env <environment>` - Target environment
- `--watch, -w` - Watch status in real-time
- `--json` - Output in JSON format
- `--verbose` - Show detailed status information

**Examples:**
```bash
agnt5 status
agnt5 status --env production --watch
agnt5 status --json --verbose
```

## Configuration Commands

### `agnt5 config`

Manage CLI configuration and settings.

```bash
agnt5 config <command> [options]
```

**Subcommands:**
- `get <key>` - Get configuration value
- `set <key> <value>` - Set configuration value
- `list` - List all configuration values
- `reset` - Reset configuration to defaults

**Options:**
- `--global` - Modify global configuration
- `--env <environment>` - Environment-specific config

**Examples:**
```bash
agnt5 config get api-key
agnt5 config set api-key your-api-key
agnt5 config set timeout 30000 --env production
agnt5 config list --global
agnt5 config reset
```

### `agnt5 auth`

Manage authentication with AGNT5 services.

```bash
agnt5 auth <command>
```

**Subcommands:**
- `login` - Authenticate with AGNT5
- `logout` - Remove authentication
- `whoami` - Show current user
- `token` - Manage API tokens

**Examples:**
```bash
agnt5 auth login
agnt5 auth whoami
agnt5 auth logout
```

## Environment Commands

### `agnt5 env`

Manage deployment environments and their configuration.

```bash
agnt5 env <command> [options]
```

**Subcommands:**
- `list` - List all environments
- `create <name>` - Create new environment
- `delete <name>` - Delete environment
- `set <key> <value>` - Set environment variable
- `unset <key>` - Remove environment variable

**Examples:**
```bash
agnt5 env list
agnt5 env create staging
agnt5 env set DATABASE_URL postgres://... --env staging
agnt5 env unset DEBUG --env production
agnt5 env delete old-staging
```

## Utility Commands

### `agnt5 validate`

Validate project configuration and workflow definitions.

```bash
agnt5 validate [file] [options]
```

**Options:**
- `--schema` - Validate against specific schema
- `--fix` - Attempt to fix validation errors
- `--strict` - Use strict validation rules

**Examples:**
```bash
agnt5 validate
agnt5 validate workflow.yaml
agnt5 validate --strict --fix
```

### `agnt5 doctor`

Diagnose common issues with your AGNT5 setup.

```bash
agnt5 doctor [options]
```

**Options:**
- `--verbose` - Show detailed diagnostic information
- `--fix` - Attempt to fix detected issues

**Examples:**
```bash
agnt5 doctor
agnt5 doctor --verbose --fix
```

## Global Options

These options are available for all commands:

- `--help, -h` - Show help information
- `--version, -v` - Show CLI version
- `--verbose` - Enable verbose output
- `--quiet, -q` - Suppress non-error output
- `--config <file>` - Use specific config file
