Agiflow CLI command reference
ReferenceThe agiflow-cli manages projects, tasks, work units, members, comments, workflows, artifacts, and other supported resources from your terminal. Resource commands return JSON; some workflow and file-transfer commands also print human-readable messages.
This reference follows the 0.2.0 command definitions. Check your installed package version and each command's help before using examples, since released builds can differ. In particular, artifact update changes status or labels, and artifact link accepts a task, a work unit, or both.
Quick answer
Install the Agiflow CLI, authenticate with device-code login or an API key, set optional .agiflowrc defaults, and verify the selected project with a read-only command before making changes.
Maintained by Agiflow. Published . Last updated .
00 : Install and verify access
In a Node.js project using pnpm, install the CLI and inspect its help. In an existing Agiflow development checkout, use the workspace installation instead of adding another copy. These checks do not change board data.
pnpm add -D @agiflowai/cli@0.2.0 pnpm list @agiflowai/cli pnpm exec agiflow-cli --help pnpm exec agiflow-cli login --help pnpm exec agiflow-cli artifact update --help
Authenticate with browser device-code login, then make a read-only request. Login stores credentials and registers this CLI device; it is not a project creation command. Replace the example project with one returned by the list operation and verify its name and ID before running writes.
pnpm exec agiflow-cli login pnpm exec agiflow-cli project list --format json pnpm exec agiflow-cli project get --project YOUR_PROJECT_ID_OR_SLUG --format json
For noninteractive use, supply AGIFLOW_API_KEY through your secret manager or environment instead of pasting it into a command history. Login also accepts --api-key. Use login --global only for intentionally shared local credentials. Logout removes stored credentials for the selected scope; it does not revoke the server-side key or clear environment variables.
01 : Authentication and scope resolution
Credential precedence
- AGIFLOW_API_KEY in the environment.
- The secret variable named by AGIFLOW_API_KEY_ENV in the environment.
- The secret variable referenced by AGIFLOW_API_KEY_ENV in the repository's .agiflowrc.
- Stored repository credentials, then stored global credentials.
Stored credentials live in ~/.agiflow/credentials.json with owner-only file permissions. Repository scope uses the Git root, or the working directory outside a repository. Never commit this credentials file.
Organization and project defaults
Explicit --org and --project flags win. Organization defaults then resolve from AGIFLOW_ORGANIZATION_ID or its AGIFLOW_ORG_ID alias, .agiflowrc, and stored credentials. Project defaults resolve from AGIFLOW_PROJECT_ID, then .agiflowrc; they are not stored by login. A default selects a resource, not a permission grant.
Put .agiflowrc at the Git root. The API-key entry below names a secret environment variable, not the secret itself. Set that variable outside version control. Omit the key mapping when using stored login credentials.
AGIFLOW_ORGANIZATION_ID=YOUR_ORGANIZATION_ID AGIFLOW_PROJECT_ID=YOUR_PROJECT_ID_OR_SLUG AGIFLOW_API_KEY_ENV=$MY_AGIFLOW_SECRET
Resource and artifact commands accept project IDs or slugs where indicated. Workflow commands use a project ID. For workflow create/check, pass one target explicitly: --work-unit wins over --task when both are supplied; otherwise the fallback checks AGIFLOW_WORK_UNIT_ID before AGIFLOW_TASK_ID. These target defaults are not .agiflowrc fields. Artifact link requires explicit target flags.
02 : Resource commands and global options
Start with the installed help for the resource you need. These groups use JSON output, including structured errors on stdout, and --format json where a format option is exposed. Run mutations only after reviewing the selected resource and requested changes.
projectCreate, list, get, update, and delete projects; inspect project statuses.
taskManage tasks and statuses; find, select, and execute allowed connected tools.
work-unitGroup work, inspect progress, and manage work-unit details.
memberManage agent members.
task-commentRead and manage task discussion.
vaultManage scoped vault environments and entries. Treat values as secrets.
automationInspect and manage supported automations.
analyticsInspect supported analytics.
dependencyManage work dependencies.
resultManage supported work results.
pnpm exec agiflow-cli project --help pnpm exec agiflow-cli task --help pnpm exec agiflow-cli task list --project YOUR_PROJECT_ID_OR_SLUG --format json pnpm exec agiflow-cli work-unit list --project YOUR_PROJECT_ID_OR_SLUG --format json
-v, --verboseEnable verbose logging.
--debugEnable debug mode (prints stack traces on error).
03 : Workflow commands
Manage workflow locks with the workflow command group.
agiflow-cli workflow <subcommand> [options]
workflow create
Acquire a workflow lock.
pnpm exec agiflow-cli workflow create --name <name> [options]
--name <name>--org <organizationId>--project <projectId>--work-unit <workUnitId>--task <taskId>--context <json>Output on success
✓ Workflow lock acquired
{
"id": "..."
}workflow get
Get workflow details by ID.
pnpm exec agiflow-cli workflow get <id> [options]
--org <organizationId>--project <projectId>Output on success
JSON object with workflow details.
workflow list
List workflows for a project.
pnpm exec agiflow-cli workflow list [options]
--org <organizationId>--project <projectId>--status <status>--limit <limit>--offset <offset>Output on success
JSON array or paginated result object.
workflow update
Update workflow metadata.
pnpm exec agiflow-cli workflow update <id> [options]
--name <name>--context <json>--org <organizationId>--project <projectId>Output on success
✓ Workflow updated
{ ... }workflow release
Release a workflow lock.
pnpm exec agiflow-cli workflow release <id> --status <status> [options]
--status <status>--error <error>--org <organizationId>--project <projectId>Output on success
✓ Workflow lock released
{ ... }workflow check
Check if a workflow lock exists for a given work unit or task.
pnpm exec agiflow-cli workflow check [options]
--org <organizationId>--project <projectId>--work-unit <workUnitId>--task <taskId>Output on success
Lock found: ✓ Lock found followed by JSON details. Lock not found: {} (empty JSON object).workflow delete
Delete workflow metadata. Review the workflow before deleting it; this is not a substitute for releasing a completed lock.
pnpm exec agiflow-cli workflow delete <id> [options]
--org <organizationId>--project <projectId>Output on success
JSON deletion result.
04 : Artifact commands
Manage project artifacts with the artifact command group. All artifact subcommands, including link and update, need an organization and a project. They accept --format json, but upload, downloads, and delete still emit human-readable messages. Scoped downloads append a JSON summary after their progress lines. Use signed-url when a script needs a structured URL response.
agiflow-cli artifact <subcommand> [options]
artifact upload
Upload a file as a project artifact. The upload uses a three-step flow: request a presigned URL, PUT the file bytes to storage, then mark the upload complete.
pnpm exec agiflow-cli artifact upload <file> [options]
--name <name>--type <type>--org <organizationId>--project <projectId>Output on success
↑ Uploading <name> (<size> bytes)... ✓ Artifact uploaded: <key>
Note: Exits with code 1 if the file path does not exist.
artifact download
Download by key with --output, or omit the key and explicitly select exactly one of --task and --work-unit. Scoped downloads use --target, not --output.
pnpm exec agiflow-cli artifact download [key] [options]
-o, --output <path>--org <organizationId>--project <projectIdOrSlug>--task <taskId>--work-unit <workUnitId>--target <folder>--overwriteOutput on success
Single key: destination message. Scoped downloads: progress messages followed by a JSON summary.
Note: Single-key downloads write directly to the destination and can replace an existing file without --overwrite. Choose a new --output path. The --overwrite safeguard applies only to scoped downloads.
artifact list
List all artifacts for a project.
pnpm exec agiflow-cli artifact list [options]
--org <organizationId>--project <projectIdOrSlug>--search <search>--labels <labels>--content-type <contentType>--status <status>--max-keys <maxKeys>--continuation-token <token>Output on success
JSON object containing an items array.
artifact get
Get details for a single artifact by key or ID.
pnpm exec agiflow-cli artifact get <key> [options]
--org <organizationId>--project <projectId>Output on success
JSON object with artifact metadata.
Note: Exits with code 1 if the artifact is not found.
artifact delete
Delete an artifact by key.
pnpm exec agiflow-cli artifact delete <key> [options]
--org <organizationId>--project <projectId>Output on success
✓ Artifact deleted: <key>
artifact link
Link or unlink an artifact to a task, a work unit, or both. Supply at least one target explicitly; environment-only target values do not satisfy this command.
pnpm exec agiflow-cli artifact link <key> [--task <taskId>] [--work-unit <workUnitId>] [options]
--org <organizationId>--project <projectIdOrSlug>--action <action>--clip-json <json>--task <taskId>--work-unit <workUnitId>Output on success
JSON result returned by the link_artifact tool.
Note: * At least one of --task or --work-unit is required. Both are supported. Review the targets before linking or unlinking.
artifact seed
Seed artifacts from a JSON file.
pnpm exec agiflow-cli artifact seed --file <path> [options]
--file <path>--org <organizationId>--project <projectId>Output on success
JSON object with created artifact summary.
Note: Exits with code 1 if the file does not exist or contains invalid JSON.
artifact update
Update an artifact's status or labels through the update_artifact tool. This command performs a remote write.
pnpm exec agiflow-cli artifact update <key> [--status <status>] [--labels <labels>] [options]
--org <organizationId>--project <projectIdOrSlug>--status <status>--labels <labels>Output on success
JSON result returned by update_artifact.
Note: The current command does not expose a --name flag. Verify the resulting metadata with artifact get.
artifact signed-url
Return a signed storage URL as JSON. Treat that URL as a temporary credential, not a public link.
pnpm exec agiflow-cli artifact signed-url --action <upload|download> [options]
--key <key>--filename <filename>--type <type>--org <organizationId>--project <projectIdOrSlug>Output on success
JSON URL response with action, and key for a download.
Note: Requesting an upload URL does not upload file bytes or mark an upload complete. Use artifact upload for the complete flow.
05 : Environment variables
AGIFLOW_API_KEYAuthenticated commands, including artifact update
API key for authentication
AGIFLOW_ORGANIZATION_IDOrganization-scoped commands
Default organization ID
AGIFLOW_PROJECT_IDProject-scoped commands, including artifact link and artifact update
Default project ID
AGIFLOW_TASK_IDWorkflow target fallback; artifact link and scoped downloads require explicit target flags
Default task ID
AGIFLOW_WORK_UNIT_IDWorkflow target fallback; artifact link and scoped downloads require explicit target flags
Default work unit ID
AGIFLOW_API_KEY_ENVEnvironment or repository .agiflowrc
Name or $NAME reference to the environment variable holding the API key, not the key itself
06 : Exit codes
0Success.
1Error: missing required argument, authentication failure, API error, file not found, invalid JSON, or upload/download failure. Workflow and artifact commands print errors to stderr and exit with code 1. The workflow check command is a special case: when no lock is found it prints an empty JSON object to stdout and exits with code 0.
07 : Output format
Data responses
Printed as formatted JSON (JSON.stringify(value, null, 2)).
Success messages
Resource groups print JSON. Workflow mutations and some artifact commands print success text as well. Do not pipe those mixed-output commands straight into a JSON parser.
Progress messages
Prefixed with a blue arrow (↑), for example during upload.
Errors
Resource groups emit structured JSON errors on stdout and exit with code 1. Workflow and artifact errors generally go to stderr. Login/logout use the requested text or JSON format. Always check the exit status and inspect both streams rather than treating empty output as success.