# Command reference

> Source: https://truto.one/docs/cli/command-reference/

Run `truto <command> --help` for flags and filters on any command.

## Authentication and profiles

| Command                  | Description                                      |
| ------------------------ | ------------------------------------------------ |
| `truto login`            | Authenticate interactively or with `--token`     |
| `truto logout`           | Remove stored credentials                        |
| `truto whoami`           | Show current user and team                       |
| `truto profiles`         | List, switch, get, and set profile values        |
| `truto use <profile>`    | Shortcut for `profiles use`                      |
| `truto profiles set-key` | Store Anthropic/Firecrawl keys for builds |

## Integrations

| Command                           | Description                            |
| --------------------------------- | -------------------------------------- |
| `truto integrations`              | CRUD integration definitions           |
| `truto integrations init`         | Scaffold a starter integration         |
| `truto integrations validate`     | Validate config against OpenAPI schema |
| `truto integrations tools`        | List tools/methods for an integration  |
| `truto integrations unified-apis` | List unified APIs for an integration   |
| `truto integrations build`        | AI-powered build → local JSON file     |
| `truto integrations apply`        | Push IntegrationFile JSON to Truto     |
| `truto integrations lint`         | Static audit of integration config     |
| `truto integrations add-method`   | Add one method to a resource           |
| `truto categories`                | List integration categories            |

## Unified mappings

| Command                           | Description                                                |
| --------------------------------- | ---------------------------------------------------------- |
| `truto unified-mappings build`    | AI-powered build of unified mapping rows → local JSON file |
| `truto unified-mappings validate` | Audit a MappingFile (deterministic, no writes)             |
| `truto unified-mappings apply`    | Push mapping rows to base or env override tables           |

## Admin resources

| Command                            | Description                                      |
| ---------------------------------- | ------------------------------------------------ |
| `truto accounts`                   | Integrated accounts (connections)                |
| `truto accounts identify`          | Quick summary of one connected account           |
| `truto environments`               | Environments (list, get, update)                 |
| `truto environment-integrations`   | Per-environment integration installs             |
| `truto api-tokens`                 | API tokens (list, get)                           |
| `truto sync-jobs`                  | Sync job definitions                             |
| `truto sync-job-runs`              | Sync job execution records                       |
| `truto sync-job-triggers`          | Cron triggers for sync jobs                      |
| `truto sync-job-templates`         | Reusable sync templates                          |
| `truto sync-job-run-states`        | Key-value state for sync runs                    |
| `truto workflows`                  | Event-triggered automations                      |
| `truto workflow-runs`              | Workflow execution records                       |
| `truto webhooks`                   | Outbound webhooks                                |
| `truto notification-destinations`  | Slack/email alert targets                        |
| `truto mcp-tokens`                 | MCP tokens (per account)                         |
| `truto unified-models`             | Unified model definitions                        |
| `truto unified-model-mappings`     | Base unified model mapping rows                  |
| `truto env-unified-models`         | Environment unified model installs               |
| `truto env-unified-model-mappings` | Per-environment mapping overrides                |
| `truto datastores`                 | S3, GCS, MongoDB, Qdrant, PostgreSQL connections |
| `truto daemons`                    | Background worker identities                     |
| `truto daemon-jobs`                | Daemon job definitions                           |
| `truto daemon-job-runs`            | Daemon job runs                                  |
| `truto daemon-job-triggers`        | Daemon cron triggers                             |
| `truto users`                      | Team members (list, get)                         |
| `truto team`                       | Team settings                                    |
| `truto gates`                      | Static IP egress proxies                         |
| `truto docs`                       | Integration/model documentation rows             |
| `truto link-tokens`                | Truto Link connect tokens (create)               |
| `truto logs`                       | Query platform logs                              |
| `truto schema`                     | Download OpenAPI schema                          |
| `truto files`                      | Upload files to Truto-hosted URLs                |

## Data plane

| Command                      | Description                                              |
| ---------------------------- | -------------------------------------------------------- |
| `truto unified`              | Normalized unified API calls                             |
| `truto unified test-mapping` | Evaluate response mappings locally (no third-party call) |
| `truto proxy`                | Raw proxy API calls                                      |
| `truto custom`               | Custom API paths                                         |
| `truto batch`                | Batch multiple operations                                |
| `truto capabilities`         | Discover methods for integration or account              |

## Power features

| Command             | Description                    |
| ------------------- | ------------------------------ |
| `truto export`      | Bulk export with pagination    |
| `truto diff`        | Compare two records            |
| `truto jsonata`     | Evaluate JSONata locally       |
| `truto open`        | Open dashboard in browser      |
| `truto upgrade`     | Upgrade CLI binary             |
| `truto interactive` | Launch interactive wizard      |
| `truto context`     | LLM-oriented command reference |

## Gotchas

1. **`accounts` vs `integrated-accounts`:** CLI uses `accounts`; API path is `integrated-account`.
2. **`gates` vs `static-gates`:** CLI uses `gates`; API path is `static-gate`.
3. **`export` / `diff` paths:** Slash → unified (`crm/contacts`); no slash → proxy (`tickets`). Not for admin resources.
4. **MCP tokens:** Account ID is the first positional argument, not `-a`.
5. **Optimistic locking:** `integrations update` and `unified-models update` require `version` from a prior `get`.
6. **Schema output:** `truto schema` returns YAML; use `truto schema --out file.yml`.
7. **Environment scope:** Your token scopes all commands to one environment automatically.
8. **Mapping command names:** CLI uses `unified-model-mappings` and `env-unified-model-mappings`; API paths use `unified-model-resource-method` and `environment-unified-model-resource-method`.
