# Install Archie's CLI

> Install the archie command, sign in with your browser, and run skills and WorkStreams from your terminal. Rich tables on a TTY, JSON when you pipe.

Archie's command line is how you put his team to work from your terminal. Rich tables when you read it, plain JSON when you pipe it.

The same heyarchie package ships the Python SDK and the archie command, so anything you script here you can later move into code.

Install and sign in

## Install With Pipx or Uv

The archie command is a standalone app, so install it in its own isolated environment with pipx or uv. That keeps it off your system Python and puts archie straight onto your PATH. uv is identical on every operating system. Sign in with your region's address, or name the region with --environment uk; archie saves the address with your credentials, so you give it once.

```
brew install pipx
pipx install heyarchie

archie auth login --api-url https://uk.heyarchie.com
```

```
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install heyarchie

archie auth login --api-url https://uk.heyarchie.com
```

```
py -m pip install --user pipx
py -m pipx ensurepath
py -m pipx install heyarchie

archie auth login --api-url https://uk.heyarchie.com
```

```
uv tool install heyarchie

archie auth login --api-url https://uk.heyarchie.com
```

Why not plain pip?

A bare pip install heyarchie trips an externally-managed-environment error on macOS and recent Debian and Ubuntu (PEP 668), because the system Python is guarded. pipx and uv manage a virtualenv for you. To use the SDK as a library, run pip install heyarchie inside your project's virtualenv.

First run

## From Install to First Command

1

### Sign in With Your Browser

archie auth login opens your browser, shows a one-time code, and waits while you sign in with your firm's SSO. If you belong to more than one workspace, add --workspace <id> to choose one. It uses the RFC 8628 device flow, so nothing is pasted and no long-lived key is minted.

2

### Archie Saves Your Session

The short-lived session is written to ~/.archie/credentials.toml (chmod 600) under the [default] profile, so every other command reads it the same way. No keys to paste, no files to edit.

3

### Check Who You Are

Run archie auth status to see your profile, the address it talks to and your token, redacted. Run archie auth logout to drop the session.

4

### Put Him to Work

Prove the sign-in worked with archie keys list, which reads your real Connect keys using the session Archie just saved. Then list his skills or start a WorkStream.

Then put him to work

## Your First Commands

Three commands cover most first sessions. For CI, swap the browser flow for a Connect key: create one with archie keys create while you are signed in, then pass it to login or set ARCHIE_API_KEY and skip login entirely.

```
archie skills list        # everything Archie can do
archie keys list          # your Connect keys
archie workstreams run month-end-close   # put a WorkStream to work (its id, permakey or slug)
```

```
archie auth login --api-key sk_xxxxxxxxxxxxxxxx --api-url https://uk.heyarchie.com
# or set ARCHIE_API_KEY and ARCHIE_ENVIRONMENT (or ARCHIE_API_URL) in the environment and skip login entirely
```

Reference

## Sign In

A workstream id accepts a UUID, a WorkStream slug, or a 7-character permakey; Archie resolves all three.

archie auth login

Browser sign-in (the default). Add --api-key to sign in with a Connect key instead.

archie auth status

Shows your profile, the address it talks to and your token, redacted.

archie auth token

Prints the bearer token for use in scripts.

archie auth logout

Drops the saved session.

## Keys and Skills

archie keys list

Lists your Connect keys.

archie keys create <name>

Creates an sk_ key and prints it once. Add --scope for each permission it gets. Needs permission to manage keys.

archie skills list [--category...]

The skill catalogue.

archie skills run <command> [--flags]

One typed command per skill (heyarchie 1.4.0 and later).

archie skills invoke <slug> --input <json>

Calls one skill with raw JSON input.

## Run a Workstream

archie workstreams list [--scope...]

The WorkStreams you can see.

archie workstreams describe <id>

A WorkStream's metadata and step graph.

archie workstreams run <id> [--var k=v]

Starts a cycle.

## Follow a Run

archie workstreams status <cycle_id>

Shows a cycle's progress.

archie workstreams cancel <cycle_id>

Cancels a running cycle.

archie workstreams logs <cycle_id>

Streams a cycle's events live.

Typed skill commands

## Run Any Skill With Typed Flags

Every public skill is also a command under archie skills run, generated from the skill registry. Required fields become required flags, list and object fields take inline JSON, and each command's --help is the skill's input schema. No JSON body to assemble by hand.

```
# Create a topic, typed flags instead of a JSON body
archie skills run topic-create --name "FY26 audit — Acme" --type client

# List topics, pipe-friendly
archie skills run topic-list --limit 5 --json | jq '.topics[].name'

# ask_archie as a typed command (--query is required)
archie skills run ask-archie --query "Under ASC 606, when is revenue recognised?"

# A list-typed field takes inline JSON
archie skills run accruals-suggest \
  --client-id "$CLIENT" --period 2026-04 \
  --focus-areas '["wages", "rent"]'
```

