# The pirateskills CLI

Events, offers, your wallet and every Pirate Skills tool from the terminal – for you, your scripts and coding agents like Claude Code and Codex.

v1.0.1 · MIT · Node 18+

## Install

```bash
npm install -g pirateskills

pirateskills login          # paste your key, or set PIRATESKILLS_API_KEY
pirateskills tools
```

No account needed for the public commands. Try one without installing:

```bash
npx -y pirateskills events --limit 3
```

No dependencies. The package is [pirateskills on npm](https://www.npmjs.com/package/pirateskills); the same file is also at `https://pirateskills.com/cli/pirateskills.tgz`.

## Sign in

1. Make a key: [Settings](https://pirateskills.com/lab/settings) → **Manage account** → **API keys**.
2. Run `pirateskills login` and paste it – or set `PIRATESKILLS_API_KEY`, which wins over a saved key, so cloud sessions skip `login`.

The key is saved readable only by you, in your OS config folder, and sent only to pirateskills.com.

## Commands

| Command | What it does | Sign-in |
| --- | --- | --- |
| `login` · `logout` · `whoami` | Save, forget or check your key | – |
| `tools` | The tools open to you, and which ask first | No |
| `events` | Upcoming events, soonest first | No |
| `offers` | What is for sale, with live prices | No |
| `search <query>` | Search the Growth Codex, the Builder Codex and Insights | No |
| `wallet` | Your gold, emerald and diamond balances and recent history | Yes · 1 gold |
| `access` | What you have unlocked | Yes · 1 gold |
| `register <event-id>` | Register for a free event – asks y/N | Yes · 1 gold |
| `checkout <offer-key>` | Get a Stripe checkout link for an offer (keys come from `offers`) – asks y/N | Yes · 1 gold |
| `run <tool> --json '{…}'` | Any of the 17 tools | Depends on the tool |

> **Each signed-in call costs 1 gold** from your wallet – so every step a script or agent took shows in your history. Public commands are free.

## Examples

```bash
pirateskills events --limit 5
pirateskills search "landing page"
pirateskills wallet
pirateskills register 2026_09_23_ai_compass      # asks y/N first
pirateskills checkout pirate_pass                # a Stripe link, never a charge
pirateskills checkout captain_on_deck_session --quantity 3   # three sessions, one link
pirateskills checkout forge_pass --currency usd  # charged in dollars (default: your country)
pirateskills run my_bookings --json '{"timeZone": "Europe/Berlin"}'
```

## Flags and exit codes

| Flag | What it does |
| --- | --- |
| `--yes`, `-y` | Skip the y/N question before a tool that changes something |
| `--raw` | Print the JSON answer instead of the short summary |
| `--base-url <url>` | Talk to another site, e.g. a local copy (or set `PIRATESKILLS_API_URL`) |
| `--limit <n>` | With `events`, `search` and `wallet`: how many to show |
| `--type <name>` | With `events`: one series only, e.g. `--type "Pirate Lab"` |
| `--quantity <n>` | With `checkout`: several Captain on Deck sessions in one link |
| `--currency eur\|usd` | With `checkout`: pay in euros or dollars (default: your country) |

| Exit code | Means |
| --- | --- |
| `0` | Done |
| `1` | Refused, or a change you did not confirm – the message says why |
| `2` | A wrong command or input; nothing ran |
| `3` | No key, or the key was refused |
| `4` | No gold left; nothing ran |
| `5` | Too many calls this minute – wait and retry |

## For agents and scripts

- A command that changes something shows what it will do and asks y/N. `--yes` skips the question; without a terminal and without `--yes`, nothing runs.
- `--raw` gives the full JSON for a program to read.
- Your key goes only to pirateskills.com and localhost, unless `PIRATESKILLS_TRUSTED_HOST` names another host.

---
Source: https://pirateskills.com/docs/cli · All docs: https://pirateskills.com/docs.md · Short overview: https://pirateskills.com/llms.txt
