Skip to main content
This walks you from zero to a deployed, runnable tool. It takes a few minutes and one login shared by the CLI, your project, and Cargo Skills.

1. Install

Without a global install, prefix every command with npx @cargo-ai/cli instead of cargo-ai.

2. Authenticate

You do not need an account first. --email mails a one-time code and creates the account and a workspace on first use, so there is no separate sign-up step and no browser at any point:
Signing in with an address that already has an account resolves to its existing workspace rather than creating one, so this is safe to re-run.
In an agent or sandbox shell with no terminal to prompt at, the first call sends the code and exits — re-run it with --code. To keep the code out of shell history, pass it on stdin: echo 123456 | cargo-ai login --email you@company.com --code -
The alternatives: cargo-ai login --oauth signs in through the browser using the OAuth device flow, and cargo-ai login --token <your-api-token> uses a token you created under Settings > API. To target a specific workspace, pass --workspace-name "Acme GTM" or --workspace-uuid <uuid> at login, or set the CARGO_WORKSPACE_UUID environment variable — otherwise commands run against your default workspace.
API token values are shown only once at creation time. Store them immediately in a secrets manager (GitHub Secrets, AWS Secrets Manager, 1Password, …).
Verify:
In CI, or in an AI coding agent that already has a token, you can skip cargo-ai login entirely and set the token via the CARGO_API_TOKEN environment variable — it takes precedence over saved credentials: export CARGO_API_TOKEN=<your-api-token>.

3. Scaffold a workspace

project init scaffolds a Manifest GTM repo from getcargohq/cargo-manifest, with the project in infra/. Run it without a directory to be asked instead. init installs the dependencies for you; the npm install above is only there if you declined or it failed. There is one install, at the repo root — infra/ is a source directory with no manifest of its own. Every project command below finds infra/ from the repo root, so you can stay where you are. Declaring a resource is writing a file under infra/ and importing it — here is one AI-powered tool that needs no third-party API keys, so you can deploy and run it with nothing but your Cargo login:
infra/tools/enrich.ts
This reads your workspace and writes typed connector/model config and the uses.<key>.<action> action registry into .cargo-ai/, so your editor autocompletes real action slugs.

5. Plan and deploy

deploy applies in dependency order and records each resource’s real uuid in this project’s deploy state, which lives in your workspace. Commit cargo.state.json — it is the pointer that finds it. The next deploy only changes what changed.

6. Run your tool

The run’s output includes the company name — your first deployed tool, end to end. It’s also live in your workspace at app.getcargo.io, where you can open it in the visual editor and inspect its runs.

7. Wire a real data source (optional)

Connectors bring your CRM, warehouse, and enrichment providers into the same project — for example HubSpot, using a private-app token kept out of git with secret():
infra/connectors/hubspot.ts
secret() reads from process.env at deploy time. To keep the key in the workspace instead of your shell, use workspaceEnv("HUBSPOT_API_KEY"). See Secrets & environments for how the three helpers differ, the CARGO_* variables, and deploying the same code to a second workspace.

Next steps

Project layout

How the loader turns a folder of files into a workspace.

Commands, project & skills

The three ways to drive Cargo — and when to reach for each.

Connectors

Link your CRM, warehouse, enrichment, and AI providers.

Deploying

plan, deploy, prune, refresh, import, and destroy.

CLI

Run tools, trigger plays, and query your data from the terminal.