Anima CLI
Connect an AI agent to Anima, give it scoped access to your team's work, and let it create, import, edit, share, or publish playgrounds from the terminal.
Anima CLI is the fastest way for an AI coding agent to start working with Anima in its current session. It wraps the main Anima and AgentGrid workflows in agent-friendly commands, with structured JSON output available when needed.
npx @animaapp/cli@latest --helpInvite an agent to join Anima: send the agent https://public-api.animaapp.com/connect. The page gives the agent the current CLI workflow, authentication steps, and safety rules it needs to connect and start working.
What agents can do with Anima CLI
With the CLI, an approved agent can:
- Connect to Anima through a human-approved device login
- List the team's existing playgrounds and continue recent work
- Create an empty playground for a new app
- Generate a playground from a prompt, website URL, or Figma design
- Import an existing local project or zip archive
- Get short-lived Git access to an existing playground
- Edit, commit, and push changes to the live playground
- Rename a playground or change its visibility
- Convert a Figma design directly into local code files
- Share a playground URL with collaborators
- Publish a playground to a public live URL when explicitly requested
- Unpublish a deployed site without deleting its playground
- Generate MCP configuration for future sessions
For scripts and agent workflows, add --json to any command for machine-readable output.
Invite and approve an agent
Share this link with your coding agent:
https://public-api.animaapp.com/connectThe agent can read the instructions and start the CLI login flow:
npx @animaapp/cli@latest loginThe CLI prints a verification URL and a short code. Open the URL, choose which workspaces and capabilities to grant, and approve the agent. The code is valid for about 15 minutes.
The resulting agent identity is scoped and revocable:
- It can act only in approved workspaces and within approved capabilities.
- Permission changes and revocation take effect on subsequent requests.
- Credentials expire after about seven days and can be renewed by logging in again.
logoutclears the stored credentials and CLI configuration from that machine, but it does not revoke the agent identity. Revoke access from your Anima team settings.
npx @animaapp/cli@latest logoutIf your team gives the agent a pre-approved invite URL, the agent can redeem it without a separate device-approval step:
npx @animaapp/cli@latest login --invite <inviteUrl>The invite URL is a credential. Send it only to the intended agent and do not publish it in docs, logs, or chat transcripts.
Start or continue work
After login, confirm the connection and list the team's playgrounds:
npx @animaapp/cli@latest listEach result includes the playground name, its session ID, and when it was last updated. The session ID is also the last part of a playground URL:
https://dev.animaapp.com/chat/<sessionId>Create an empty playground
npx @animaapp/cli@latest create -t empty --framework react --name "My project"The response includes a playground URL and a short-lived Git remote. Clone it, add your app, commit, and push.
Generate from a prompt, URL, or Figma design
The create command also supports Anima's AI generation flows:
p2c: generate from a text promptl2c: generate from a public website URLf2c: generate from selected Figma frames
These flows usually take several minutes. Agents should wait for the command to finish and return the completed playground instead of starting the same generation again.
Import an existing project
# Import a local folder
npx @animaapp/cli@latest create -t import --from ./my-project
# Import a larger project or one that includes binary assets
npx @animaapp/cli@latest create -t import --from ./my-project.zipThe CLI sends small text projects directly. For larger projects or binary files, it handles the zip-upload flow for you.
Importing creates a new playground from your files. It does not turn your original local folder into a clone. Use the Git remote returned by the command when you want to keep editing the playground.
Edit an existing playground with Git
Anima playgrounds are real Git repositories. Git is the supported way to change the code of an existing playground.
Get a short-lived repository URL:
npx @animaapp/cli@latest get-git-token <sessionId>Then clone or update the remote and work normally:
git clone <gitRemoteUrl> my-project
cd my-project
# Edit files
git add -A
git commit -m "Describe the change"
git pushGit credentials are scoped to one playground and expire within one hour. They cannot be renewed in place. If one expires, request a new URL and replace the remote:
npx @animaapp/cli@latest get-git-token <sessionId>
git remote set-url origin <newGitRemoteUrl>
git pushTreat Git remote URLs as secrets because they contain short-lived access tokens.
Share or publish
A playground is already shareable at its Anima URL:
https://dev.animaapp.com/chat/<sessionId>Publishing is a separate action that makes a deployed site public to the world. Agents should publish only when a human explicitly asks them to deploy publicly.
npx @animaapp/cli@latest publish <sessionId>
npx @animaapp/cli@latest unpublish <sessionId>To rename a playground or change its visibility without touching its code, use update:
npx @animaapp/cli@latest update <sessionId> --privacy publicOptional: enable native MCP tools
The CLI works immediately in the current terminal session. If your agent also supports MCP, it can generate a ready-to-paste authenticated MCP configuration for future sessions:
npx @animaapp/cli@latest mcp-configAdd the generated configuration to your MCP client, then restart or reload the client so it can discover Anima's tools.
The generated configuration contains a Bearer token. Store it in the MCP client configuration and never paste it into chat or documentation.
For native MCP setup and capabilities, see Anima MCP.
Anonymous handoff
An agent can also create and share an anonymous artifact without logging in first. The handoff link must be claimed within 24 hours. Claiming transfers the work to the human, and the human can choose whether to grant the agent ongoing access.
For the current anonymous handoff contract and exact request format, give the agent this link:
https://public-api.animaapp.com/connect
Command reference
Use the built-in help to see the latest commands and options:
npx @animaapp/cli@latest --help
npx @animaapp/cli@latest <command> --helpBecause the CLI and connection flow evolve, the connect page is the source of truth for agents:
Updated 19 days ago