# CLI reference The binary is `harebox`. Tables on a terminal, **JSON when piped**, and JSON Lines for streams. `harebox help --json` prints this as data. | Exit code | Means | |---:|---| | 0 | Success | | 2 | Usage | | 3 | Auth | | 4 | Not found | | 5 | Wrong state | | 6 | Limit or budget | | 7 | Capacity | | 8 | Network | `harebox exec` returns the remote command's own exit code. | Command | What it does | |---|---| | `harebox whoami` | [Get the current identity](api/getMe.html) | | `harebox org list` | [List organizations](api/listOrgs.html) | | `harebox org new` | [Create an organization](api/createOrg.html) | | `harebox org set` | [Update organization settings](api/updateOrg.html) | | `harebox org switch` | [Set the active organization](api/setActiveOrg.html) | | `harebox org members` | [List members](api/listMembers.html) | | `harebox org invite` | [Invite a member](api/inviteMember.html) | | `harebox org member set` | [Change a member's role or caps](api/updateMember.html) | | `harebox org remove` | [Remove a member](api/removeMember.html) | | `harebox project list` | [List projects](api/listProjects.html) | | `harebox project new` | [Create a project](api/createProject.html) | | `harebox project set` | [Update a project](api/updateProject.html) | | `harebox project rm` | [Delete an empty project](api/deleteProject.html) | | `harebox login --agent` | [Register an agent without a pasted key](api/registerAgent.html) | | `harebox limits` | [Get limits and what remains](api/getLimits.html) | | `harebox rates` | [Get the public rate card](api/getRates.html) | | `harebox regions` | [Show the EU region](api/listRegions.html) | | `harebox harnesses` | [List harnesses and models](api/listHarnesses.html) | | `harebox data-retention status` | [Get the retention policy](api/getRetention.html) | | `harebox data-retention set` | [Update the retention policy](api/updateRetention.html) | | `harebox deletion status` | [Get a deletion operation](api/getDeletion.html) | | `harebox op` | [Get any long-running operation](api/getOperation.html) | | `harebox audit` | [Read the audit log](api/listAuditLog.html) | | `harebox repo list` | [List connected repositories](api/listRepos.html) | | `harebox repo add` | [Connect a repository](api/selectRepo.html) | | `harebox api-key list` | [List API keys](api/listApiKeys.html) | | `harebox api-key new` | [Create a scoped API key](api/createApiKey.html) | | `harebox api-key set` | [Edit a key's name, scopes, IP allowlist or budget](api/updateApiKey.html) | | `harebox api-key revoke` | [Revoke an API key](api/revokeApiKey.html) | | `harebox api-key rotate` | [Rotate an API key with an overlap window](api/rotateApiKey.html) | | `harebox api-key usage` | [Get usage of an API key](api/getApiKeyUsage.html) | | `harebox webhook list` | [List webhooks](api/listWebhooks.html) | | `harebox webhook new` | [Create a webhook](api/createWebhook.html) | | `harebox webhook info` | [Get a webhook](api/getWebhook.html) | | `harebox webhook set` | [Update a webhook](api/updateWebhook.html) | | `harebox webhook rm` | [Delete a webhook](api/deleteWebhook.html) | | `harebox webhook rotate` | [Rotate the signing secret with an overlap window](api/rotateWebhookSecret.html) | | `harebox webhook deliveries` | [List delivery attempts](api/listDeliveries.html) | | `harebox webhook redeliver` | [Redeliver an event](api/redeliver.html) | | `harebox webhook test` | [Send a signed test event](api/testWebhook.html) | | `harebox events types` | [List every event type and schema URL](api/listEventTypes.html) | | `harebox events` | [Read account events with a cursor](api/listOrgEvents.html) | | `harebox events --follow` | [Stream account events over SSE](api/streamOrgEvents.html) | | `harebox telemetry` | [Get the OpenTelemetry export](api/getTelemetry.html) | | `harebox telemetry set` | [Set the OpenTelemetry export](api/setTelemetry.html) | | `harebox telemetry rm` | [Remove the OpenTelemetry export](api/deleteTelemetry.html) | | `harebox ci` | [Get CI status and connected accounts](api/getCi.html) | | `harebox ci connect` | [Connect a GitHub account or org](api/connectCi.html) | | `harebox ci public` | [Set the policy for public repositories](api/setCiPublic.html) | | `harebox ci job` | [Get a CI job](api/getCiJob.html) | | `harebox ci logs` | [Read CI job logs](api/getCiJobLogs.html) | | `harebox ai profiles` | [List credential profiles](api/listCredentialProfiles.html) | | `harebox ai profile new` | [Create a credential profile](api/createCredentialProfile.html) | | `harebox ai profile set` | [Rename a profile or make it the default](api/updateCredentialProfile.html) | | `harebox ai profile rm` | [Delete a credential profile](api/deleteCredentialProfile.html) | | `harebox ai key set` | [Set an API key](api/setCredentialKey.html) | | `harebox ai key rm` | [Remove a credential](api/deleteCredentialKey.html) | | `harebox ai accounts` | [List accounts of a credential](api/listCredentialAccounts.html) | | `harebox ai account add` | [Add another key to a credential](api/addCredentialAccount.html) | | `harebox ai account switch` | [Switch to another account](api/switchCredentialAccount.html) | | `harebox ai account rm` | [Forget an account](api/forgetCredentialAccount.html) | | `harebox ai api set` | [Set a custom API](api/setCustomApi.html) | | `harebox ai api rm` | [Remove a custom API](api/deleteCustomApi.html) | | `harebox proxy` | [Get the credentials proxy](api/getProxy.html) | | `harebox proxy set` | [Configure the credentials proxy](api/setProxy.html) | | `harebox proxy rules` | [List secret-injection rules](api/listProxyRules.html) | | `harebox proxy rule add` | [Add a rule binding a secret to host](api/createProxyRule.html) | | `harebox proxy rule rm` | [Remove a rule](api/deleteProxyRule.html) | | `harebox vault list` | [List vault connections](api/listVaults.html) | | `harebox vault connect` | [Connect an external vault](api/createVault.html) | | `harebox vault rm` | [Disconnect a vault](api/deleteVault.html) | | `harebox ai usage` | [Get AI usage](api/getAiUsage.html) | | `harebox ai usage ID` | [Get AI usage of a sandbox](api/getSandboxAiUsage.html) | | `harebox ai block` | [Block or allow AI access or set a budget](api/setSandboxAiAccess.html) | | `harebox secrets` | [Get the account secrets setup](api/getSecretsSetup.html) | | `harebox secrets set` | [Update the account secrets setup](api/updateSecretsSetup.html) | | `harebox env list` | [List environments](api/listEnvironments.html) | | `harebox env new` | [Create an environment](api/createEnvironment.html) | | `harebox env set` | [Update an environment and make a new version](api/updateEnvironment.html) | | `harebox env rm` | [Delete an environment](api/deleteEnvironment.html) | | `harebox env upgrade` | [Move running sandboxes to a version](api/upgradeEnvironment.html) | | `harebox env var set` | [Set a variable](api/setEnvironmentVar.html) | | `harebox env var rm` | [Remove a variable](api/deleteEnvironmentVar.html) | | `harebox env file set` | [Write a secret file](api/setEnvironmentSecretFile.html) | | `harebox env file rm` | [Remove a secret file](api/deleteEnvironmentSecretFile.html) | | `harebox env repo add` | [Add a repository](api/addEnvironmentRepo.html) | | `harebox env repo rm` | [Remove a repository](api/deleteEnvironmentRepo.html) | | `harebox list` | [List sandboxes](api/listSandboxes.html) | | `harebox new` | [Create a sandbox, optionally from a template, and optionally queue it](api/createSandbox.html) | | `harebox new --count` | [Create many sandboxes in one call](api/createSandboxBatch.html) | | `harebox info` | [Get a sandbox](api/getSandbox.html) | | `harebox set` | [Update name, labels, deadline, sleep policy or subdomain](api/updateSandbox.html) | | `harebox delete` | [Delete a sandbox and erase its data](api/deleteSandbox.html) | | `harebox sleep` | [Sleep now and keep memory](api/sleepSandbox.html) | | `harebox wake` | [Wake a sleeping sandbox](api/wakeSandbox.html) | | `harebox stop` | [Save the disk and release the machine](api/stopSandbox.html) | | `harebox stop --status` | [Get a stop](api/getStop.html) | | `harebox resume` | [Resume a stopped or failed sandbox](api/resumeSandbox.html) | | `harebox fork` | [Fork a running or stopped sandbox](api/forkSandbox.html) | | `harebox resize` | [Change size live where possible](api/resizeSandbox.html) | | `harebox restore` | [Restore to a point in time](api/restoreSandbox.html) | | `harebox recover` | [Restart a machine that does not answer](api/recoverSandbox.html) | | `harebox share` | [Share with the organization](api/shareSandbox.html) | | `harebox unshare` | [Make private](api/unshareSandbox.html) | | `harebox usage` | [Get the exact bill of a sandbox](api/getSandboxUsage.html) | | `harebox metrics` | [Get CPU](api/getSandboxMetrics.html) | | `harebox exec` | [Run a command: wait, stream or detach](api/runCommand.html) | | `harebox history` | [List the command history](api/listCommands.html) | | `harebox exec --status` | [Get a command](api/getCommand.html) | | `harebox exec --kill` | [Signal or stop a command](api/signalCommand.html) | | `harebox attach` | [Attach to a command over SSE](api/streamCommand.html) | | `harebox logs` | [Read command logs](api/getCommandLogs.html) | | `harebox ps` | [List processes](api/listProcesses.html) | | `harebox file read` | [Read a file](api/readFile.html) | | `harebox file write` | [Write a file](api/writeFile.html) | | `harebox file rm` | [Delete a file](api/deleteFile.html) | | `harebox file ls` | [List a directory](api/listFiles.html) | | `harebox file stat` | [Get file details](api/statFile.html) | | `harebox file find` | [Search files by name](api/searchFiles.html) | | `harebox file grep` | [Find text in files](api/grepFiles.html) | | `harebox file mkdir` | [Create a directory](api/makeFolder.html) | | `harebox file mv` | [Move or rename](api/moveFile.html) | | `harebox file chmod` | [Set permissions](api/chmodFile.html) | | `harebox file replace` | [Replace text in files](api/replaceInFiles.html) | | `harebox file url` | [Get a signed download URL](api/createDownloadUrl.html) | | `harebox file url --upload` | [Get a signed upload URL](api/createUploadUrl.html) | | `harebox pull` | [Download a file or folder as an archive](api/downloadArtifact.html) | | `harebox prompt` | [Prompt a harness](api/createPrompt.html) | | `harebox prompt --status` | [Get a prompt](api/getPrompt.html) | | `harebox conversations` | [List conversations](api/listConversations.html) | | `harebox events ID` | [Read sandbox and agent events with a cursor](api/listAgentEvents.html) | | `harebox events ID --follow` | [Stream sandbox and agent events over SSE or WebSocket](api/streamAgentEvents.html) | | `harebox steer` | [Steer a running turn](api/steerAgent.html) | | `harebox interrupt` | [Interrupt running work](api/interruptAgent.html) | | `harebox desktop` | [Get a desktop stream URL](api/createDesktop.html) | | `harebox record start` | [Start a screen recording](api/createRecording.html) | | `harebox record list` | [List recordings](api/listRecordings.html) | | `harebox record stop` | [Stop a recording](api/stopRecording.html) | | `harebox computer` | [Screenshot, click, type or scroll](api/computerAction.html) | | `harebox host list` | [List public endpoints](api/listEndpoints.html) | | `harebox host` | [Expose a port](api/createEndpoint.html) | | `harebox host set` | [Change auth, domain or title](api/updateEndpoint.html) | | `harebox host hide` | [Stop exposing a port](api/deleteEndpoint.html) | | `harebox host rotate` | [Rotate a URL token atomically](api/rotateEndpointToken.html) | | `harebox ssh-key add` | [Authorize an SSH key](api/addSshKey.html) | | `harebox tunnel` | [Open a byte stream to a port inside a sandbox, over WebSocket: what SSH, SCP and port forwarding use](api/openTunnel.html) | | `harebox firewall` | [Get host-enforced firewall rules](api/getFirewall.html) | | `harebox firewall set` | [Replace firewall rules](api/setFirewall.html) | | `harebox ip list` | [List reserved IPs](api/listStaticIps.html) | | `harebox ip reserve` | [Reserve an IP](api/reserveStaticIp.html) | | `harebox ip attach` | [Attach an IP to a sandbox](api/attachStaticIp.html) | | `harebox ip release` | [Release an IP](api/releaseStaticIp.html) | | `harebox domain list` | [List custom domains](api/listDomains.html) | | `harebox domain add` | [Add a custom domain](api/addDomain.html) | | `harebox domain rm` | [Remove a custom domain](api/deleteDomain.html) | | `harebox mesh list` | [List private meshes](api/listMeshes.html) | | `harebox mesh new` | [Create a private mesh](api/createMesh.html) | | `harebox mesh rm` | [Delete a private mesh](api/deleteMesh.html) | | `harebox snapshots` | [List snapshots](api/listAllSnapshots.html) | | `harebox snapshots ID` | [List snapshots of a sandbox](api/listSnapshots.html) | | `harebox snapshot` | [Take a disk or memory snapshot now](api/createSnapshot.html) | | `harebox snapshot rm --all` | [Delete all snapshots of a sandbox](api/deleteSandboxSnapshots.html) | | `harebox snapshot latest` | [Get the latest snapshot](api/getLatestSnapshot.html) | | `harebox snapshot rm` | [Delete a snapshot](api/deleteSnapshot.html) | | `harebox snapshot tree` | [Browse a snapshot](api/getSnapshotTree.html) | | `harebox snapshot get` | [Download a file or folder from a snapshot](api/getSnapshotFile.html) | | `harebox snapshot pull` | [Get a signed archive URL](api/getSnapshotDownload.html) | | `harebox template list` | [List templates](api/listTemplates.html) | | `harebox template save` | [Save a sandbox as a new template version](api/createTemplate.html) | | `harebox template info` | [Get a template and its versions](api/getTemplate.html) | | `harebox template rm` | [Delete a template or a version](api/deleteTemplate.html) | | `harebox template shares` | [List share codes](api/listTemplateShares.html) | | `harebox template share` | [Create a share code](api/createTemplateShare.html) | | `harebox template unshare` | [Revoke a share code](api/revokeTemplateShare.html) | | `harebox fleet list` | [List fleets](api/listFleets.html) | | `harebox fleet new` | [Create a fleet](api/createFleet.html) | | `harebox fleet info` | [Get a fleet](api/getFleet.html) | | `harebox fleet set` | [Change a fleet or scale it](api/updateFleet.html) | | `harebox fleet rm` | [Delete a fleet and its sandboxes](api/deleteFleet.html) | | `harebox fleet prompt` | [Send one prompt to every member](api/promptFleet.html) | | `harebox schedule list` | [List wake timers and schedules](api/listSchedules.html) | | `harebox schedule new` | [Create a wake timer or schedule](api/createSchedule.html) | | `harebox schedule rm` | [Delete a schedule](api/deleteSchedule.html) | | `harebox billing` | [Get the plan](api/getPlan.html) | | `harebox billing plan` | [Change the plan](api/setPlan.html) | | `harebox wallet` | [Get the wallet](api/getWallet.html) | | `harebox wallet quote` | [Quote a top-up with its bonus](api/quoteWallet.html) | | `harebox wallet pay` | [Add money to the wallet](api/payWallet.html) | | `harebox wallet auto-top-up` | [Set auto top-up](api/setAutoTopUp.html) | | `harebox billing card` | [Add a payment card](api/addCard.html) | | `harebox billing invoices` | [List invoices](api/listInvoices.html) | | `harebox usage --all` | [Get usage by project, fleet, label, member or size](api/getUsage.html) | | `harebox usage export` | [Export usage per sandbox, with labels, as CSV or JSON Lines](api/exportUsage.html) | | `harebox budget list` | [List budgets](api/listBudgets.html) | | `harebox budget new` | [Create a hard or soft dollar budget](api/createBudget.html) | | `harebox budget set` | [Change a budget](api/updateBudget.html) | | `harebox budget rm` | [Delete a budget](api/deleteBudget.html) | | `harebox reserve list` | [List reservations](api/listReservations.html) | | `harebox reserve new` | [Commit to capacity for one year](api/createReservation.html) | | `harebox copilot forecast` | [Forecast this month](api/getForecast.html) | | `harebox copilot` | [List savings recommendations with evidence](api/listRecommendations.html) | | `harebox copilot apply` | [Apply a recommendation](api/applyRecommendation.html) | **Local commands:** `login`, `logout`, `push`, `browser`, `doctor`, `completion`, `version`, `self-update` (checks the download's SHA-256), `run` (one command in a fresh sandbox, then delete it), `ssh`, `scp`, `forward`, `ssh-config` and `tunnel` (see [SSH and editors](../guides/ssh.html)).