Command Reference
Every command the CLI ships, and the endpoint behind it. Run konstruct <command> --help for the flags of any one of them.
Conventions
These hold everywhere.
Naming a Target
The platform-* and cluster commands take the name either way:
konstruct platform-env get staging
konstruct platform-env get --name staging
The flag wins if you pass both. Two bare names are refused rather than one being used silently.
The app commands take --app_name only, and ask when you leave it out.
Long Flags Only
There are no short flags. It is --json, never -o json or -ojson. The CLI rejects a short flag rather than ignoring it, so a request for JSON never quietly returns a table.
JSON Output
Any read command takes --json and prints the raw API payload:
konstruct platform-app-deployment list --json | jq '.[] | select(.ready == false)'
Non-Interactive Use
--yes accepts defaults and never prompts. Without a terminal the CLI does not prompt at all — it fails and names the flag you need to add.
Resolving the Organization
--org, then KONSTRUCT_ORG, then the default from konstruct setup. When none is set and you are at a terminal, it asks.
Credentials
Checked in this order, so an environment variable always wins over a stored session.
| Layer | Set by |
|---|---|
| Environment | KONSTRUCT_API_URL, KONSTRUCT_API_KEY, KONSTRUCT_ORG |
| Session | konstruct auth, stored in ~/.konstruct/credentials.json |
| Configuration | konstruct setup |
Set KONSTRUCT_CONFIG_DIR to move the session file, which is useful for testing against a second install without disturbing your own.
Account
| Command | Does |
|---|---|
konstruct setup | Store the API URL, key, and default organization |
konstruct auth | Log in with the browser and store the session |
konstruct auth --status | Report whether the stored session is valid |
konstruct logout | Forget the browser session on this machine |
konstruct whoami | Show the identity, roles, and organizations behind your credentials |
Applications (Konduit)
| Command | Does |
|---|---|
konstruct detect | Identify the application in the current directory |
konstruct deploy | Detect, push, and deploy the current directory |
konstruct app deploy | The same as konstruct deploy |
konstruct app list | The applications this organization runs |
konstruct app status --app_name <app> | Phase, URL, image, and recent builds |
konstruct app logs --app_name <app> | Stream runtime logs; --build prints build logs |
konstruct app env list --app_name <app> | The variables set on the application |
konstruct app env set --app_name <app> --vars K=v | Set variables, triggering a redeploy |
konstruct app open --app_name <app> | Print and open the public URL |
konstruct app redeploy --app_name <app> | Rebuild from the HEAD of the connected branch |
konstruct app remove --app_name <app> | Delete the application, pruning its manifest and namespace |
Organization
| Command | Does |
|---|---|
konstruct environments | The organization's Konduit environments, or --create one |
konstruct regions | Managed clusters an application can deploy to |
konstruct quota | Plan, allowance, and current usage |
konstruct environments lists Konduit zones. konstruct platform-env list lists platform environments. They are different resources.
Platform
See Platform commands.
| Command | Endpoint |
|---|---|
konstruct platform-env list | GET /api/v1/environments |
konstruct platform-env get <name> | GET /api/v1/environment/{ns}/{name} |
konstruct platform-env create --name <n> | POST /api/v1/environment |
konstruct platform-env attach --name <n> --cluster <c> | GET then PUT /api/v1/environment |
konstruct platform-env detach --name <n> --cluster <c> | The same |
konstruct platform-env delete <name> | DELETE /api/v1/environment/{ns}/{name} |
konstruct cluster list | GET /api/v1/team-management/{org}/clusters |
konstruct platform-app register | POST /api/v1/application/register |
konstruct platform-app list | GET /api/v1/konstruct-application/{ns} |
konstruct platform-app get <app> | GET /api/v1/konstruct-application/{ns}/{name} |
konstruct platform-app deploy | POST /api/v1/application-deployment/deploy |
konstruct platform-app-deployment list | GET /api/v1/application-deployment/{ns} |
konstruct platform-app-deployment get <app> | GET /api/v1/application-deployment/{ns}/{name} |
MCP Server
| Command | Does |
|---|---|
konstruct mcp | Start a read-only MCP server over stdio, for AI assistants |
konstruct update | Print the commands to refresh a cached MCP server |
The MCP server exposes the same read endpoints as the CLI. Authenticate it with an MCP key from the API keys page. konstruct update only prints commands — it never changes your filesystem.
Exit Codes
| Code | Means |
|---|---|
0 | Success, including a confirmation you declined |
1 | A failed call, or an argument the CLI refused |
Failures print a single actionable line. A 404 reads as "Not found — check the app name and organization" rather than a status code.