> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yoshi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI: manage your data from the terminal

> Install the Yoshi CLI and use it to list accounts, fetch transactions, check scores, and manage your financial data from the command line.

The Yoshi CLI lets you interact with the API directly from your terminal. It's built with Go and generated from the same OpenAPI spec that powers the SDKs.

## Installation

### Homebrew (macOS/Linux)

```bash theme={null}
brew install yoshi-ai-dev/yoshi-cli/yoshi
```

### Go

Requires Go 1.22 or later:

```bash theme={null}
go install github.com/yoshi-ai-dev/yoshi-cli/cmd/yoshi@latest
```

Make sure `$GOPATH/bin` is in your `PATH`:

```bash theme={null}
export PATH="$PATH:$(go env GOPATH)/bin"
```

## Authentication

Set your API key as an environment variable:

```bash theme={null}
export YOSHI_API_KEY=yoshi_3xK9mP...
```

Or pass it directly with `--api-key`:

```bash theme={null}
yoshi accounts list --api-key yoshi_3xK9mP...
```

## Usage

The CLI follows a `yoshi [resource] <command>` structure:

### List accounts

```bash theme={null}
yoshi accounts list
```

### Fetch transactions

```bash theme={null}
yoshi transactions list --limit 10
```

### Check financial scores

```bash theme={null}
yoshi scores list
```

### View recurring streams

```bash theme={null}
yoshi recurring list
```

### Get your profile

```bash theme={null}
yoshi me retrieve
```

### Financial summary

```bash theme={null}
yoshi me summary
```

### Paper trading

```bash theme={null}
# List paper trading accounts
yoshi paper-trading accounts list

# View holdings
yoshi paper-trading accounts holdings list acc_paper123
```

## Output formats

Control how results are displayed with `--format`:

| Format    | Description                                           |
| --------- | ----------------------------------------------------- |
| `auto`    | Pretty output for terminals, JSON for pipes (default) |
| `json`    | Standard JSON                                         |
| `jsonl`   | JSON Lines (one object per line)                      |
| `pretty`  | Indented, colored JSON                                |
| `yaml`    | YAML output                                           |
| `raw`     | Raw API response body                                 |
| `explore` | Interactive explorer                                  |

```bash theme={null}
# Get JSON for piping
yoshi accounts list --format json | jq '.data.accounts[].name'

# YAML for readability
yoshi scores list --format yaml
```

## Transform output

Use `--transform` with [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md) to extract specific fields:

```bash theme={null}
# Get just account names
yoshi accounts list --transform "data.accounts.#.name"

# Get the Yoshi score
yoshi scores list --transform "data.yoshi"
```

## Global flags

| Flag              | Description                        |
| ----------------- | ---------------------------------- |
| `--api-key`       | API key (or set `YOSHI_API_KEY`)   |
| `--base-url`      | Custom API base URL                |
| `--format`        | Output format                      |
| `--transform`     | GJSON transform expression         |
| `--debug`         | Show HTTP request/response details |
| `--version`, `-v` | Show CLI version                   |
| `--help`          | Show help for any command          |

## Explore commands

Run `yoshi --help` to see all available resources, or `yoshi [resource] --help` for command-specific options:

```bash theme={null}
yoshi --help
yoshi transactions --help
yoshi transactions list --help
```

## What's next

<CardGroup cols={2}>
  <Card title="SDKs" icon="cube" href="/sdks">
    Use the TypeScript or Python SDK for programmatic access.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Create and manage your API key.
  </Card>
</CardGroup>
