CLI commands
Every amicu command, flag, and exit code.
amicu [--output human|json] <command>--output is global. The default is human. Run amicu <command> --help for the authoritative flag list of your build.
Commands operate on the project in the current directory. catalog, skill and amicu modal do not need a project. amicu runpod reads the project's state.
Project commands
| Command | Description |
|---|---|
amicu init [--example [mac|linux-cuda|linux-cpu|modal]] | Scaffold amicu.hcl, variables.amicu.hcl, and .amicu/. Idempotent; never overwrites. Plain init writes amicu.hcl with only a comment header. --example writes a working starter instead, see Init examples. |
amicu fmt [--check] | Rewrite *.hcl in canonical form. With --check, write nothing and exit 1 if any file would change. |
amicu validate [--fix] | Structural, reference, capacity, and policy checks. --fix applies safe repairs (re-formatting only). |
amicu plan | Compute the actions the next apply would take, diffed against state. |
amicu apply [--auto-approve] [--lock-timeout <secs>] | Execute the plan. Prompts for approval unless --auto-approve (alias --yes); with no terminal on stdin it fails with an error naming --auto-approve instead of waiting. --lock-timeout waits for the state lock instead of failing at once. |
amicu destroy [--target <name>]... [--auto-approve] [--lock-timeout <secs>] [--forget-unconfirmed] [--purge] | Stop and remove the deployments recorded in state: all of them, or only the named --targets (unknown names are an error). Prompts Destroy these deployments? [y/N] unless --auto-approve (alias --yes). --purge also deletes the host log files recorded for the destroyed deployments. A plain destroy leaves the logs in place but keeps them recorded in state, so a later amicu destroy --purge (even with nothing left to destroy) removes them and clears the record. Like apply, destroy fails without a terminal unless --auto-approve is passed. Modal cache volumes are never deleted. --forget-unconfirmed requires --target and applies only to a Modal deployment whose app cannot be found by name and has no recorded app id; it removes the record from state without stopping anything, like terraform state rm. It works only when the record's recorded workspace is known and matches the active Modal workspace. Otherwise it is refused: for a record with no workspace, the error points to amicu modal stop <app>; for a workspace mismatch, the error asks you to switch Modal tokens. Use it only after checking the Modal dashboard. |
amicu doctor | Environment and project diagnostics. With a local hardware profile it also compares the profile with this machine (AMICU-MEM-003). |
amicu orphans | List amicu Modal apps, RunPod endpoints and secrets, launchd jobs, and systemd units that this project's state does not track, with the manual stop command for each. Read-only. Never stops anything. See Orphaned resources. |
destroy works like terraform destroy. To remove a deployment without tearing it down first, delete its resource from the configuration and run amicu apply. See Plan, apply and state.
Init examples
Plain amicu init writes an amicu.hcl with only a comment header (no resources); it validates and plans to nothing. amicu init --example <target> writes a starter instead. A bare --example detects the target: macOS gets mac, Linux with nvidia-smi gets linux-cuda, and any other Linux gets linux-cpu. Windows is detected the same way as Linux: nvidia-smi on PATH gets linux-cuda, otherwise linux-cpu. These are plain llama.cpp starters, so they need llama-server.exe on PATH there; vLLM is Linux-only.
| Target | Runtime | Hardware profile |
|---|---|---|
mac | llama.cpp, all layers on the GPU (Metal) | local_apple with the detected chip and unified memory. On an Intel Mac there is no GPU to offload to, so it writes a local_cpu profile with n_gpu_layers = 0 |
linux-cuda | llama.cpp, n_gpu_layers = -1 | on_prem with the detected GPU model and VRAM |
linux-cpu | llama.cpp, n_gpu_layers = 0 | local_cpu with the detected CPU and memory |
modal | vLLM on one Modal L4 | The Modal example; needs the Modal tokens and CHAT_API_KEY |
The starter is written only if amicu.hcl is absent or still the untouched header from plain init. The same starters are in the repository under examples/, generated for a stated reference machine; a test keeps them equal to the init output. The local examples pick the largest Qwen3.5 GGUF (from unsloth; Qwen publishes none) that fits the detected memory. For a GPU host that is the VRAM, otherwise the machine's memory, and a tier is chosen when memory reaches its threshold within 5%. linux-cpu starts at 4B.
| Memory | Model | Quantization | File size |
|---|---|---|---|
| 32 GiB or more | Qwen3.5 27B | Q4_K_M | 16.74 GB |
| 16 GiB | Qwen3.5 9B | Q4_K_M | 5.68 GB |
| 8 GiB | Qwen3.5 4B | Q4_K_M | 2.74 GB |
| 6 GiB | Qwen3.5 2B | Q8_0 | 2.01 GB |
| less | Qwen3.5 0.8B | Q8_0 | 0.81 GB |
The starter asks for Qwen3.5's native 262144-token context and halves it until the fit check (weights, KV cache at f16 and runtime overhead) passes on the detected memory; a 32 GiB host gets 131072 on 27B. The model declares its attention shape (n_layers, n_kv_layers, n_kv_heads, head_dim), so the estimate counts only Qwen3.5's full-attention layers. Output is capped at 65536 tokens with extra_args = ["--n-predict", "65536"]. A local example must match the machine it runs on. The starter is a starting point: change the model, then run amicu validate and amicu plan.
Catalog commands
Read-only and offline. They read data built into amicu and need no project, network or credentials.
| Command | Description |
|---|---|
amicu catalog hardware | Known consumer GPUs and Apple Silicon chips, with the memory sizes they ship in. |
amicu catalog presets | The wizard presets: id, name and summary. |
amicu catalog fits | Which starter models and presets fit this machine's memory, from the same weight-fit estimate as validate. Weights only, after a 2 GiB reserve. A preset is judged with this machine as its hardware. |
All three accept --output json. fits emits { "version": "v1", "host": {...}, "starter_models": [...], "presets": [...] }; host has pool_bytes (the memory pool the fit engine evaluates, GPU VRAM summed over cards when a GPU was detected) and available_bytes (what weights may use after the reserve and any multi-GPU haircut); each entry has a verdict of fits, too_big or unknown.
Output lines
plan, apply and destroy can print these lines in human output. In JSON output, reason and changes appear on update actions and are omitted when empty.
| Line | Meaning |
|---|---|
reason: <list> changed since it was last started | Shown under an update. The list names what changed: secret references (a pinned version in an api_key reference), container image (the Modal image variable or the amicu default image), or binary path (llama-server or vllm resolves to another path on PATH). |
reason: launch settings changed, so the service restarts or reason: configuration changed | Shown under an update when the config changed. Followed by one line per changed field, launch fields first: ~ key: "old" -> "new", + key: "new" (added) or - key: "old" (removed), with at most six shown and and N more after. Values that may hold secrets or free-form text (env values, extra_args, api_key, chat_template, credential-like keys) print as (changed), (set) or (unset) with no value. A leading home directory prints as ~, and values over 80 characters are cut with an ellipsis. In JSON each entry of changes is {key, op, old, new, restart, redacted}; old and new are null when redacted. |
launch: <command> | The command that will start the service. Values that may hold secrets print as (redacted): the value after a flag such as --api-key, --hf-token, --header or --cookie (also as --flag=value), and any argument containing :// (such as a model URL with a token in its path). The same rule applies to extra_args and the other runtime settings in JSON. |
- destroy old (<backend> <identity>) for <address> | A provider or identity change. The old instance is stopped and confirmed before the new one starts. If that stop fails, apply stops there and starts nothing new. See Plan, apply and state. |
drift: deployment <id>: ... | A recorded host service or Modal app is gone. The deployment is kept in state as pending. See State and backends. |
warning: could not check host services (...) or warning: could not check Modal for live apps (...) | The check failed. The command uses local state as it is. The failed check does not change state. |
A binary that is not on PATH, and state written before change detection, are never treated as a change. The first apply records a baseline silently, even when it prints No changes to apply.
Skill commands
| Command | Description |
|---|---|
amicu skill export [--target <target>] [--path <dir>] | Write agent skills. Targets: claude-code, cursor, windsurf, generic. --target is optional: without it, every target is exported to its default directory and each path written is printed. --path overrides the default directory and needs --target. The generic target defaults to ./agent-guidance/. |
See Agent skills.
Provider commands
Modal and RunPod have provider commands. Other providers will add theirs when they are wired into apply.
The modal commands read MODAL_TOKEN_ID and MODAL_TOKEN_SECRET from the environment, never from flags. <app> is the Modal app name recorded in state, of the form amicu-<project>-<deployment>-<digest>; older apps are amicu- plus the deployment id.
| Command | Description |
|---|---|
amicu modal auth-check | Verify the control-plane token. Prints authenticated. |
amicu modal status <app> | App state and per-function live stats and URL. |
amicu modal logs <app> [--follow] [--since <entry-id>] | Print logs. --follow keeps tailing. --since resumes after a log entry id. |
amicu modal metrics <app> [--watch] [--interval <secs>] | Runtime and hardware metrics. --interval defaults to 5 and must be at least 1. Needs MODAL_PROXY_TOKEN_ID and MODAL_PROXY_TOKEN_SECRET. |
amicu modal stop <app> | Stop the app. Inside a project, also removes the deployment from local state. |
The runpod commands act on a deployment recorded in the project's state, by deployment name, for both Serverless endpoints and pods. They read RUNPOD_API_KEY from the environment, never from flags. The deployment must have been applied, so its RunPod id is in state.
| Command | Description |
|---|---|
amicu runpod status <deployment> | The endpoint id, URL, workers (running, idle, initializing, throttled), GPU and data centers. For a pod: its id, status, GPU, cloud, data center, cost per hour and proxy URL. |
amicu runpod logs <deployment> [--tail <n>] | Print each running worker's recent log lines, prefixed with the worker id (a pod: its own lines, prefixed with the pod id). A bounded read with no follow. A scaled-to-zero endpoint has no workers and so no logs. --tail is lines per worker: RunPod's default is 100, its maximum 5000. |
amicu runpod metrics <deployment> [--watch] [--interval <secs>] [--wake] | Runtime metrics (vLLM or llama.cpp /metrics), scraped through the RunPod gateway (a pod: its proxy URL) with the deployment's api_key. The load balancer answers from one worker of its choosing, so with several workers the figures describe one of them. Hardware metrics are not available on RunPod. A scaled-to-zero endpoint is refused, because the request would start a billed worker; --wake allows it. --watch prints a new snapshot every --interval seconds (default 5, at least 1) and keeps the endpoint warm, and billed, while it runs. A pod is always on, so --wake does not apply. |
amicu runpod stop <deployment> [--lock-timeout <secs>] | Delete the endpoint (terminate the pod) and its secrets, as destroy --target does. The deployment leaves state only once the stop is confirmed. --lock-timeout waits up to that many seconds for the state lock. |
Telemetry commands
Telemetry is off by default. These commands record your choice. They do not need a project, and they make no network calls. If you opt in, amicu apply starts a small agent that uploads aggregate performance rollups; with it off, nothing is collected or sent. See Telemetry and network.
| Command | Description |
|---|---|
amicu telemetry enable | Record opt-in to sharing aggregate performance metrics. |
amicu telemetry disable | Record opt-out. This is the default. |
amicu telemetry status [--output json] | Show the effective setting and where it comes from. --output json applies to status only. |
The stored choice is in $XDG_CONFIG_HOME/amicu/telemetry.json, or ~/.config/amicu/telemetry.json when XDG_CONFIG_HOME is not set. DO_NOT_TRACK and AMICU_TELEMETRY override it.
status --output json prints { "version": "v1", "enabled": bool, "source": "do_not_track" | "env_amicu_telemetry" | "config" | "default", "config_path": string | null, "collecting": false, "note": string }.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, valid, or no error-severity diagnostics |
1 | Error-severity diagnostics, fmt --check drift, or a missing provider app |
non-zero with an error: line | Operational failure such as an I/O or parse error |
amicu doctor also exits 1 when a check has status fail (a warn does not).
JSON output
validate, plan, apply, destroy, and doctor accept --output json.
validateemits a diagnostic report:{ "version": "v1", "valid": true, "diagnostics": [] }. Aplanthat fails on errors emits the same shape.- A successful
planemits the plan:{ "version": "v1", "actions": [...] }. doctoremits{ "version": "v1", "ok": true, "checks": [...] }.- With
apply --output json, stdout carries only the resulting endpoint handles; the plan preview and approval prompt go to stderr. - With
destroy --output json, stdout is a JSON array of the destroyed deployment ids. It is[]when there was nothing to destroy or the prompt was declined. The preview, the prompt, and the notes about log files and volumes go to stderr.
Each diagnostic has a code, a severity, and a message. See Error codes.
Last updated