# Examples

> Source: https://truto.one/docs/cli/examples/

Worked examples for common CLI workflows. Assumes you have run `truto login` and have at least one integrated account.

## Orientation

```bash
truto whoami
truto whoami -o json
truto whoami -p staging
truto profiles list
truto team get -o json
```

## Discover integrations

```bash
truto integrations list
truto integrations list --name hubspot
truto integrations unified-apis <integration-id>
truto integrations tools <integration-id>
```

## Discover what an account can do

```bash
ACCOUNT=<your-integrated-account-id>

truto accounts tools $ACCOUNT
truto accounts tools $ACCOUNT --methods list
truto accounts tools $ACCOUNT --methods list,get --tags contacts,deals

truto capabilities $ACCOUNT --type proxy
```

:::callout{type="tip"}
For coding agents, `accounts tools` is the best starting point when you do not know which resources an account supports.
:::

## Proxy API

```bash
ACCOUNT=<your-integrated-account-id>

truto proxy contacts -a $ACCOUNT
truto proxy contacts 1 -m get -a $ACCOUNT -o json
truto proxy contacts -m create -a $ACCOUNT -b '{"properties":{"email":"jane@example.com"}}'
```

## Unified API

```bash
ACCOUNT=<your-integrated-account-id>

truto unified crm contacts -a $ACCOUNT
truto unified crm contacts <id> -m get -a $ACCOUNT -o json
truto unified crm contacts -m create -a $ACCOUNT -b '{"first_name":"Jane","last_name":"Doe"}'
```

## Export and analyze

```bash
ACCOUNT=<your-integrated-account-id>

truto export crm/contacts -a $ACCOUNT -o ndjson --out contacts.ndjson
truto export crm/contacts -a $ACCOUNT -o ndjson | jq -r '.email' | sort -u
wc -l < contacts.ndjson
```

## Profiles and staging

```bash
truto login --token $STAGING_TOKEN --profile-name staging
truto profiles use staging
truto integrations list
truto profiles use default
```

## Integration build workflow

```bash
export ANTHROPIC_API_KEY=sk-ant-...
# Agentic build → working file → refinement (press Enter when done) → my-vendor.integration.json
truto integrations build https://docs.vendor.com/openapi.json my-vendor
truto integrations lint my-vendor.integration.json
truto integrations apply my-vendor.integration.json
```

To add a single endpoint when you already have the HTTP verb and path, use `truto integrations add-method` — see [Add method](/docs/cli/integrations-add-method).

## Verbose debugging

```bash
truto proxy contacts -a $ACCOUNT -v
# stderr shows → GET ... and ← status
```

## Piping between commands

```bash
# Create multiple integrations from a file
cat integrations.ndjson | truto integrations create --stdin

# Chain export into proxy create on another account
truto export crm/contacts -a $ACCOUNT_A -o ndjson | \
  head -5 | \
  truto proxy contacts -m create -a $ACCOUNT_B --stdin
```

## More help

- [Data plane](/docs/cli/data-plane) — unified vs proxy
- [Power features](/docs/cli/power-features) — export, diff, JSONata
- [AI-powered build](/docs/cli/integrations-build) — full build options
- Run `truto context` for an LLM-oriented reference (`truto context --full` for the full tree)
