Commands
Full CLI reference for arqen.
Global flags
| Flag | Description |
|---|---|
--version | Print version and exit |
--verbose | Enable verbose output |
--quiet | Suppress non-error output |
--color <when> | Color output: auto, always, never |
--json | Output as JSON (where applicable) |
--file <path> | Config file path for dev, start, or up |
--color auto is the default; use --color never in CI. Startup banners are suppressed automatically for --quiet and --json.
Available commands
arqen new <NAME>
Generate a new Arqen application with the module-based starter structure.
arqen new hello-api
cd hello-api
cargo runOptions: none beyond the project name. No --template flag is available. Generated files are intentionally conservative; review and register each generated module, tool, or job in the application.
The CLI refuses to overwrite an existing directory.
arqen generate module <NAME>
Generate a module skeleton under src/<name>/mod.rs.
arqen generate module usersCreates src/users/mod.rs with a Module implementation stub. The CLI prints instructions for registering the module in your application.
arqen generate tool <NAME>
Generate a typed tool skeleton under src/tools/<name>.rs.
arqen generate tool get_userCreates a ToolMetadata function and a register function. Call the register function from your module's register() method.
arqen generate job <NAME>
Generate a job handler skeleton under src/jobs/<name>.rs.
arqen generate job send_emailCreates a JobHandler implementation stub.
Generators refuse to overwrite an existing file or module directory.
arqen dev
Run the application in development mode with pretty logging.
arqen dev
arqen dev --port 9000
arqen dev --storage memory --log debugOptions:
| Flag | Default | Description |
|---|---|---|
--host | 127.0.0.1 | Bind address |
-p, --port | 8888 | Port |
-l, --log | info | Log level |
-s, --storage | memory | Storage mode |
--log-format | config | pretty, compact, or json |
--file | arqen.toml | Config file |
arqen dev does not include an integrated file watcher. Use an external cargo-watch process if you need automatic restarts.
arqen start
Run the application without pretty logging (production mode).
arqen start
arqen start --port 3000 --log warnarqen run and arqen serve are aliases for arqen start. Options are the same as arqen dev. Uses JSON logging by default. Before binding, start calls AppConfig::validate_production() and fails closed for memory storage, missing durable paths/endpoints/credentials, disabled auth, pretty logs, and invalid worker settings. Use arqen dev for permissive local work.
arqen up [SERVICE...]
Start and supervise long-running dev services defined in arqen.toml.
arqen up # start all services
arqen up backend frontend # start specific services
arqen up --dry-run # preview what would start
arqen up --file mydev.toml # use custom configOptions:
| Flag | Default | Description |
|---|---|---|
--file | arqen.toml | Config file |
Arqen is framework-agnostic here. A service is just a process definition; Arqen does not try to identify whether the process is Expo, Vite, Next.js, Angular, Astro, Cargo, Docker, or another tool. This keeps up predictable when a project changes frontend frameworks. Update only the command in arqen.toml:
[[dev.services]]
name = "frontend"
command = "pnpm"
args = ["dev"]
cwd = "frontend"The name is a stable console label; command, args, cwd, and env are the source of truth for how the service starts. | --dry-run | false | Print plan without running |
Example arqen.toml service definitions:
[[dev.services]]
name = "thingd"
command = "docker"
args = ["compose", "up"]
[[dev.services]]
name = "backend"
command = "cargo"
args = ["run"]
cwd = "backend"Each service has a name, command, and optional args, cwd, and env. If any service exits, the rest are shut down and the command exits non-zero when the exiting service failed.
arqen check
Run validation checks.
arqen checkcheck validates the discovered arqen.toml (or the path in ARQEN_CONFIG_FILE) and reports missing Rust/Cargo dependencies. It does not start the application or validate connectivity to every runtime dependency.
arqen lint
Run lint checks: formatting and clippy warnings.
arqen lintChecks:
cargo fmt --all -- --check— formattingcargo clippy --all-targets --all-features -- -D warnings— clippy
Exit: 0 pass, 4 cargo missing, 5 a check failed.
arqen format
Auto-fix formatting.
arqen formatRuns cargo fmt --all. Exit: 0 success, 4 cargo missing.
arqen test
Run all tests.
arqen test
arqen test --releaseOptions:
| Flag | Description |
|---|---|
--release | Build and run in release mode |
Exit: 0 pass, 4 cargo missing, 5 tests failed.
arqen build
Build the project.
arqen build
arqen build --releaseOptions:
| Flag | Description |
|---|---|
--release | Build in release mode |
Exit: 0 success, 4 cargo missing, 5 build failed.
arqen doc
Generate documentation.
arqen docRuns cargo doc --no-deps. Exit: 0 success, 4 cargo missing, 5 doc failed.
arqen doctor
Diagnose Rust, Docker, thingd, and environment setup.
arqen doctorChecks:
- Rust and Cargo installation
- Docker and Docker Compose
- thingd connectivity (if
ARQEN_THINGD_URLis set) - Environment variables
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (bad arguments) |
| 3 | Configuration error |
| 4 | Dependency not found |
| 5 | Runtime error |
| 130 | Interrupted (Ctrl+C) |
Config discovery
The CLI discovers configuration in this order:
--fileflag (default:arqen.tomlin current directory)ARQEN_*environment variables- Compiled defaults
JSON output
Commands that support --json emit structured JSON to stdout. Errors are also emitted as JSON:
{
"ok": false,
"error": {
"kind": "config",
"message": "port must be non-zero"
}
}Running from source
From a repository checkout:
cargo run -p arqen --features cli --bin arqen -- --helpInstall from source:
cargo install --path crates/arqen --features cliThe CLI is a thin process manager, project generator, and dev toolchain. Commands such as routes and agent are not part of the current CLI surface.
Useful project commands
Use these commands when working directly in the repository or a generated application:
# Inspect the complete CLI surface
arqen --help
arqen dev --help
arqen generate --help
arqen thingd --help
# Validate configuration and local prerequisites
arqen check
arqen doctor
arqen --json check
# Run the complete quality gate
cargo fmt --all -- --check
cargo check --workspace --all-features
cargo test --workspace --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Generate and inspect API documentation
arqen doc
cargo doc --workspace --all-features --no-deps
# Run Criterion benchmarks when present
cargo bench --bench framework
# Probe a running application
curl -i http://127.0.0.1:8888/health
curl -i http://127.0.0.1:8888/ready
curl -s http://127.0.0.1:8888/agent/manifest | jq .
# Confirm the public framework identity
curl -sI http://127.0.0.1:8888/health | grep -Ei '^(server|x-powered-by):'For a durable local instance, create the directory before starting:
mkdir -p .arqen/data
ARQEN_STORAGE_MODE=native \
ARQEN_PERSISTENT_PATH="$PWD/.arqen/data" \
arqen devFor Thingd 0.79.0 schema inspection:
# Loads the local file and computes its stable hash. Add --url for Thingd's
# authoritative parser and compatibility validation.
arqen thingd schema-validate schema.thingd --url http://127.0.0.1:8770
# Inspect the remote current schema and migration history.
arqen thingd schema-remote http://127.0.0.1:8770These commands never apply migrations. Keep credentials in environment or a secret manager rather than shell history where possible; Arqen redacts them from errors and diagnostics.