cargo-cli-storage
Cargo CLI — Storage
Data layer management: inspecting and modifying models, datasets, columns, relationships, and records.
See
references/response-shapes.mdfor full JSON response structures. Seereferences/troubleshooting.mdfor common errors and how to fix them. Seereferences/examples/models.mdfor model CRUD, DDL inspection, and schema discovery examples. Seereferences/examples/datasets.mdfor dataset listing and navigation examples. Seereferences/examples/columns.mdfor column creation and management examples.
Prerequisites
npm install -g @cargo-ai/cli
cargo-ai login --token <your-api-token>
cargo-ai login --token <your-api-token> --workspace-uuid <uuid>
Verify with cargo-ai whoami. All commands output JSON to stdout. Without a global install, prefix every command with npx @cargo-ai/cli instead of cargo-ai.
Failed commands exit non-zero and return {"errorMessage": "..."}.
Discover resources first
Always list before inspecting or modifying.
cargo-ai storage dataset list # all datasets (uuid, slug)
cargo-ai storage model list # all models (uuid, name, slug, columns)
cargo-ai storage model list --dataset-uuid <uuid> # models in a specific dataset
Quick reference
cargo-ai storage model list
cargo-ai storage model get <model-uuid>
cargo-ai storage model get-ddl <model-uuid>
cargo-ai storage dataset list
cargo-ai storage column list --model-uuid <uuid>
cargo-ai storage relationship list --model-uuid <uuid>
cargo-ai storage record list --model-uuid <uuid>
Models
Models are structured tables in your workspace (e.g. Companies, Contacts).
# List all models
cargo-ai storage model list
# List models in a dataset
cargo-ai storage model list --dataset-uuid <uuid>
# Get a single model (includes columns)
cargo-ai storage model get <model-uuid>
# Get the DDL (exact table name and columns for SQL queries)
cargo-ai storage model get-ddl <model-uuid>
# → Always do this before running system-of-record queries — the table name is in the DDL
# Create a model
cargo-ai storage model create \
--slug contacts \
--name "Contacts" \
--dataset-uuid <uuid> \
--extractor-slug <extractor-slug> \
--config '{}'
# Update a model
cargo-ai storage model update --uuid <model-uuid> --name "New Name"
# Remove a model
cargo-ai storage model remove <model-uuid>
Important: When querying a model via the system of record, always get the DDL first to find the exact table name (e.g. datasets_default.models_companies). Do not guess table names. See the cargo-cli-orchestration skill for system-of-record query examples.
Datasets
Datasets are logical groupings of models.
# List all datasets
cargo-ai storage dataset list
# Get a single dataset
cargo-ai storage dataset get <dataset-uuid>
Columns
Columns define the schema of a model.
# List columns for a model
cargo-ai storage column list --model-uuid <uuid>
# Create a column
cargo-ai storage column create \
--model-uuid <uuid> \
--column '{"slug":"my_column","type":"string","label":"My Column","kind":"custom"}'
# Update a column (pass the full column object — columns are identified by slug, not UUID)
cargo-ai storage column update \
--model-uuid <uuid> \
--column '{"slug":"my_column","type":"string","label":"Updated Label","kind":"custom"}'
# Remove a column
cargo-ai storage column remove --model-uuid <uuid> --column-slug <slug>
# Reorder a column (move to a specific index)
cargo-ai storage column reorder --model-uuid <uuid> --column-slug <slug> --to-index 2
Column types: string, number, boolean, date, object, array, vector, any.
Column kinds: custom (user-defined), computed (expression over other columns), metric (aggregated from a related model), lookup (single field pulled from a related model via a join).
Relationships
Relationships link models together (e.g. Contacts belong to Companies).
# List relationships for a model
cargo-ai storage relationship list --model-uuid <uuid>
# Set a relationship between two models
cargo-ai storage relationship set \
--from-model-uuid <uuid> \
--to-model-uuid <uuid>
Records
# List records in a model
cargo-ai storage record list --model-uuid <uuid>
For advanced record queries (filtering, sorting, pagination), use segmentation segment fetch from the cargo-cli-orchestration skill.
Help
Every command supports --help:
cargo-ai storage model list --help
cargo-ai storage column create --help
cargo-ai storage relationship set --help
More from getcargohq/cargo-skills
cargo-skills
Master skill index for the Cargo CLI. Use this file to understand which skill to load, how the skills relate to each other, and how to chain them together to accomplish end-to-end revenue automation tasks on the Cargo platform.
62cargo-ai
Create and configure AI agents, upload files for RAG, manage MCP servers, and handle agent memories using the Cargo CLI. Use when the user wants to create or update agents, upload knowledge base files, connect MCP tool servers, or manage agent memories. For sending messages to agents, use the cargo-orchestration skill instead.
43cargo-gtm
Front door for any GTM task on Cargo — sourcing, waterfall enrichment, email/phone/LinkedIn lookup, email verification, scoring, qualification, sequencing, CRM sync, and signal monitoring (job changes, funding, tech-stack/hiring intent). Use when the user states a real-world goal involving prospects, leads, accounts, contacts, ICP lists, or campaign activation. Routes to phase guides (Level 2), recipes (Level 2.5), and per-provider playbooks (Level 3) before any action call.
43cargo-storage
Manage models, datasets, columns, and relationships using the Cargo CLI. Use when the user wants to inspect or modify data models, create or update columns, list datasets, set model relationships, or understand the schema of their Cargo workspace.
42cargo-orchestration
Interact with the Cargo platform via CLI. Use when the user wants to execute an action, run a workflow, trigger a batch, message an AI agent, query a data warehouse, fetch segment records, or inspect a model schema.
41cargo-analytics
Download workflow run results, export segment data, and monitor run metrics using the Cargo CLI. Use when the user wants run metrics, error rates, data export, or download results for their Cargo workspace. For billing and credit usage, use the cargo-billing skill instead.
40