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

# Rust canary

> Try the experimental Rust CLI while keeping stable TPC available.

# Rust canary

The Rust CLI is an experimental v0.2.0 release with a small command set. The ordinary installer continues to select the stable Go CLI.

Canaries target **Apple Silicon macOS** and **Linux x86-64 with glibc**. Native CI runs on macOS 15 and Ubuntu 24.04. Alpine and other musl-based distributions are not supported. Use stable TPC on Intel Macs, ARM Linux, and Windows until those canary builds are available.

## Install the latest canary

```bash theme={null}
curl -fsSL https://cli.promptingco.com/install.sh | TPC_VERSION=canary-latest bash
tpc --format json version
```

The version output identifies the concrete build, the source commit, and `implementation: rust`. The selector `canary-latest` follows the newest successfully published canary. If no canary is available, installation fails with an error and preserves the existing executable.

> [!NOTE]
>
> This command uses the normal `tpc` installation location and can replace a stable executable. Put the environment variable before `bash`, as shown.

## Keep stable and canary installed together

Choose a separate installation directory:

```bash theme={null}
curl -fsSL https://cli.promptingco.com/install.sh | \
  TPC_VERSION=canary-latest TPC_INSTALL_DIR="$HOME/.tpc/canary/bin" bash

"$HOME/.tpc/canary/bin/tpc" --version
"$HOME/.tpc/canary/bin/tpc" auth whoami
```

Use the full path to select the canary. Your normal `tpc` command continues using its existing installation.

## Supported commands

The foundation includes version/help, authentication, organization and product reads, and canary updates. Use `tpc --help` and each command's `--help` for the installed build's supported flags.

```bash theme={null}
tpc auth login
tpc auth whoami
tpc org list
tpc product list --scope acme
tpc product get --scope acme/widget
tpc update --check
```

The canary supports `--format text` and `--format json`. Commands that are not implemented return an error. Local Nanocodex agent mode, simulations, content mutations, and full Go command parity are later milestones.

With an API key, `product get` returns the selected product's listing fields and omits description. Bearer authentication also retrieves the product detail endpoint.

### Authentication and scope

The canary reads the existing TPC login configuration. `TPC_CONFIG_PATH` overrides its location; otherwise an existing `~/.tpc/config.toml` takes precedence over `~/.tpc/config.json`. Logging out or replacing saved credentials affects both implementations when they share this file. Set `TPC_CONFIG_PATH` to a separate file for an independent login.

Credential precedence is `--token`, `TPC_API_TOKEN`, `TPC_API_KEY`, then the saved token. API keys and session tokens keep their respective authentication headers.

Pass `--scope <organization-slug>/<product-slug>` for a product, or `--scope <organization-slug>` when only an organization is needed. Dashboard URLs are also accepted. The selection is not saved in the login configuration.

## Update or pin a build

The Rust updater stays on the canary channel:

```bash theme={null}
tpc update --check
tpc update
```

For a reproducible install, copy the concrete version from `tpc version` or the build's installation instructions:

```bash theme={null}
curl -fsSL https://cli.promptingco.com/install.sh | \
  TPC_VERSION=0.2.0-canary.123.1.gabc1234 bash
```

The version above is an example. Each published version is immutable. Installing an earlier version is also the rollback path. A leading `v` is accepted for pinned versions.

To return the normal installation to stable Go:

```bash theme={null}
curl -fsSL https://cli.promptingco.com/install.sh | bash
```

An installation in a custom directory remains there until you remove it or install another version into that directory.


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