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

# Install the Tiro CLI in your agent

> A prompt that tells your agent to install the Tiro CLI and sign you in.

Paste the prompt below into any coding agent that can run shell commands. It installs the CLI, signs you in with OAuth, and checks the connection.

**Recommended Node.js for security**  ·  22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+ (26.x)  ·  macOS, Linux, or Windows  ·  a shell the agent can run commands in

These security-patched versions are recommended independently of the current npm package installation requirements.

## Copy this prompt

```text The Tiro CLI install prompt theme={"system"}
Install the Tiro CLI in this environment and sign me in.

  Package    :  @theplato/tiro-cli
  Recommended Node for security:
                22.23.4+ (22.x), 24.22.1+ (24.x), or 26.12.1+ (26.x)
  Platforms  :  macOS, Linux, Windows
  Auth       :  OAuth (Authorization Code + PKCE) — opens a browser
                and stores the token in the OS keychain.

Before installing, run `node --version`. Proceed only with Node.js
22.x at 22.23.4 or later, 24.x at 24.22.1 or later, or 26.x at
26.12.1 or later. If Node.js is missing or outside all three ranges,
install or update to one of these security-patched versions first.
These are security recommendations, separate from npm package engines.

Steps:
  1. Install globally with whichever package manager is already in
     use here. For npm, that is:
       npm install -g @theplato/tiro-cli
     (Use pnpm / yarn / bun equivalents if those are the active
     package manager — do not switch tooling.)
  2. Verify the install:
       tiro --version            # expect 0.6.4 or later (OAuth login requires 0.6.4+)
  3. Sign me in:
       tiro auth login           # opens a browser for OAuth
  4. Confirm the session:
       tiro auth status          # shows user + token prefix only

If this is a headless / CI / sandboxed environment without a browser,
do not run `tiro auth login`. Instead, ask me for a TIRO_TOKEN value
and export it for subsequent commands:

  export TIRO_TOKEN="<paste-token-here>"

When everything is connected, run:

  tiro notes list --limit 3 --json

and show me the output to prove the CLI is working. If any step
fails, show the exact command, the exit code, and the error — do
not retry silently.
```

> [!TIP]
>
> The prompt tells the agent to use the package manager your project already uses.

## What your agent will do

1. Detect your package manager (npm / pnpm / yarn / bun) and install `@theplato/tiro-cli` globally.
2. Verify the binary is on `PATH` by running `tiro --version`.
3. Run `tiro auth login` — your browser opens for OAuth. The bearer token is stored in the OS-native keychain (Keychain / Secret Service / Credential Manager).
4. Confirm the connection with `tiro auth status` and `tiro notes list --limit 3 --json`.

In a headless environment, the agent pauses on step 3 and asks you for a `TIRO_TOKEN` instead — see [Headless, CI, and agent environments](https://docs.tiro.ooo/en/developers/cli/setup.md#headless-ci-and-agent-environments) for how to mint one.

## Privacy & token handling

* OAuth tokens are stored in the OS-native credential store. The full bearer never appears on stdout — only a prefix like `tk__...***`.
* `TIRO_TOKEN`, if set, overrides the keychain — useful for CI secrets, dangerous if it leaks into shell history.
* Rotate by running `tiro auth logout && tiro auth login` on a trusted machine, then update the secret store.

***

Prefer to install it yourself?  → [Manual install & auth](https://docs.tiro.ooo/en/developers/cli/setup.md)   ·   [Quickstart scenarios](https://docs.tiro.ooo/en/developers/cli/quickstart.md)   ·   [Agent guide](https://docs.tiro.ooo/en/developers/cli/agent-guide.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.