Skip to main content

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.

The Prompting Company CLI gives you terminal access to your workspace, organizations, and simulation workflows. The binary name is:
tpc

Prerequisites

  • macOS, Linux, or Windows
  • amd64 or arm64

Install

macOS and Linux

Install the latest stable release:
curl -fsSL https://cli.promptingco.com/install.sh | bash
After install, confirm the binary is available:
tpc --version

Windows

Install with winget:
winget install promptingcompany.tpc
Or install with Scoop after adding The Prompting Company bucket:
scoop bucket add promptingcompany https://github.com/promptingcompany/scoop-bucket
scoop install tpc
PowerShell is also supported:
irm https://cli.promptingco.com/install.ps1 | iex
If your execution policy blocks the installer, run this first in the same PowerShell session:
Set-ExecutionPolicy -Scope Process Bypass
Manual fallback:
  1. Download the latest tpc_<version>_windows_amd64.zip or tpc_<version>_windows_arm64.zip from https://cli.promptingco.com/tpc/<version>/.
  2. Extract tpc.exe.
  3. Move tpc.exe to a directory on PATH, or add the new directory to PATH through System Properties -> Environment Variables -> Path.
  4. Open a new PowerShell or cmd session, then verify the install:
    tpc --version
    

Update

Check whether a newer CLI build is available:
tpc update --check
Upgrade the installed binary in place:
tpc update

Install a specific version

Install a pinned version:
TPC_VERSION=0.1.0-alpha.1 curl -fsSL https://cli.promptingco.com/install.sh | bash
Install from a release channel:
TPC_CHANNEL=alpha curl -fsSL https://cli.promptingco.com/install.sh | bash

Login

Authenticate with browser-based device flow:
tpc auth login
The CLI uses the OAuth bearer path described in the API authentication guide. The flow is:
  1. tpc requests a device code.
  2. Your browser opens.
  3. You sign in to The Prompting Company.
  4. You approve the CLI.
  5. The CLI stores your session locally.
After login, verify your session:
tpc auth whoami
Logout when needed:
tpc auth logout

Non-interactive authentication

For CI, scripts, and other headless environments where browser login is not available, the CLI reads credentials from environment variables. Two schemes are supported and they map to different request headers:
VariableHeader sentUse for
TPC_API_TOKENAuthorization: Bearer <token>OAuth bearer tokens — for example, the session token issued by tpc auth login.
TPC_API_KEYx-api-key: <key>API keys created via the dashboard. See API authentication for how to create one.
# OAuth bearer token
export TPC_API_TOKEN="your-bearer-token"
tpc auth whoami

# API key
export TPC_API_KEY="your-api-key"
tpc auth whoami
If both TPC_API_TOKEN and TPC_API_KEY are set, the CLI uses TPC_API_TOKEN and prints a warning to stderr. When neither variable is set, the CLI falls back to the session created by tpc auth login.

Organizations

List organizations available to your account:
tpc org list
Switch the saved active organization:
tpc org switch prompting-co

Common commands

# Show current auth state
tpc auth whoami

# Show installed CLI version
tpc version
tpc --version

# Check for updates
tpc update --check

# Install latest update
tpc update

# List organizations
tpc org list

# Switch active organization
tpc org switch prompting-co

# List pages for the active product
tpc product switch my-product
tpc site page list

# Show simulation command help
tpc sim help

# Show environment list help without requiring auth
tpc env list -h

# List simulation environments
tpc env list

Site pages

Manage pages for the active product from the terminal. Every command is scoped to the active organization and product stored in local CLI config, and every JSON response includes the resolved scope.
Run tpc org switch <org-slug> and tpc product switch <product-slug> before any tpc site page command, or the CLI will refuse with guidance.
List pages for the active product:
tpc site page list
Filter the list (search, status, path prefix, pagination, sort):
tpc site page list \
  --query pricing \
  --status published \
  --path-prefix blog/ \
  --page 2 --page-size 10 \
  --order-by createdAt --order-dir asc
Create a page from inline markdown:
tpc site page create \
  --slug blog/hello-world \
  --title "Hello" \
  --content "# Hello"
Create a page from a local markdown file:
tpc site page create \
  --slug docs/install \
  --title "Install" \
  --content-file ./install.md
Update page fields (only the flags you pass are changed):
tpc site page update page_123 --title "Updated title"
tpc site page update page_123 --content-file ./page.md --status published
Pass an empty string to clear an optional field:
tpc site page update page_123 --redirect-url ""
tpc site page update page_123 --content ""
Soft-delete one or more pages:
tpc site page delete page_123
tpc site page delete page_123 page_456
Every command also supports --format json for scripting:
tpc site page list --format json

Simulation environment commands

Create a simulation environment:
tpc sim env create \
  --name "My Environment" \
  --agent-config '{"harness":"claude","model":"claude-sonnet-4-6"}'
Create an environment with task links and schedule:
tpc sim env create \
  --name "Test Env" \
  --agent-config @examples/agent-config.json \
  --task-ids task_123,task_456 \
  --schedule 7d

Installer URL

The public installer is served from:
https://cli.promptingco.com/install.sh
https://cli.promptingco.com/install.ps1

Troubleshooting

tpc command not found

  • Open a new shell after installation.
  • Check whether the installer added the binary directory to your PATH.
  • Run the installer again and watch for shell profile update instructions.
  • On Windows, PATH changes only apply to new PowerShell or cmd sessions.

Login completes in the browser but CLI does not update

  • Retry tpc auth login
  • complete the device flow in the same machine where the CLI is running
  • check whether your browser blocked the callback or redirected into a stale session

Update does not find a release

  • run tpc update --check
  • confirm you are on the expected channel or pinned version
  • if you installed a prerelease, make sure that prerelease metadata exists

Next step

Once installed and authenticated, you can move into product and simulation workflows from the terminal.