Browse the docs
Docs/Connect your agent

The Anima CLI

People guide

The Anima CLI is a command-line interface: a tool that coding and autonomous agents use by typing commands in a terminal. Version 0.9 can list reachable workspaces, meaning workspaces the agent can access. It can also create or duplicate into a chosen workspace, edit and review artifacts, and publish when you explicitly request it.

1. Run the CLI

No global install is required:

npx @animaapp/cli@latest --help

The package is called @animaapp/cli because Anima and AgentGrid.io share infrastructure.

2. Log in

npx @animaapp/cli@latest login

The CLI prints a verification URL and short code. Open the URL on any device and approve the agent. Never paste your password or a stored credential into the agent's chat.

A pre-authorized agent can instead redeem a one-time invite:

npx @animaapp/cli@latest login --invite <invite-url-or-code>

3. Verify identity and access

npx @animaapp/cli@latest workspaces

A successful response lists the workspaces the agent can read and its capabilities in each. A capability is permission to perform an action such as read, write, share, or publish. This is a better connection check than expecting a particular artifact to exist.

A team ID uniquely identifies a team. A workspace ID uniquely identifies a workspace. An artifact session ID uniquely identifies an artifact. Commands that accept --workspace require the workspace ID returned by workspaces; artifact commands accept an artifact URL or session ID.

4. List workspaces

npx @animaapp/cli@latest workspaces

The result includes only workspaces reachable by this agent. Copy the intended workspace ID for later commands. Workspace access is separate from team membership and from the agent's capabilities. See Workspace access.

5. List artifacts

npx @animaapp/cli@latest list
npx @animaapp/cli@latest list --workspace <workspace-id>

Without --workspace, list spans every workspace the agent can read. With it, the result is filtered to one workspace. Results are ordered by most recent update.

6. Create or import

An empty app repository:

npx @animaapp/cli@latest create -t empty --framework react --workspace <workspace-id>

Import a folder or .zip as the first commit:

npx @animaapp/cli@latest create -t import --from ./project --artifact-type app --workspace <workspace-id>

Use --artifact-type markdown for a document. Apps need an entry point; Markdown imports need .md files. The CLI also supports generated p2c, l2c, and f2c creates; run create --help for their required inputs.

--workspace is optional only when the agent can create in exactly one workspace. When it can create in several, there is no default and the workspace ID is required.

After creation, open the returned artifactUrl, or run list --workspace <workspace-id> and confirm the new session ID.

For a server-template knowledge artifact, use:

npx @animaapp/cli@latest create-knowledge --workspace <workspace-id>

7. Duplicate

npx @animaapp/cli@latest duplicate <artifact-url-or-session-id> --workspace <workspace-id>

The destination requires create access; the source requires read access. The copy is independent and includes code, assets, and supported database content, but not chat or custom domains.

Running the duplication command twice can create two copies. If the command times out or its response is lost, list recent artifacts in the destination workspace before retrying; the copy may already exist.

8. Explore and edit

Use explore to inspect files and history and edit to commit a change without a local clone:

npx @animaapp/cli@latest explore <artifact-url-or-session-id>
npx @animaapp/cli@latest edit <artifact-url-or-session-id> --help

For a real checkout, mint a short-lived remote with get-git-token. Read the current state before editing and verify the resulting revision afterwards.

9. Review

npx @animaapp/cli@latest review list
npx @animaapp/cli@latest review reply <comment-id> --help
npx @animaapp/cli@latest review resolve <comment-id>

list reads review comments addressed to the agent. reply answers while leaving a comment open; resolve closes it. See Review and comments.

10. Publish

Only publish after an explicit human request and only with the publish capability:

npx @animaapp/cli@latest publish <session-id>
npx @animaapp/cli@latest unpublish <session-id>

Publishing creates or updates a public site; it is not the same as sharing an artifact link. Verify the returned public URL. See Publish to a public URL.

11. Errors and retry rules

  • Workspace is absent from workspaces: this is a terminal failure for the current grant. Retrying cannot help until a human grants access. Do not probe for private workspace or artifact details.
  • Missing capability: this is a terminal failure until a human changes access. Relay the denied operation.
  • Artifact capacity or URL/Figma import allowance reached: stop and relay the upgrade path. See Limits and quotas.
  • Import structure or entry point is invalid: correct the source and retry.
  • Duplicate response is lost: list the destination before retrying.
  • Temporary network or server failure: retry a limited number of times and wait longer between attempts.

Add --json for machine-readable output and use <command> --help for exact options.

12. Credential lifecycle

Credentials live in ~/.config/anima/ on the machine that logged in. The CLI renews its credential when possible.

npx @animaapp/cli@latest logout

logout clears local credentials and CLI configuration. For organization-wide revocation, a human must remove the agent through agent administration; see Revoke an agent.

For MCP clients, mcp-config prints a configuration based on the stored credential. MCP, or Model Context Protocol, lets an AI client connect to external tools:

npx @animaapp/cli@latest mcp-config

See Connect any MCP client.

Questions and answers

How do I confirm the agent is connected to the right scope? Run npx @animaapp/cli@latest workspaces and confirm the intended workspace and capabilities appear.

Which ID belongs in --workspace? Use the workspace ID returned by workspaces, not a team ID or artifact session ID.

What should I do after a duplicate command times out? List recent artifacts in the destination before retrying, because another attempt can create a second copy.

Does logout revoke the agent? No. It clears local CLI credentials and configuration. Remove the identity in agent administration to revoke it everywhere.