Skip to content

CLI Reference

Overview

The aes CLI is the command-line interface for Autonomous Engineer. It drives the full spec-driven workflow — from requirements through implementation — automatically from the terminal.

The CLI is implemented in TypeScript and runs on Bun.


Installation

From the orchestrator-ts/ directory:

sh
cd orchestrator-ts
bun install

To run the CLI during development:

sh
bun run aes <command>

To install globally via Bun link:

sh
cd orchestrator-ts
bun link
aes <command>

Commands

aes run <spec-name>

Run the full spec-driven workflow for the named spec.

sh
aes run <spec-name> [options]

Arguments:

ArgumentRequiredDescription
spec-nameYesName of the spec to run (must match a directory under specDir)

Options:

OptionTypeDefaultDescription
--provider <name>stringfrom configOverride the LLM provider for this run
--dry-runbooleanfalseValidate spec and config without executing the workflow
--resumebooleanfalseResume from the last persisted workflow state
--log-json <path>stringWrite all workflow events as NDJSON to this file path

Examples:

sh
# Run the full workflow for spec "tool-system"
aes run tool-system

# Dry-run to validate config without executing
aes run tool-system --dry-run

# Resume a previously interrupted run
aes run tool-system --resume

# Override the provider and capture structured logs
aes run tool-system --provider claude --log-json ./logs/tool-system.ndjson

aes configure

Interactively configure aes for the current project.

sh
aes configure

Launches an interactive wizard that prompts for each configuration field and writes the result to aes.config.json in the current working directory. Requires an interactive terminal (TTY).

Wizard prompts:

PromptTypeDefaultDescription
LLM providerselectclaudeLLM provider to use
Model nametextclaude-opus-4-6Model identifier
SDD frameworkselectcc-sddSDD framework adapter (cc-sdd, openspec, speckit)
Spec directorytext.kiro/specsDirectory containing spec subdirectories

Notes:

  • If aes.config.json already exists, existing values are pre-populated as defaults.
  • The API key is never written to aes.config.json. Set it via AES_LLM_API_KEY instead.
  • The wizard verifies that the selected SDD framework is installed in the project before saving. If it is not found, the command exits with an error and a setup hint.
  • Pressing Ctrl+C at any prompt cancels the wizard without saving changes.

Examples:

sh
# First-time setup
aes configure

# Reconfigure an existing project (pre-populates current values)
aes configure

Workflow Phases

When aes run <spec> is executed, the following phases run automatically in sequence:

SPEC_INIT

REQUIREMENTS

DESIGN

VALIDATE_DESIGN

TASK_GENERATION

IMPLEMENTATION

PULL_REQUEST

Each phase produces structured artifacts stored under .kiro/specs/<spec-name>/.

Approval Gates

The workflow pauses for human review at three points:

After phaseArtifact to reviewAction
REQUIREMENTSrequirements.mdConfirm scope and requirements
DESIGNdesign.mdConfirm architecture
TASK_GENERATIONtasks.mdConfirm implementation plan

At each gate, the CLI displays the artifact path and waits for confirmation before proceeding.

To skip gates in trusted environments, configure autoApprove: true (not recommended for production use).


Configuration

Configuration File

Place aes.config.json at the project root (where you run aes):

json
{
  "llm": {
    "provider": "claude",
    "modelName": "claude-opus-4-6",
    "apiKey": "sk-ant-..."
  },
  "specDir": ".kiro/specs",
  "sddFramework": "cc-sdd"
}

Fields:

FieldRequiredDefaultDescription
llm.providerYesLLM provider (claude supported)
llm.modelNameYesModel identifier (e.g., claude-opus-4-6)
llm.apiKeyYesAPI key for the LLM provider
specDirNo.kiro/specsDirectory containing spec subdirectories
sddFrameworkNocc-sddSDD framework adapter (cc-sdd, openspec, speckit)

Environment Variables

All configuration fields can be set via environment variables, which take priority over the config file:

VariableDescription
AES_LLM_PROVIDERLLM provider name
AES_LLM_MODEL_NAMEModel identifier
AES_LLM_API_KEYAPI key
AES_SPEC_DIRSpec directory path
AES_SDD_FRAMEWORKSDD framework adapter

Git integration (optional, all have defaults):

VariableDefaultDescription
AES_GIT_BASE_BRANCHmainBase branch for feature branches
AES_GIT_REMOTEoriginGit remote name
AES_GIT_MAX_FILES_PER_COMMIT50Safety limit on files per commit
AES_GIT_PROTECTED_BRANCHESmain,master,production,release/*Comma-separated list of protected branches
AES_GIT_IS_DRAFTfalseCreate PRs as drafts
AES_GITHUB_TOKENGitHub token for PR creation

Configuration Priority

Configuration is resolved in this order (highest priority first):

CLI flags  →  Environment variables  →  aes.config.json  →  Defaults

State and Artifacts

PathDescription
.kiro/specs/<name>/Spec artifacts (requirements.md, design.md, tasks.md)
.aes/state/<name>.jsonPersisted workflow state (enables --resume)
.aes/logs/Implementation loop NDJSON logs
.memory/Agent memory (rules, patterns, failure records)

Crash Recovery

If a run is interrupted (process killed, network failure, etc.), resume with:

sh
aes run <spec-name> --resume

The workflow restarts from the last completed phase boundary.


Exit Codes

CodeMeaning
0Workflow completed successfully
1Workflow failed, configuration error, or spec not found

Autonomous Engineer Documentation