Archflow
Product reference

Archflow CLI

Connect a repository, inspect architecture, and call the tools available to your credentials

The archflow command connects to the same tool and resource endpoints used by MCP clients. It discovers the connected server's catalog, so available operations depend on that server and your permissions.

Install And Connect

Use Node.js 20.19 or newer. From the repository you want to connect:

npm install -g @archie_archflow/cli
archflow setup
archflow doctor

Setup guides authentication, project selection, repository binding, and supported coding-agent skills. Reopen your coding agent afterward so it discovers the installed skills. doctor checks the connection and installation; it does not modify them or prove that an already-running agent has reloaded its instructions.

For a self-hosted installation, select its origin explicitly:

archflow auth login --url https://architecture.example.com
archflow setup --agent codex
archflow doctor

Successful login saves that origin as the default. Use your installation's real URL. Remote hosts require HTTPS; HTTP is supported for loopback development addresses.

Authentication And Scope

Browser login authorizes the projects accessible to your account. The callback must reach the CLI on your machine. For headless automation, supply a project key or account token through your secret manager, using ARCHFLOW_API_KEY or ARCHFLOW_TOKEN respectively.

Do not put tokens in commands, prompts, or repository files. Token input is also supported through auth login --token-stdin --scope project or --scope account.

Project keys remain bound to their project. --project cannot redirect one to a different project. Account authorization still respects each project's permissions. Account tokens currently expire after 30 days; sign in again when required.

archflow auth logout removes the locally saved token. Revoke it in Archflow when you need to invalidate it on the server. Environment credentials take precedence over saved credentials, so confirm both the selected server and credential source.

Inspect Before Calling

archflow projects list --json
archflow project inspect --project PROJECT_ID
archflow tools list --search workflow
archflow tools describe inspectProject
archflow call inspectProject --project PROJECT_ID --json

Replace capitalized placeholders with returned IDs. projects list requires account access. call is an alias for tools call; names are case-sensitive. Use tools describe to read the connected server's schema before constructing a request.

Use --file arguments.json for structured inputs, --set field=value for individual fields, and --json for machine-readable output. Read-only credentials do not gain writes by using the CLI.

Select A Version And Saved State

--model-version VERSION_ID supplies the version when the tool supports it. Snapshot-aware tools can accept:

FlagMeaning
--snapshot SNAPSHOT_IDRead a particular historical saved state
--expected-snapshot SNAPSHOT_IDApply a write only against the state you reviewed
--request-id REQUEST_IDIdentify a write for an identical retry after an uncertain response

Unsupported selectors and conflicting input fields are rejected. A stale-state conflict requires inspecting the new state and reviewing the change again. The CLI does not silently fetch a newer head to force the write through.

Reuse a request ID only for the same operation and identical arguments. After a timeout, inspect the result before retrying. A prior read does not retarget every later write; supply the version required by the live schema.

Read Resources And Implementation Changes

archflow resources list
archflow resources templates --json
archflow resources read archflow://project/overview.md
archflow tools describe getArchitectureImplementationHandoff

Static project Markdown describes the active version. Use scoped snapshot tools/resources when the task needs an exact historical state. An implementation handoff returns before/after architecture evidence; it does not edit your code. Follow its pagination with the returned snapshot IDs to read the complete comparison.

For a local reading copy, follow Local Architecture Documentation.

Update And Diagnose

npm install -g @archie_archflow/cli
archflow skills install --check
archflow skills install --dry-run
archflow skills install
archflow doctor

The CLI ships an offline skills bundle. Updating the package alone does not install skills into your agent. Installation updates the five Archflow skills and preserves backups of previous copies. Reopen the agent after updating.

Failures produce a nonzero exit code. Authentication, invalid arguments, transport errors, and failed tool results require different remedies; read the diagnostic rather than automatically retrying a mutation.

On this page