Skip to main content

Petabyte CLI

petabyte is the command line for the Petabyte GPU marketplace — for buyers who rent verified GPUs, for sellers who earn with their own hardware, and for anyone who wants an AI model on their machine. Install → sign in → choose buyer or seller → go.

pip install -U petabyte-client        # the command it installs is `petabyte`
petabyte login                        # sign in with your browser — no password ever touches the CLI
petabyte --me                         # your dashboard: account, wallet, what's running, agent, system

Run petabyte on its own for a guided menu, or petabyte --help for the grouped command list.

5-minute Seller Quickstart

Turn an idle GPU (or CPU) into income. On the machine you want to sell:

pip install -U petabyte-client
petabyte login                 # browser sign-in
petabyte --install-agent       # guided wizard: checks the system, mints a node key, runs the official installer
petabyte --run-agent           # starts the seller agent and follows it coming online
petabyte --me                  # watch the node, the earning rate and your wallet

The wizard checks Python, Docker, the GPU and the network first, tells you exactly what to fix if something is missing, then downloads the official installer to a file from your Petabyte host (never curl | bash), shows what it will do (it needs administrator rights: Docker, the NVIDIA container toolkit, a systemd service) and asks before running it. The node key it creates goes to the installer through the environment only — it is never printed or logged.

Later: petabyte --kill-agent stops the agent safely (it warns if a job is running), petabyte agent status / petabyte agent logs show what it is doing, petabyte earnings and petabyte node status <id> show the money and the node.

  • Linux: the agent is the petabyte-agent systemd service under /opt/petabyte-agent.
  • Windows: the same service inside the Ubuntu-24.04 WSL2 distro the installer sets up (run the install from an Administrator PowerShell).
  • macOS: the seller agent is not supported yet; buying works everywhere.

Buyer Quickstart

petabyte login
petabyte deposit 20                                   # add funds (test credit in the sandbox)
petabyte specs                                        # GPUs you can rent right now, cheapest first
petabyte launch ollama --hours 2                      # one-click app on the cheapest verified GPU
petabyte run train.ipynb --gpu "RTX 4090" --hours 1   # run a notebook / .py on a rented GPU
petabyte jobs                                         # what's running, recent bookings
petabyte ask "explain attention" --model llama3.2     # pay-per-token inference (OpenAI-compatible)

Commands

Group Command What it does
Account --me / me dashboard: identity, wallet, current workflow, agent, expected return (estimates labelled), local CPU/RAM/GPU
login browser device-flow sign-in; saves a token in ~/.petabyte/cli.json (0600)
wallet · deposit <usd> · activity balance & earnings · add funds · recent notifications
doctor diagnoses Python, network, API, account, Docker, GPU, agent — with the command to run next
Seller --install-agent guided seller setup (--sell gpu|cpu|all, --price, --dry-run, --yes)
--run-agent preflight → start the service → status panel → follow the log (--no-follow)
--kill-agent graceful stop; warns about active jobs (--force to stop anyway); idempotent
agent status|logs|install|start|stop the same as subcommands
earnings · node status <id> · node sync-models <id> payouts · one node in detail · report cached models
Buyer specs · launch <template> · run <file> · jobs rent and run
ask "<prompt>" · render · transcode · vpn <booking> inference · Blender · NVENC · WireGuard config
Models model search|info|pull|list|inspect|remove · pull <id> · run <model-id> local model hub (no account needed)
System --version · --json · --verbose · --api <url> · -y/--yes version & update status · machine-readable output · full error detail · another host · assume yes

Every subcommand keeps its full option list under petabyte <command> --help.

Output, config & environment

  • Rich terminal UI (panels, tables, spinners) on a real terminal; plain, aligned text on a pipe, in CI, under NO_COLOR=1 / PETABYTE_COLOR=never / TERM=dumb, or when rich is missing. The words are the same in both. PETABYTE_UI=plain|rich forces a renderer, PETABYTE_ASCII=1 avoids Unicode symbols, PETABYTE_NONINTERACTIVE=1 makes every prompt take its default.
  • --json (before the command) gives machine-readable output for --me, doctor, wallet, specs, earnings, jobs, activity, agent status, --version — never coloured, never chatty.
  • Update check: once a day, on an interactive terminal only, the CLI asks PyPI (1.5 s timeout) whether a newer petabyte-client exists and prints a one-line hint. It never blocks, never fails a command, and is skipped in CI or with PETABYTE_NO_UPDATE_CHECK=1. Python < 3.9 gets a clear unsupported-version message.
  • API host: --api <url> > PETABYTE_API_URL > the saved file > https://petabyte.market. PETABYTE_CONFIG=/path/cli.json isolates the saved token (CI, tests).
  • Auth: the saved token from petabyte login, or PETABYTE_TOKEN, or an account-scoped API key in PETABYTE_API_KEY (sent as X-API-KEY). petabyte ask uses an inference-scoped key.
  • Errors are written for humans — what happened, why, what to run next — with the technical detail dimmed last; --verbose adds the traceback. Secrets (tokens, keys, node keys) never appear.

When something is off

petabyte doctor

For developers

From a source checkout: python cli/petabyte.py <cmd> (the product layer lives in cli/petabyte_cli/: ui.py, version_check.py, sysinfo.py, api.py, dashboard.py, agent.py, agent_cmds.py, doctor.py, help.py, menu.py). Tests: python cli/petabyte_cli_test.py (no server), python cli/cli_ui_test.py, python cli/cli_petabyte_test.py (boots a local API). The package is built from the repo-root pyproject.toml (name = "petabyte-client", dependencies httpx, rich, tqdm; optional extra system = psutil for live CPU/RAM) and mirrored to the public repo by scripts/build_cli_package.py.

Dashboard (web)

Served by the API at / — live nodes/jobs stats, wallet + deposit, the GPU inventory with a live $/hr-vs-AWS savings column, and one-click job runs. Both the web console and the CLI need an attested, online seller node (run the agent) to actually execute jobs.

Release files for petabyte-client 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petabyte-client 0.3.1
File Size Uploaded
petabyte_client-0.3.1.tar.gz 95.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for petabyte-client 0.3.1
File Interpreter ABI Platform
petabyte_client-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 201.3 kB

Release files / petabyte_client-0.3.1.tar.gz

Download URL petabyte_client-0.3.1.tar.gz
Size 95.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d067e5b9c1fde4d213d9231693478fb22cd7b171bfba89600d78491cd73b8ba9
BLAKE2b-256 checksum
How to use checksums
443168bb5b8f2b9b8cbdeb53919d03f7626f91c8eb0a4263f224e15af4347fd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / petabyte_client-0.3.1-py3-none-any.whl

Download URL petabyte_client-0.3.1-py3-none-any.whl
Size 105.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1efc54b32c381530f22ea1d4299bc389156b6efdd072fea7f416021c05fcbe9c
BLAKE2b-256 checksum
How to use checksums
974b805ded0211f0fd88c0503125763d67ea77cebb7b62034019c1fdac6186b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page