akua is Akua’s public command-line interface for people, automation, and
coding agents. Browser/device authentication handles interactive sign-in. The
generated resource commands stay aligned with the public OpenAPI contract.
The command catalog includes APIs beyond the soft launch. Hosted sandboxes and
dedicated OpenCode Servers are not available in the soft launch; see
API availability. Use your own
coding agent and follow the Quickstart for the supported paths.
Install
Install the supported Homebrew formula on macOS or Linux:akua executable and has a SHA-256 file beside it. See the
manual install
for the exact commands for your operating system and architecture.
Update
Check for a newer release, then install it:akua update runs brew upgrade akua-dev/tap/akua for a Homebrew install. A
release binary from a manual install is replaced in place: the CLI downloads the
latest archive for your operating system and architecture, checks its SHA-256,
and swaps the executable, leaving the old one when any step fails. For an akua
that another package manager owns, such as one in /usr/bin, the CLI changes
nothing and prints the commands to run.
On an interactive terminal, the CLI checks for a newer release at most every 20
hours and prints one line on stderr while one is available. Agent, JSON, quiet,
and CI runs never check. Set AKUA_NO_UPDATE_CHECK=1 to turn the check off.
Authenticate
Start browser/device sign-in:akua auth login opens the device page and waits for you to approve the
displayed code. On a remote terminal, use akua auth login --no-browser and
open the displayed URL yourself. The CLI saves the resulting credential only
after approval.
For noninteractive automation, set AKUA_API_TOKEN to a workspace API token.
The environment variable takes precedence over the locally stored credential.
Choose a workspace
Browser-approved credentials can access more than one workspace. List your workspaces, then save the one later commands should run in:my-team with the workspace’s slug, name, or ws_... ID from the list.
akua workspaces use saves the choice in ~/.config/akua/config.json, and every
workspace-scoped command sends it as the Akua-Context header for you.
akua workspace switch is the same command. Run it without a name on a
terminal to choose from a list of your active workspaces with the arrow keys.
Check which workspace is active, and where the choice comes from:
--workspace (short form -w).
For a whole shell session or a CI job, set AKUA_WORKSPACE:
--workspace flag, then
AKUA_WORKSPACE, then the saved workspace. A workspace-owned API token already
implies its workspace, so it needs none of them. An Akua-Context value that
conflicts with a token’s scope is rejected. Run akua workspaces use --clear to
forget the saved workspace.
Run commands
Every public API operation is a command: an OpenAPIoperationId such as
clusters.create becomes akua clusters create. Path parameters are
arguments, and request fields are flags generated from the API schema, so
--help always matches the API:
REGION_ID, CLUSTER_ID, and INSTALL_ID with IDs from the matching
list command. On a terminal, lists print as tables and objects as aligned
fields. Add --json for the full API response; pipe it to
jq to pick out fields:
--help and an example. Flags that take objects or lists,
such as --initial-values, take a JSON value.
When a command returns an Operation, the CLI prints the command that waits for
it, for example akua operations wait OPERATION_ID. That command returns as
soon as the Operation finishes, or after at most 60 seconds, so run it again
until done is true. Continue only for state: SUCCEEDED, and stop for
state: FAILED or state: CANCELLED. Don’t repeat the mutation.
Pass secret values
Fields that carry secret material, such as an invitationtoken, also take a
--<flag>-file form. It reads the value from a file, or from standard input
with -, so the secret never appears in your shell history or the process list:
--token, still works, but the CLI prints a warning on
stderr.
Send a JSON request
Scripts and agents can send the whole request as one JSON object from stdin or a file through--input. The object’s possible partitions are path, query,
headers, and body; arguments and flags on the same command override its
fields:
idempotency-key header, also as the
--idempotency-key flag. Reuse the same key only when retrying the same
intended change.
Inspect the operation catalog before constructing a request:
akua commands reports each operation’s ID, method, path, summary, the human
usage line, and the JSON request shape.
Use the CLI with a coding agent
When stdout isn’t an interactive terminal, or when a known coding-agent environment is present, the CLI uses compact agent-oriented output.--json
makes the output mode explicit. An agent should fetch
the agent setup prompt, ask for your goal, consult
https://docs.akua.dev/llms.txt, confirm the workspace with you, and request
approval before consequential actions.
Start that flow with the prompt on the Quickstart.
Author Packages
akua pkg provides Package authoring, validation, rendering, publishing, and
inspection commands through the same installed CLI:
akua packages ...
commands manage Package resources through the Akua API; the two namespaces have
different roles. See the akua pkg command reference for every
Package command and its flags.
Send feedback
Tell the Akua team what happened or what you would like to see:User-Agent, which names the CLI version, your operating system and
architecture, and the Bun version. Nothing else is attached: no token,
workspace, or file path. The command prints a receipt with exactly what was
sent. A message holds up to 1,500 characters, and each person can send a few per
minute.
To send the message from a file or a script, pass the JSON request, for
example {"body":{"message":"..."}}, with --input:
Related topics
Quickstart
Start from one prompt and choose a supported route.
Agent setup
Give a coding agent its CLI operating instructions.
API reference
Review REST conventions, pagination, and errors.
Authentication
Compare device sessions and workspace API tokens.