```
$ archie skills run topic-create --help
Usage: archie skills run topic-create [OPTIONS]

  Create a Topic in the caller's workspace (optionally bound to a client). The
  topic is stamped created_by_type=archie.

Options:
  --name TEXT         The new topic's name, from 1 to 200 characters.
                      [required]
  --client-id TEXT    UUID of the client to bind
  --theme-color TEXT  Hex like #DAFBE1; default applied server-side
  --type TEXT         Topic type: client | matter | process_period | advisory
                      | compliance | internal (DB-enforced enum)
  --json              Emit raw JSON to stdout (machine-friendly).
  --profile TEXT      Credentials profile in ~/.archie/credentials.toml
                      (default: 'default').
  --api-url TEXT      API base URL. Falls back to env ARCHIE_API_URL or saved
                      credentials.
  --api-key TEXT      Bearer token. Falls back to env ARCHIE_API_KEY or saved
                      credentials.
  --help              Show this message and exit.
```

Examples

## Ask Archie and Run a Cycle

ask_archie is the general-purpose skill, the fallback for any accounting question that doesn't fit a more specific one. Every skill takes the same invoke <slug> --input shape, and the CLI sends the same body as POST /api/v1/skills/<slug>/invoke. Long questions can live in a file, passed with @.

```
archie skills invoke ask_archie \
  --input '{"query": "What is the BAS, and when is it due?"}' \
  --json | jq -r '.answer'

# Every answer carries citations to the standard it came from:
archie skills invoke ask_archie \
  --input '{"query": "Capitalise or expense a 3-year SaaS subscription?"}' \
  --json | jq -r '.citations[].standard'
```

```
echo '{"query": "Walk me through the lease classification test for our new warehouse."}' > q.json
archie skills invoke ask_archie --input @q.json
```

```
# Ask for tax advice in one jurisdiction
archie skills invoke advise_tax \
  --input '{"topic": "CGT discount on an active asset", "jurisdiction": "AU"}'

# List every slug you can call
archie skills list --json | jq -r '.[].slug'
```

```
CYCLE=$(archie workstreams run month-end-close \
  --period FY26-Q1 \
  --var include_deferred=true \
  --idempotency-key close-2026-04-acme-001 \
  --json | jq -r .cycle_id)

archie workstreams logs "$CYCLE" --follow
```

Configuration

## Flags

These flags ride along on every command. CLI flags win over environment variables, which win over the saved credentials file.

--json

flag

Emits raw JSON to stdout instead of a rich table.

--profile

text

The credentials profile in ~/.archie/credentials.toml (default: 'default').

--api-url

text

Your region's address. Falls back to ARCHIE_API_URL, then ARCHIE_ENVIRONMENT, then the address saved at sign-in.

--api-key

text

A bearer token. Falls back to ARCHIE_API_KEY or saved credentials.

## Environment Variables

ARCHIE_API_URL

The API base URL, Your region's address, for example https://uk.heyarchie.com.

ARCHIE_API_KEY

A bearer token. When set, you can skip login.

ARCHIE_ENVIRONMENT

Your region's name: uk, us, au or ca. Read when ARCHIE_API_URL is not set.

ARCHIE_WORKSPACE_ID

The workspace to work in, when your sign-in reaches more than one.

Next

### SDKs

The same surface from Python: import heyarchie.

### Tool Catalogue

Every skill you can run, with its exact inputs.

### API Reference

Every skill as POST /api/v1/skills/<slug>/invoke.

On this page

[Install With Pipx or Uv](https://heyarchie.com/en-gb/developers/cli/#s-install-and-sign-in)[From Install to First Command](https://heyarchie.com/en-gb/developers/cli/#s-first-run)[Your First Commands](https://heyarchie.com/en-gb/developers/cli/#s-then-put-him-to-work)[Sign In](https://heyarchie.com/en-gb/developers/cli/#s-reference)[Keys and Skills](https://heyarchie.com/en-gb/developers/cli/#s-keys-and-skills)[Run a Workstream](https://heyarchie.com/en-gb/developers/cli/#s-run-a-workstream)[Follow a Run](https://heyarchie.com/en-gb/developers/cli/#s-follow-a-run)[Run Any Skill With Typed Flags](https://heyarchie.com/en-gb/developers/cli/#s-typed-skill-commands)[Ask Archie and Run a Cycle](https://heyarchie.com/en-gb/developers/cli/#s-examples)[Flags](https://heyarchie.com/en-gb/developers/cli/#s-configuration)[Environment Variables](https://heyarchie.com/en-gb/developers/cli/#s-environment-variables)
