Docs
Quickstart
Use this when you want to install ankicli, confirm the runtime is healthy, and hand a real Anki profile or collection path to an agent without guessing.
Copy this guide
Paste it into Claude, Codex, or OpenClaw for structured context.
Paste this page into your LLM chat for structured context.
When to use this
- You have installed ankicli and want the fastest safe verification path.
- You are about to point Claude, Codex, OpenClaw, or a script at your Anki environment.
What the agent should know
- ankicli is JSON-first and should usually be called with --json in automation contexts.
- Humans normally handle install and initial verification. Agents handle the day-to-day commands after the environment is confirmed healthy.
- Human-facing workspace config lives under ~/.ankicli/workspaces/<name>/config.json; sync credentials live separately in the OS keyring or platform fallback store.
Install first
Use the one-command installer for your platform. The script downloads a standalone GitHub Release artifact, verifies checksums, and installs ankicli into a user-local path.
macOS/Linux
curl -fsSL https://raw.githubusercontent.com/Takhoffman/ankicli/main/scripts/install.sh | sh Windows
irm https://raw.githubusercontent.com/Takhoffman/ankicli/main/scripts/install.ps1 | iex Verify the runtime
Run these commands before giving ankicli to an agent. They confirm the executable works, the packaged runtime is healthy, and the local environment can be inspected safely.
Verification
ankicli --version
ankicli --json doctor env
ankicli --json doctor backend
ankicli configure Save a default target
Use the configure wizard first. It finds local Anki profiles, recommends the likely default collection, saves the workspace target, lets you log in to AnkiWeb or skip sync, and offers to install bundled agent skills. If you skip, rerun the same command when you are ready.
Guided setup
ankicli configure
ankicli --json workspace show
ankicli --json collection info Manual profile setup
If you already know the exact profile or collection target, you can skip the wizard and save it directly. This is useful for agent harness setup scripts and repeatable test environments.
Profile-aware setup
ankicli --json profile list
ankicli --json profile default
ankicli workspace set --profile "User 1"
ankicli --json workspace show
ankicli --json collection info Create workflow-specific workspaces
Use additional ankicli workspaces when one operator has different targets, for example a main deck, a travel-learning deck, and a disposable test collection.
Named workspace
ankicli workspace set --name travel --profile "Travel" --activate
ankicli --json collection info
ankicli --workspace default --json collection info
ankicli workspace use --name default Use auth after a target is saved
auth login needs a real collection target because the python-anki sync login flow works through the collection runtime. Save a profile or collection first, then run auth.
Auth setup
ankicli auth status
ankicli auth login
ankicli --json sync status