Use the CLI quickstart for installation, authentication and your first read. This page covers generally available commands and selected previews. For the full list of preview commands and flags, including training, taskA specific item a contributor claims or enters packages, transfers, seller operations, and DSA, run hbd --help --json. Focused guides cover local MCP, exports and quality review.
Read operation availability and compatibility before using a command. Help describes the installed client; it does not prove that the target server has deployed an operation.
Campaign delivery preview. Production availability is unverified. Before following an example, check that your installed hbd --help --json lists its command and flags. For server operations, also check the target environment’s capabilities and your grants with hbd capabilities --json.
Marketplace dataset seller preview
The Marketplace dataset seller workflow is a development preview and has not been released to production users. It requires CLI 0.1.0-beta.8 or later (preview) and a matching server deployment. Check your build and its preview markers with hbd --version and hbd --help --json.
Seller operations use the organizationThe Developer-side unit that holds Campaigns, data access, and funds session approved when you signed in. Reads, draft editing and review-submissionThe record created when work is submitted tools can use that session through local stdio MCP. Upload, upload recovery, page commit and automatic-acceptance settings require a person at the terminal; the hosted organization API Key MCP does not offer these tools. New uploads wait for approval of the upload statement, without sending file contents while waiting.
For existing datasets, saving a draft, platform review and publication return separate states. After approval, check the publication outcome. Personally confirm a presentation draft in the Portal before committing its fixed revision. If a write's outcome is uncertain, inspect its receipt using the original operation and request key before deciding what to do next.
For a public listing backed by an upload, prepare a sample before submitting it for review. Run hbd datasets reviews get <dataset-id> --json to read the current data.snapshot.snapshot_id. In the draft edit JSON, set file_sample to {"mode":"automatic","paths":[],"expected_content_snapshot_id":"<snapshot-id>"}. Use hbd listings draft save <dataset-id> --file sample.json --idempotency-key <key> and check that the saved sample revision names the same snapshot. For a manual file selection, use mode manual and list paths from that snapshot. If the source changes, read the new snapshot before preparing another sample.
Use expected_snapshot_id and expected_listing together in the JSON for hbd datasets reviews submit. Include the saved file_sample in the reviewed listing. The review then uses that exact listing and snapshot. Read the review afterwards to check its sample revision and publication status.
Marketplace holdings and Deals preview
In a build and environment that support these preview commands, sign in to the Developer organization whose holdings or Deals you want to read.
hbd marketplace holding list— Current licensed dataset versions for this organization.hbd marketplace holding show <grant-version-id>— The exact grant and grant version IDs to use for an eligible bundle download.hbd marketplace holding metrics— This UTC month's usage and spend by subscription.hbd marketplace deal list— Deals in which the organization is a buyer or seller.hbd marketplace deal show <deal-id>— The current formal offer and a link to that Deal in the Developer Portal.hbd marketplace deal history <deal-id>— Submitted buyer requests and seller offer revisions.
Deal lists and history take --cursor from the previous page. With --json the continuation is data.next_cursor. Select the same Developer organization in the Portal before acting on the offer. Its ID is in data.portal_organization_id.
Discover this build before using it
The CLI uses the public service by default. Sign in through the browser before using your organization.
hbd --version
hbd --help --json
hbd auth login
hbd config profiles list --jsonThe JSON help inventory and profile commands make no network request. Check your current profile before changing a configured destination.
Use hbd auth login for the supported browser sign-in flow, or provide an authorized organization key through HB_API_KEY as described below. Then run:
hbd auth status
hbd auth whoami --json
hbd capabilities --jsonCheck the selected organization and granted capabilities. A key supplied through HB_API_KEY takes precedence over a saved session. A configured destination with a mismatched API origin is refused.
Choose a credential
A person can use hbd auth login on a supported build to approve a sign-in in the browser. The resulting CLI session has narrower authority than a full portal session. For unattended automation, supply an organization API Key through the runtime's secret mechanism as HB_API_KEY or --token-stdin. Do not place the Key in a command line, repository, profile, or agent prompt. Keys and browser sessions are different credentials with different permissions.
The server still decides whether the selected credential can read or change a particular CampaignA developer's data-production project and its settings. A capability in a local help listing is not proof of a grant. A 403 calls for hbd auth whoami --json, a check of the active organization, and review of that Campaign's permissions—not a broader retry with another person's credential.
Read first and check the result
For a read-only starting point, list the Campaigns visible to the selected identity:
hbd campaign list --limit 5 --jsonThe machine response is one JSON envelope on standard output. Check its error.code and the process exit code; progress goes to standard error. An empty data.items means no Campaign was visible in that scope. If data.has_more is true, pass the returned data.next_cursor as --cursor for the next page. --all deliberately walks multiple pages, so use it only when that larger read is intended.
| Exit code | Meaning |
|---|---|
0 | The command met its completion rule; a receipt read can still report a failed write. |
1 | The request completed, but the command's completion rule did not hold: a document that fails validation, a plan that cannot be applied, or a campaign records pull --all export that stopped early. |
2 | Invalid command arguments or a malformed request. |
3 or 4 | Missing credential or insufficient permission. |
5 | Conflict or outcome requiring a person's decision. |
6 | Transient failure, or output that could not be delivered; follow the command's retry guidance. |
7–10 | Backend failure, spend limit, wait timeout, or contract mismatch; inspect error.code. |
130 | Interrupted. |
When you finish with a browser session, use hbd auth logout. hbd auth sessions list and hbd auth sessions revoke let you inspect and revoke saved sessions; an API Key is managed separately by its organization.
Choose a list output format
If the command help lists --plain, add it to hbd campaign list or hbd campaign version list <campaign-id> to write tab-separated rows without a header. Each line is one row. Campaign columns are ID, status, and name. Version columns are number, state, full spec hash, source, and creation time. An empty field means the value is absent.
In humanbased@0.1.0 and humanbased@0.1.0-beta.10, the first column of both Contributor lists is the public campaign_uid. If it is missing, the CLI uses campaign_id. If both are missing, the column is empty.
hbd contributor campaigns list --plainwrites campaign ID, name, publisher name, and enrollment status.hbd contributor work list --plainwrites campaign ID, step key, claimable count, queue state, active run ID, blocked reason, capped-count flag, and creates-on-claim flag. The last two fields aretrueorfalsewhen reported by the server and empty when absent. Use them to interpret the count before trying to claim work.
To read a field, split the line at literal tabs, wrap the field in double quotes, and decode it as a JSON string. This recovers escaped tabs, newlines, quotes, and backslashes. Pagination hints go to standard error. Use --quiet to suppress progress counters while keeping warnings and continuation hints. Choose one of --plain, --json, and --details when the command offers them.
In CLI versions whose help lists these options, every list takes --limit <n>, --all, --plain and --details. --limit caps returned rows, or sets the page size when supported. --all follows available pages to a disclosed safety cap; newest-window endpoints instead report the maximum window and unknown completeness. Whole-list and newest-window reads refuse --all together with --limit.
Commands for Campaign writes and launch
Campaign-file changes (create and apply) follow the same order: write a candidate file, validate it, plan it, then apply it under a request key you choose. Each command below wraps the Campaign API operation for that step; that page carries the request, receipt, and error contract. Launch, pause and resume, details changes, and submission decisions have their own flows below.
| Step | Command | Grant |
|---|---|---|
| Save the Campaign File structure for an editor | hbd schema campaignfile --out campaign.schema.json | — |
| Start a candidate around a template | hbd campaign init --template <template-id> --out campaign.json | campaign:read |
| Start from an existing version | hbd campaign init --from-version <campaign-id> --out campaign.json | campaign:read |
| Validate the candidate | hbd campaign validate --file campaign.json | campaign:author |
| Plan a new Campaign | hbd campaign plan --create --file campaign.json --out plan.json | campaign:author |
| Plan a change to a Campaign | hbd campaign plan <campaign-id> --file campaign.json --out plan.json | campaign:author and campaign:read |
| Create the Campaign | hbd campaign create --file campaign.json --plan plan.json --idempotency-key <your-key> | campaign:author |
| Apply the change | hbd campaign apply <campaign-id> --file campaign.json --plan plan.json --idempotency-key <your-key> | campaign:author |
| Propose a launch | hbd campaign launch propose <campaign-id> | campaign:launch |
| Read the proposal back, and whether a person confirmed it | hbd campaign launch show <proposal-id> | campaign:launch |
| Run a confirmed launch | hbd campaign launch execute --proposal <proposal-id> --idempotency-key <your-key> | campaign:launch |
| Propose adding organization funds to a campaign budget | hbd campaign budget propose <campaign-id> --add-usd <amount> | campaign:launch |
| Execute a budget increase approved by the campaign owner | hbd campaign budget execute --proposal <proposal-id> --idempotency-key <your-key> | campaign:launch |
| Withdraw this credential’s unexecuted budget increase proposal | hbd campaign budget withdraw --proposal <proposal-id> | campaign:launch |
For the organization top-up preview, hbd billing topup create --amount-cents 2000 --file bill-to.json --idempotency-key topup-example-01 creates a USD 20 checkout using your billing identity file. Keep the checkout session ID, complete payment in Stripe, then run hbd billing topup show <session-id> to check whether the organization received the credit.
schema campaignfile works offline without a credential and can print the JSON Schema without --out. It describes the candidate's structure for an editor; it does not check Campaign rules. After editing, use campaign validate --file for the server's verdict.
An unsupported spec_version stops candidate commands locally with INVALID_ARGUMENT (exit 2), before contacting the API. Check hbd schema campaignfile for the supported version, correct the file, then run campaign validate for the server's rules.
A starter written by init --template leaves every value you must decide, such as the budget, the reward, and the caps, as a <DECIDE: …> placeholder. Replace each one before you validate. The CLI refuses to send a file that still contains a placeholder and exits 1 with PLACEHOLDERS_UNANSWERED.
validate and plan change nothing. Both exit 1 when the candidate is invalid or cannot be applied, so a script can stop there. When a plan cannot be applied, plan lists the file's own checks apart from the checks against this Campaign. plan --out saves the reviewed change set; create --plan and apply --plan re-plan before writing and refuse with PLAN_DRIFTED when the file or the base has changed since the review.
--idempotency-key names one write. Re-sending the same key with the same request never writes twice: the server answers with the first attempt's outcome. Choose a new key for a different change.
For an apply whose response was lost, inspect the original request key:
# Campaign-file apply (the default action)
hbd campaign actions inspect --idempotency-key <your-key> --json
# Template apply
hbd campaign actions inspect --idempotency-key <your-key> --action template.apply --jsonThe lookup searches one action at a time. Without --action it looks for campaignfile.apply, so a template apply needs --action template.apply; otherwise it reports no receipt, or the result of a different write that used the same request key. This lookup covers Campaign-file and template applies, submission decisions with --action submission.decide or --action submission.override, a pause or resume with --action campaign.pause or --action campaign.resume, a details write with --action campaign.details.update, and a dataset import with --action campaign.inputs.import. It does not cover launch; for a lost launch response, resend the identical launch intent under the same idempotency key so the server can replay its first result. uncertain is an unresolved outcome requiring human review of the receipt steps and Campaign state, not a reason to try a new key.
Launching commits the Campaign’s budget.
- Run
hbd campaign launch propose <campaign-id>. Use an organization API Key withcampaign:launch, or, where signed-in launch is enabled, sign in withhbd auth loginand select the organization where you own the Campaign. The signed-in route uses your current account permissions. - Open the confirmation page in the Developer Portal. If the browser does not open automatically, use the link printed by the CLI or returned as
data.confirmation_urlwith--json. The Campaign owner checks the Campaign, draft version, and USD amount, then selects Confirm this launch. - With the same credential that made the proposal, run
hbd campaign launch execute --proposal <proposal-id> --idempotency-key <request-key>. If the execution response is lost, retry with the same proposal and request key to recover the receipt.
A confirmed non-paying Campaign can launch with a zero budget. If its reward terms cannot be verified or the workflow pays contributors, set a budget before launching.
Try an acceptance check on a sample
An organization API Key with campaign:author can run a dry run for a Campaign in its grant, as can a signed-in editor or owner.
The accept step scores each submission with a list of checks or an audit script. Before you write one into the Campaign File, you can try it on a sample submission and see whether it passes. It runs through the evaluator the Developer portal's Try it on a sample submission uses, which is the one the accept step runs after launch, so a sample that passes here passes there.
| What to try | Command | Grant |
|---|---|---|
| A list of checks | hbd campaign checks dry-run <campaign-id> --checks checks.json --sample sample.json | campaign:author |
| An audit script | hbd campaign checks dry-run <campaign-id> --script audit.py --sample sample.json | campaign:author |
--checks names a JSON array written as the accept step's params.acceptance.checks; --script names an audit script, the step's params.acceptance.script. A dry run tries one of the two. --sample names a JSON object holding the sample submission's fields, such as {"tx_hash": "0x9f2c…", "amount": 12}. --min-rating is the lowest score that passes (1–5), the step's minRatingToAccept; without it the pass mark is 5.
A dry run scores only the check and the sample you give it, and it neither reads nor changes the Campaign. The result gives the rating, the pass mark, the reason, and for each check whether it passed and what it found. A rejected sample is a result too: the command still exits 0, and data.accepted says whether it passed. A check that calls a vision model, an agent or a chain makes that call on every dry run, as it does in the portal.
A signed-in terminal needs the editor or owner role on the Campaign and membership in its organization. An organization API Key can run either form with campaign:author for a Campaign in its scope. A dry run writes nothing, though a check that calls a vision model, an agent or a chain makes that call. An agent calling it through hbd mcp serve can try a list of checks; a person tries an audit script at a terminal.
| You see | What happened | What to do now |
|---|---|---|
CHECK_NOT_RUNNABLE | The check could not run on this sample: the list of checks has a mistake, or the script raised an error. The message quotes the evaluator, naming the check or the script's line. | Fix the check or the sample as the message says, and try again. |
CAMPAIGN_ROLE_INSUFFICIENT | You are a viewer of this Campaign, or you do not belong to the organization that owns it. | Ask its owner for the editor role. |
DEVELOPER_NOT_ADMITTED | The account has not been admitted to the developer workspace. | Redeem an invite code in the Humanbased Portal, or sign in as an admitted account. |
CHECK_RUNNER_UNAVAILABLE | The service that runs checks did not answer, and nothing was judged. | Retry; contact support@humanbased.ai if it persists. |
Change a Campaign's details
What a Contributor sees on the Campaign page, apart from its tasks, is not in the Campaign File: the brief, description, cover, tutorials, and appearance, and only the name is in both. So apply does not change them. They are what the Developer portal edits under Setup → Campaign details and Setup → Appearance.
| Step | Command | Grant |
|---|---|---|
| Read what Contributors are shown | hbd campaign details get <campaign-id> | campaign:read |
| Change some of it, once | hbd campaign details update <campaign-id> --brief <text> --idempotency-key <your-key> | campaign:author |
details update writes only the fields you give: --name, --brief, --description (the Markdown on the Campaign page), --cover-file-id, --tutorials-file, and --theme-file. A field you leave out keeps its value, and an empty value writes the field empty. --tutorials-file and --theme-file each name a JSON file holding that field as details get --json returns it, in data.tutorials and data.theme. Each replaces the stored value whole, so send the full list even to change one tutorial. A Key needs campaign:author and the Campaign in its list; a signed-in terminal needs the editor or owner role. --idempotency-key names the write: re-sending the same key returns the first attempt's receipt rather than writing twice.
The cover is named by an uploaded image's file ID, not by an address: a public image a member of this organization uploaded in the cover or campaign category. Upload one at a signed-in terminal with hbd files upload cover.png --category campaign --idempotency-key <your-key>; its answer names the file ID to pass as --cover-file-id. An image uploaded for a Campaign in the Developer portal, under Setup → Campaign details, is in the campaign category too, and hbd files list --category campaign lists the ones you uploaded with their IDs. The receipt's written.cover_url is the address the Campaign now shows.
A new name is written into the Campaign File as well, as a new version, so plan a later apply against that version. A new theme reaches Contributors' tasks when the Campaign's pipelineThe steps a Campaign's work passes through, built in Builder is next saved in the Developer portal; until then, tasks keep the appearance they were saved with.
| You see | What happened | What to do now |
|---|---|---|
DETAILS_INVALID | A field breaks a rule the portal also enforces: a blank name, a tutorial address that is not HTTPS, or an appearance value the portal does not accept. Nothing was written, and the key is not spent. | Fix each problem the message lists, and send again under the same key. |
COVER_FILE_UNUSABLE | The file ID does not name a public image a member of this organization uploaded in the cover or campaign category. Nothing was written, and the key is not spent. | Send the ID of an image that qualifies, under the same key. |
FILE_SERVICE_UNAVAILABLE | The file service did not answer while the cover was checked. Nothing was written. | Send the same command again. |
CAMPAIGN_ROLE_INSUFFICIENT | You are a viewer of this Campaign. | Ask its owner for the editor role. |
No response, or ACTION_IN_FLIGHT | The write may have landed. | Read its receipt with hbd campaign actions inspect --idempotency-key <your-key> --action campaign.details.update, or send the same command again: the same key never writes twice. |
Read and change campaign settings
Visibility, protection tier and publisher are not in campaign get, and apply does not change them after create. setting show prints the Setup rows — status, visibility, protection tier, publisher, budget, escrow and the requirements revision — and lists each setting the latest file sets differently. setting set changes visibility or protection tier on a live campaign. It writes only the fields you give, refuses a value the campaign already has, and says what a contributor will see.
| Step | Command | Grant |
|---|---|---|
| Read the settings | hbd campaign setting show <campaign-id> | campaign:read |
| Change visibility, once | hbd campaign setting set <campaign-id> --visibility public --idempotency-key <your-key> | campaign:author |
--visibility is public, private or invite_only. --sensitivity is public, standard or confidential. A key needs campaign:author and the campaign in its list; a signed-in terminal needs the editor or owner role. Publisher is shown by setting show and changed from the Portal. A change is also written into the Campaign File as a new version, so plan a later apply against that version.
Import an existing dataset into a Campaign
An organization API Key with campaign:author can list input datasets for a Campaign in its grant. Import requires a signed-in editor.
A finished Campaign makes a dataset of its accepted records. A new Campaign can start from one, instead of collecting the same records again or exporting and uploading a CSV. This is the import the Developer portal offers on a Campaign's Source step.
| Step | Command | Grant |
|---|---|---|
| See which datasets this Campaign can import | hbd campaign input list <campaign-id> | campaign:author |
| Import one of them, once | hbd campaign input import <campaign-id> --dataset <dataset-id> --idempotency-key <your-key> | — |
input list lists only the datasets the Campaign's organization manages: the ones its own finished Campaigns made. A key needs campaign:author for the Campaign and can list only a Campaign in its organization and allowlist. Another organization's datasets do not appear and cannot be imported. Each row gives the record count, the fields its records carry, and whether it can be imported: a dataset whose source Campaign's pipeline is gone, or whose records carry no fields, is listed as not importable.
inputs import creates one work item per record that has fields, in the Campaign's pipeline. Items enter at the Source step when the pipeline has one, and otherwise at the first step past the gate. Each item records the dataset and the Campaign it came from. One import reads at most 200 records, oldest first; --limit reads fewer, which suits trying a small batch first. --idempotency-key names the import: re-sending the same key returns the first attempt's receipt rather than importing twice, and an import under a new key is a second import that brings the same records in again. Every import reads from the oldest record, so importing the same dataset again brings the same records in again, and records past the 200th cannot be imported from here, as in the Portal. The answer's earlier_imports counts this dataset's earlier imports into the Campaign through hbd or the Campaign API; imports made in the Portal are not counted. hbd waits 60 seconds by default, and --timeout changes that. If no answer comes in time, send the same key again: an import still running answers ACTION_IN_FLIGHT, and one that finished returns the first attempt's receipt.
An import does not change the Campaign File and needs no launch. It changes the pipeline the Campaign runs:
| Campaign status | What happens to the imported records |
|---|---|
| Live | Contributors can take them at once; the reward for each accepted submission comes from the budget reserved at launch. |
| Draft | They reach contributors once it launches. Automatic steps ahead of the first person can run first. |
| Paused | They reach contributors once it resumes. |
Only inputs import requires a signed-in terminal and the editor or owner role on the Campaign. An organization API Key is refused for import with DEVELOPER_SESSION_REQUIRED; an account the Developer portal has not admitted is refused with DEVELOPER_NOT_ADMITTED. inputs list also works with an API Key holding campaign:author for the Campaign.
Through MCP, campaign input import imports only into a draft or paused Campaign, whose records wait for a launch or a resume a person makes. It reads the Campaign's status first and refuses any other Campaign before the import is sent. On a live Campaign contributors would take the records at once, paid from its budget, so a person imports into one at a terminal.
| You see | What happened | What to do now |
|---|---|---|
DATASET_NOT_AVAILABLE | The dataset is not one the Campaign's organization manages, or does not exist. Nothing was imported, and the key is not spent. | Use one that hbd campaign input list lists. |
SOURCE_HAS_NO_RECORDS or SOURCE_RECORDS_EMPTY | The source Campaign has published no records yet, or every record read carries no fields. Nothing was imported, and the key is not spent. | Pick a dataset that can be imported. |
SELF_IMPORT | The dataset is the one this Campaign's own pipeline made. | Pick another dataset. |
PIPELINE_TEMPORARY_UNAVAILABLE | The pipeline service failed before the import created anything: it could not be reached, or failed while the records were read. Nothing was written. | Send it again; if that answers REQUEST_KEY_SPENT, the attempt committed nothing, so use a new key. |
ACTION_UNCERTAIN or ACTION_IN_FLIGHT | The pipeline service took the import and did not finish answering: it stopped part-way, timed out, or never answered the first record. A request cancelled part-way is the same: re-sent within 10 minutes it answers ACTION_IN_FLIGHT, and after that ACTION_UNCERTAIN. Items already created are not undone. | Read the receipt with hbd campaign actions inspect --idempotency-key <your-key> --action campaign.inputs.import to see how many items were created. Do not import again under a new key: that is a second import. |
Pause, resume, and change a live Campaign
A live Campaign hands out tasks until it is paused. Pausing is also how a running Campaign is changed: apply writes only a draft, and only a launch takes a draft live, from a Campaign that is a draft or paused.
| Step | Command | Grant |
|---|---|---|
| Pause a live Campaign, once | hbd campaign pause <campaign-id> --idempotency-key <your-key> | — |
| Resume a paused Campaign as it was, once | hbd campaign resume <campaign-id> --idempotency-key <your-key> | — |
Only the Campaign's owner pauses or resumes it, from a terminal signed in with hbd auth login. While the Campaign is paused, contributors can neither take its tasks nor submit work they had started, so a pause interrupts whoever is mid-task: the Portal's Pause shows how much work is in progress before it pauses, and this command does not. --idempotency-key names the change: re-sending the same key returns the first attempt's receipt rather than changing the Campaign again.
| You see | What happened | What to do now |
|---|---|---|
DEVELOPER_SESSION_REQUIRED | The command ran with an organization API Key, and no Key can pause or resume. A Key in HB_API_KEY or from --token-stdin is used ahead of a saved session. | Sign in with hbd auth login as the Campaign's owner, and run the command again without the Key. |
CAMPAIGN_ROLE_INSUFFICIENT | You are an editor or viewer of this Campaign, not its owner. | Ask the owner to pause or resume it. |
STATUS_TRANSITION_INVALID | Only a live Campaign is paused, and only a paused one resumed. Nothing changed. | Read its status with hbd campaign show <campaign-id>. |
CAMPAIGN_BUDGET_EXHAUSTED | The paused Campaign's reserved budget is used up. Nothing changed. | The owner selects Increase budget in the Developer portal, then resumes it. |
CAMPAIGN_CLOSING | The Campaign is being finished. Nothing changed. | Only the owner can cancel that, by resuming it in the Developer portal. |
ACTION_UNCERTAIN | The change was attempted and its outcome is unknown. | Read its receipt with hbd campaign actions inspect --idempotency-key <your-key> --action campaign.pause, or --action campaign.resume. |
Resuming runs the Campaign as it was before the pause. To put a changed version in front of contributors, relaunch the paused Campaign instead. The steps take two credentials: a terminal signed in as the owner, and an organization API Key with campaign:launch.
- Apply the change:
hbd campaign apply <campaign-id> --file campaign.json --plan plan.json --idempotency-key <your-key>. The Campaign keeps running its current version, and the file has to carry the Campaign's current budget. - Pause the Campaign as its owner:
hbd campaign pause <campaign-id> --idempotency-key <your-key>. - Propose the relaunch with the Key:
hbd campaign launch propose <campaign-id>. - A person who can edit the Campaign confirms the proposal on the Developer portal's confirmation page.
- Execute it with the same Key:
hbd campaign launch execute --proposal <proposal-id> --idempotency-key <your-key>.
The relaunch takes the newest draft live and locks no budget again: the budget was locked at the first launch. Until it runs, the Campaign stays paused; resuming it instead keeps the version it was running.
Confirm which environment you are pointed at
Confirm it before every write.
Global options such as --json may appear before or after the command path. Command-specific options follow the path.
hbd config profiles show --jsonThe environment and api_url in the output are what this profile says. The destination of the next command resolves field by field, each taking the first of these that has a value:
| This value | First of these with a value |
|---|---|
| Which profile | --profile → HB_PROFILE → the saved default profile |
api_url | HB_API_URL → profile api_url → https://api.humanbased.ai |
environment | HB_ENVIRONMENT → profile environment → inferred from the API origin |
hbd config profiles show prints only the saved profile. Environment variables and flags can override it. Before a write, run hbd auth status --json with the intended destination options and check context.apiOrigin.
environment and api_url also have to agree: a mismatched configured destination is refused with ORIGIN_MISMATCH.
The credential is a separate line. hbd auth status reports which credential the next command would actually use, and says so when HB_API_KEY is shadowing a saved session.
| What it does | Command | Grant |
|---|---|---|
| Every profile, with the current default marked | hbd config profiles list | — |
| One profile; the current default when the name is omitted | hbd config profiles show <name> | — |
| Create or replace a profile | hbd config profiles set <name> <destination options> | — |
| Make a profile the default | hbd config profiles use <name> | — |
| Forget a profile | hbd config profiles remove <name> | — |
None of the five makes a network request, and none of them touches a credential. A profile records where to go and which organization to expect; the credential arrives per run from the environment or standard input. Obtain destination options for profile setup from your organization's internal instructions.
In CLI 0.1.0-beta.8 or later, hbd config profiles list marks the selected profile current. Add --details to read its full saved fields, or choose --plain for escaped tab-separated rows. --limit and --all still control the list. After changing a profile, run hbd auth status to check the credential the next command would use; choose --json for the machine response.
Sign in and sessions
None of these names a Campaign, so none of them takes a campaign:* grant; what the credential may actually do is still the server's decision.
| Step | Command | Grant |
|---|---|---|
| Sign in through the browser | hbd auth login | — |
| See which credential the next command will use | hbd auth status | — |
| Confirm the caller the server verified | hbd auth whoami | — |
| What this release supports and what this credential may do | hbd capabilities | — |
| Print offline Bash or Zsh completion scripts and setup instructions | hbd completion <shell> | — |
| List the terminals signed in as you | hbd auth sessions list | — |
| Revoke one of those sessions | hbd auth sessions revoke <session-id> | — |
| List organizations for the saved session | hbd org list | — |
| Choose its organization without signing in again | hbd org use <organization> | — |
| Show the role the saved session acts under | hbd role show | — |
| Switch it between contributor and developer without signing in again | hbd role use <role> [organization-id] | — |
| End this machine's session | hbd auth logout | — |
hbd auth status and hbd role show read the session saved on this machine without a network request. hbd completion also works offline. Run hbd completion bash --instructions or hbd completion zsh --instructions for installation and removal steps; it prints them without editing your shell startup files. The other commands in this table make requests.
hbd auth login opens the shared browser sign-in. Choose Developer and an organization, or choose Contributor if your account has that role. The terminal completes the saved session after you allow it in the browser. In CLI 0.1.0-beta.8 or later, login, auth status, and auth whoami use one identity-line format for the saved session’s identity, role, and organization. auth status reads the local session; auth whoami checks it with the server.
Choose an organization
With CLI 0.1.0-beta.8 or later and an environment that has enabled organization switching, you can move the saved session between your organizations without signing in again. Start with the list, then choose a name or ID it shows:
hbd org list
hbd org use acme-labs
hbd auth statusIn CLI 0.1.0-beta.8 or later, the list labels the selected organization current; use --details for full IDs on a narrow terminal. hbd org use <organization> accepts an ID, a unique name, or a unique name slug such as acme-labs. Use the ID when names are ambiguous. The session keeps its device identity and expiry; subsequent commands use the chosen organization. auth status and auth whoami name the selected organization; use auth whoami --details for its full ID.
Choosing an organization is a person's action: MCP offers org list and leaves org use to the terminal. Remove a shadowing HB_API_KEY before changing the saved session, and update any conflicting --org, HB_ORG or profile assertion. If a concurrent switch returns SESSION_CONTEXT_CHANGED, inspect hbd auth status and retry the intended command deliberately. CONTEXT_SWITCH_UNAVAILABLE means the environment has not enabled switching; your current session remains usable.
Choose a role
With CLI 0.1.0-beta.8 or later and an environment that has enabled role switching, one sign-in can act as a contributor or as a developer. See which with hbd role show, then switch the saved session:
hbd role show
hbd role use contributor
hbd role use developerA contributor has no organization, so organization-bound commands such as hbd upload refuse and name hbd role use developer. hbd role use developer returns to the organization the server remembers; add an organization ID to choose another, as in hbd role use developer <organization-id>. The session keeps its device identity and expiry, and auth status shows the active role.
Choosing a role is a person's action: MCP offers role show and leaves role use to the terminal. If --org, HB_ORG or a profile asserts an organization, explicitly name that organization in hbd role use developer <organization-id>; remove the assertion before switching to contributor. Remove a shadowing HB_API_KEY first, and if a concurrent change returns SESSION_CONTEXT_CHANGED, inspect hbd auth status and retry deliberately. CONTEXT_SWITCH_UNAVAILABLE means the environment has not enabled switching; your current session remains usable. ROLE_UNAVAILABLE means the account cannot enter that role yet, and PERSON_BINDING_REQUIRED means the session has no established person binding after refresh, so run hbd auth login again.
Contributor task workspace (preview)
After switching the saved session with hbd role use contributor, set task context in the current folder:
hbd contributor workspace init <campaign-id> <step-key>
hbd contributor workspace show
hbd contributor work claimworkspace init creates .hb/workspace.json with the campaign ID and step key and refuses to overwrite an existing file. workspace show reads those defaults. The file stores no credential or API destination. A claim uses the defaults only when both IDs are omitted; explicit work claim <campaign-id> <step-key> IDs win. The CLI reads this file only in the current folder, refuses a linked .hb directory or malformed content, and offers the workspace change in local MCP as a proposed action.
Contributor preview commands
After switching an eligible saved session with hbd role use contributor, CLI 0.1.0-beta.8 or later (preview) can read your campaigns, notifications, earnings, work queue, and submission history. These reads use the signed-in person's role, refuse an organization key or Developer session, and are also available in local MCP. The read commands do not claim work or change enrollment.
hbd contributor status
hbd contributor campaigns list
hbd contributor campaigns get <campaign-id>
hbd contributor campaigns join-status <campaign-id>
hbd contributor campaign enroll <campaign-id> [--invite-code-file <file>]
hbd contributor invitation redeem --file <file>
hbd contributor inbox list
hbd contributor earnings list
hbd contributor work list
hbd contributor work claim <campaign-id> <step-key>
hbd contributor work release <run-id>
hbd disclosure contract <campaign-id>
hbd disclosure proposals show <proposal-id>
hbd disclosure show <submission-id>
hbd contributor submissions list --campaign <campaign-id>
hbd contributor submissions get <submission-id>
hbd contributor appeals list
hbd contributor appeals get <appeal-id>
hbd contributor appeals file <submission-id> --note "Why the decision should be reviewed"
hbd contributor appeals request-intervention <appeal-id> --reason "The campaign has not replied"Start with contributor status to check expiring claims, recent submissions in review, this month's credited rewards, rewards still clearing, and unread messages. A reward that has passed acceptance and has not reached the ledger is pending; a disputed reward is held on its own line and is not part of that pending amount. The command does not print a clearing time. It is a read-only command in the terminal and local MCP. If one source cannot answer, that fact says “could not read” while the others remain visible. An appeal deadline appears only when the server supplies both its exact time and filing availability.
join-status reads your enrollment, ban check, and the campaign server's entry-gate preview. An unknown check stays unknown; the preview does not promise enrollment. To enroll, run hbd contributor campaign enroll <campaign-id>; the campaign service still checks the requirements and may refuse. If the campaign needs an invite code, pass --invite-code-file <file> (use - for stdin outside local MCP); the code is never echoed. Repeat enrollment returns your existing active enrollment. If the response is lost, read hbd contributor campaigns join-status <campaign-id> before retrying. Complete any required agreements or course on the campaign page.
To redeem a personal invitation, save the invitation link or token in a file and run hbd contributor invitation redeem --file <file>. The CLI also accepts --file - on stdin. It sends the token to the campaign service with your contributor session. The service checks the invited account and campaign requirements. Its receipt includes the campaign, enrollment, and redemption IDs. If the response is lost, repeat the same command with the same account and invitation to recover that receipt. Use hbd contributor campaigns list --all --json to find the campaign's campaign_uid and your enrollment status, then pass that value to hbd contributor campaigns join-status <campaign-id> to confirm it. The campaign page handles any required agreement signing.
campaigns get reads one campaign visible to your Contributor role. Use --json for the terminal view, which includes campaign identity, task progress, entry requirements, and disclosure terms. Confidential tasks omit forms, instructions, authored labels, and rewards. Sealed campaigns stay hidden unless the server grants access. The command is a read in local MCP.
work claim takes a lease from the server for an eligible campaign and step, then shows the task payload and form. Use --json for structured output, or --resume <run-id> to resume an active lease shown by work list. The server withholds confidential work from the terminal, including review tasks that inherit protection. Open the Contributor Portal in a desktop browser for that work. Local MCP proposes claims. If a response is lost, read work list for an active lease before trying again.
work release returns one of your active claims to the queue without submitting it. The server checks lease ownership and answers whether anything was released or requeued; a repeat release can safely report released: false. In local MCP it is a proposed action. If its response is lost, read work list before retrying.
disclosure contract reads the campaign server's effective AI-use terms, exact contract hash, and versioned wording for one campaign visible to your Contributor role. A missing contract is an error; the CLI does not invent a default. This preview read is available in local MCP so a person or agent can see the terms before working.
disclosure proposals show lets the signed-in Contributor review an agent's saved proposal, its self-reported client, intended work, models, and current campaign wording. The CLI refuses a proposal from another session or API destination, or one whose contract or wording has changed. This preview read is for the person at the terminal, is absent from MCP, and grants no agent access.
disclosure show reads the signed AI declaration recorded with one of your own submitted receipts. It shows the declared level, estimated AI-produced share, models and effort, contract hash, and record time. --json includes the exact statement bytes as base64url and its signature for later verification. Older Portal submissions may have no CLI disclosure record; the command says so without inventing one. This preview read is available in local MCP under the same Contributor session.
appeals list and appeals get read only appeals you filed. The detail prints the server's reviewed status message and any final outcome; a Warden outage is an error, not an empty list. appeals file is also offered in local MCP as a proposed action that asks the client for your approval. It sends only your submission ID and an optional note; the server checks the decision, ownership, appeal window, and duplicates before opening a case. The filing deadline follows the Contributor Payout Terms applicable to that decision. Each decision can be appealed once. The CLI prints the exact filing deadline when the server supplies it, including on a late-filing refusal. appeals request-intervention asks the platform to take an existing appeal when the server's timing rule permits it. It is offered in local MCP as a proposed action and is unavailable to organization keys and Contributor access tokens. If either write's response is lost, run hbd contributor appeals list before trying again.
submissions get reads one of your own receipts, including the recorded status, decision, reason, and any unresolved review notice. Receipt lookup is available for history rows with the submitted status. The terminal's --json response omits raw submitted content, forms, and annotations. Open the Contributor Portal to view any submitted content the server makes available to you.
Campaign IDs in Contributor commands
Contributor campaign lists and details return the public campaign_uid. Current values consist of 16 lowercase Crockford Base32 characters and are never all digits. The campaign service still accepts the retired 32-character lowercase hexadecimal form as input. During the migration window it also accepts an older, all-digit internal campaign_id you already hold. Contributor lists and details do not return that internal ID.
Pass campaign_uid as <campaign-id> to campaigns get, join-status, and other Contributor commands that take a campaign ID. The campaign service resolves it. The contributor idea commands are an exception because of the CLI validation described below. Published humanbased@0.1.0 and humanbased@0.1.0-beta.10 prefer campaign_uid when printing or comparing a campaign reference.
Submit a prepared form (preview)
Prepare the disclosure answers. Before submitting a prepared form, save your AI-use answers as UTF-8 JSON in disclosure.json. It must contain exactly level (a string), extentPercent (the estimated percentage of AI-produced content, from 0 to 100), and models (an array). Each model must contain exactly name and effort, both nonempty strings. Use unknown when the model or effort setting is unknown. For example:
{
"level": "assisted",
"extentPercent": 25,
"models": [{"name": "unknown", "effort": "unknown"}]
}Choose level from none, consulted, assisted, drafted, generated, or autonomous, within the campaign’s disclosure contract. Record your actual use rather than copying the example. For no AI use, set level to none, extentPercent to 0, and models to []; otherwise include at least one model.
To sign and submit a prepared form saved as submission.json, run the command below in the contributor’s terminal with the disclosure answers. The signer reviews the disclosure and confirms it at the prompt.
hbd contributor work submit <campaign-id> <run-id> --file submission.json --answers disclosure.jsonDiscuss a campaign on its Ideas board (preview)
If the campaign has an Ideas board, you can read its topics or start a discussion. To post or reply, sign in as an enrolled contributor with daily posting allowance remaining. Give each new message its own idempotency key. Reuse that key if you retry the same message.
hbd contributor idea list <campaign-id>
hbd contributor idea create <campaign-id> --title "Tutorial" --file idea.txt --idempotency-key idea-1
hbd contributor idea show <campaign-id> <idea-id>
hbd contributor idea reply <campaign-id> <idea-id> --file reply.txt --idempotency-key reply-1CLI bug in the published releases. The four commands above are included in humanbased@0.1.0 and humanbased@0.1.0-beta.10. Both versions require <campaign-id>, <idea-id>, and the --cursor value to match /^[0-9]{1,32}$/. A current campaign_uid has 16 lowercase Crockford Base32 characters and is never all digits, so it always fails this check. The CLI stops before sending a request and reports INVALID_ARGUMENT with the message Campaign, idea and cursor IDs contain 1 to 32 digits.
Read commands
Before a write and after a launch, these confirm what the server actually recorded. They do not change server records; commands with --out can save files locally.
| Question | Command | Capability |
|---|---|---|
| Check a local TB4 package before packing | hbd task-package check <task-directory> | — |
| What state is this Campaign in, and what can this credential do to it | hbd campaign show <campaign-id> | campaign:read |
| What still stands between this Campaign and its launch, and which launch refuses it | hbd campaign readiness <campaign-id> | campaign:read |
| Saved participant requirements, their sources and revisions | hbd campaign requirement show <campaign-id> | campaign:read |
| Which stored versions does it have | hbd campaign version list <campaign-id> | campaign:read |
| The document of one version | hbd campaign version show <campaign-id> --version <number> --out version.json | campaign:read |
| What changed between two versions | hbd campaign version diff <campaign-id> --base <number> --head <number> | campaign:read |
| Counts for one event-time window, with their denominators | hbd campaign metrics <campaign-id> --from <ISO timestamp> --to <ISO timestamp> | campaign:read |
| Campaign cost or organization money flow | hbd campaign cost [<campaign-id>] --json | billing:read |
| Current Campaign escrow, outstanding claim commitments, and available funds | hbd campaign budget show <campaign-id> --json | billing:read |
| Why the same window's outcomes came out as they did | hbd campaign outcomes <campaign-id> --from <ISO timestamp> --to <ISO timestamp> | campaign:read |
| What is still in flight on a Campaign now, what it has delivered, and how many people take part | hbd campaign status <campaign-id> | campaign:read |
| A Campaign's submissions, the most recently changed record first | hbd campaign submissions list <campaign-id> | submission:read |
| One submission as the review drawer shows it, with the revision a decision names | hbd campaign submissions inspect <campaign-id> <submission-id> | submission:read |
| What a candidate file would quote as reward | hbd campaign feasibility --file campaign.json | campaign:author |
| Which Campaigns this credential can read | hbd campaign list --limit 5 | campaign:read |
| The receipt for one write | hbd campaign actions inspect --idempotency-key <your-key> | campaign:author |
| Records one Campaign delivered into one subscription | hbd campaign records pull <campaign-id> [--subscription <subscription-id>] | — |
| One file holding one page of delivered Campaign records (CLI 0.1.0-beta.9 or later) | hbd campaign export <campaign-id> --out <path> | — |
| Which subscriptions this Key reads one Campaign's records through | hbd campaign subscription list <campaign-id> | — |
| Public Marketplace listings anyone can browse | hbd marketplace listings list | — |
| One Marketplace listing: price, publish generation, terms and free-use conditions | hbd marketplace listings show <dataset-id> | — |
| Review listing terms and request access in the Developer Portal | hbd marketplace access review <dataset-id> | — |
| Delivered records for one Marketplace listing, through the subscription that covers it | hbd marketplace records pull <dataset-id> --campaign <campaign-id> | — |
| Which files have I uploaded | hbd files list --category <category> | files:read |
| One of my uploads, and the address to read it | hbd files get <file-id> | files:read |
hbd task-package check works offline without a credential. Agents can use it through local MCP; it is unavailable through remote MCP.
hbd marketplace listings list sends no credential in CLI releases with anonymous catalog browsing. If your installed version asks you to sign in, call GET https://api.humanbased.ai/api/v1/marketplace/publicListings to browse the public catalog. Sign in as a Developer to accept a free listing.
records pull and subscriptions list carry no campaign:* grant, but they do need an organization API Key with data access; a browser session is refused. The walk-through is under “Export every delivered record” on this page.
readiness runs the checks a launch makes, one by one and read-only; it launches nothing. Each check says what it read. missing means a launch is refused until it is fixed, and names which launch refuses: the API launch and the Portal launch do not refuse the same things. risk still launches, and probably should not. A check that did not pass also says where it is changed: a Campaign API operation, or only the Portal. A rule that could not be read is listed under not_checked with the reason, never passed, and while any is listed neither launch is ready. The command exits 0 whenever the read succeeds; whether to launch is in ready and ready_for.
versions list returns newest first; page with --limit and --cursor, or walk every page with --all.
versions inspect takes the newest version when --version is omitted. --raw adds the server's own fields and suits diagnosis; write the copy you mean to edit and send back with --out.
observation measures by event time: --from is inclusive, --to exclusive. Every count carries its denominator, and a numerator alone is not a rate.
cost is a read-only report for a signed-in organization billing, owner, or admin role, or a Key with billing:read; it does not require campaign:read. A Key limited by managed_campaign_ids can read only those campaigns, not organization totals. Omit the Campaign ID for the organization's balances and charges. A date such as 2026-10-01 means midnight UTC; --from is inclusive and --to exclusive. By default, --to is now. Leave --from out to read from the organization's first ledger entry; the returned window identifies the bounds used. Set either bound to read a specific window. Large reports may require a narrower window or individual Campaign reads. --by accepts campaign, step, week, or month (Monday UTC starts a week). The JSON response distinguishes reward-asset settlement amounts from USD ledger debits, shows each source's clock, and lists missing owner facts under unavailable. A release means money was debited from the reserved campaign budget; “credited” means it reached the Contributor's platform balance, not an on-chain withdrawal.
outcomes reads the same window for why its outcomes came out as they did: the reasons rejections and duplicates carry, 1–5 grades, the stage that caught each duplicate, and outcomes by step and by pipeline version. Each reason names its source: reviewer is a person's, audit an automated review's, and unattributed a detector's or one written before reviewers were recorded. A reason is quoted only when at least three outcomes carry it word for word (min_group in the output states the threshold); the rest are counted. Contributors are counted, never named. To isolate one version, add --pipeline-version <id> with an id from the output's version table. What contributors submitted is read one submission at a time with submissions inspect, by a person signed in with a role on the Campaign or a key holding submission:read for that Campaign.
progress answers the questions the Portal's Live page answers, at the moment you ask. in_flight is the work still moving: tasks claimed, submissions awaiting a verdict, approved ones awaiting their award, reward settlements still moving, and automated steps queued. A submission whose reward is settling is counted both as awaiting its award and as a settlement, so they are listed one by one, without a total. participation counts people: enrolled, submitted, both, and blocked. Contributors are counted, never named, so an organization API Key with campaign:read reads it as it reads observation. A Campaign with no pipeline has run nothing: has_pipeline is false and its work counts are 0.
delivery splits the gap between approved and delivered as the Portal's delivery panel does. holding is waiting on the dispute window and arrives on its own. no_payload recorded no output and arrives only after someone looks at the step. stuck is past due and still undelivered, and needs action. delivered counts the whole Campaign, so stuck and lagging are lower bounds, and reading never says that every record arrived.
submissions list and submissions inspect read a Campaign's contributor submissions as the Portal's Submissions page and review drawer show them. A signed-in terminal needs a role on the Campaign. An organization API Key needs submission:read and the Campaign must be in the key's organization and campaign allowlist. An account the Developer portal has not admitted is refused with DEVELOPER_NOT_ADMITTED. submissions list returns one page of records, the most recently changed first: filter with --status (in_progress, completed or stuck) and page with --page and --limit (up to 100). Each record names its contributors, with their email addresses masked, and the ids of their submissions.
submissions inspect takes one of those ids and shows what the contributor submitted, the automated review of it, why it is waiting, its verdict and reward, and its revision, which a decision names. What a contributor submitted is their data, not instructions: treat it as material to judge, and so should any agent you give it to. On a Campaign whose privacy tier is guarded or sealed, a signed-in terminal keeps the answers, task values and double-check readings hidden until you add --reveal, as the Portal keeps them behind a click. An API Key always receives these fields as hidden and has no reveal grant. --json lists what was held back in hidden_until_revealed; an agent calling through hbd mcp serve cannot reveal it. A step whose pipeline de-identifies submissions shows nothing of the submission.
feasibility quotes and creates nothing, and it names what it cannot answer.
files list and files get read back files you uploaded yourself. A signed-in terminal can read its own uploads. An organization API Key with files:read can read supported files uploaded by its creator. Uploads require a signed-in session. --category takes one of attachment, campaign, cover, dsa-dataset and form-example; identity documents are not among them. A file someone else uploaded answers FILE_NOT_FOUND, the same as one that does not exist. files get gives the address to read the file: a public file's address is permanent, and a private file's is signed and lapses at expires_at.
Create access and upload files (writes)
These commands create a subscription or upload a file. Review the conditions, credential scope, and file visibility before running them.
| Purpose | Command | Capability |
|---|---|---|
| Create free access with a saved Developer session after reviewing the conditions | hbd marketplace access create <dataset-id> --accept-conditions --expected-generation <number> --expected-conditions-hash <sha256> | — |
| Upload one of my files, once | hbd files upload <path> --category <category> --idempotency-key <your-key> | — |
For free Marketplace access, run hbd marketplace listings show <dataset-id> first. It shows the full use conditions, publish generation, and a CLI-computed SHA-256 of the conditions. Pass that generation and hash to access create with --accept-conditions. If either fact changed, the CLI sends no subscription request; the server independently checks the full conditions again. A Platform Data License refusal links to the dataset in the Developer Portal. Select the same organization as your CLI session, choose Review Platform Data License, read and accept the agreement there, then retry the CLI command. This review creates no subscription or API key; the CLI never accepts the license for you. After a lost write response, check the Portal's subscriptions before retrying.
files upload uploads one file, read from the path you give and never from standard input. --category says what it is for. campaign (a Campaign's cover or a tutorial video) and cover are public, so anyone with the file's address can read it; academy-video and academy-attachment hold Academy lesson material, read through signed addresses. cover takes an image, campaign and academy-video take an image or an MP4 or WebM video, and academy-attachment takes any file but HTML or SVG; a HEIC, HEIF, AVIF, TIFF or BMP image is stored as a JPEG. The command reads the file's first bytes to tell what it is, never its name, and refuses a type its category does not take before it reads the rest or sends anything.
--idempotency-key names the upload. The same key with the same file answers with the first upload and stores nothing again; the same key with a different file is refused with REQUEST_KEY_REUSED, and a key whose file has since been deleted with UPLOADED_FILE_DELETED. Either way, upload under a new key. The answer names the file ID, the absolute path it read, the file's size and type, and what to do with the ID: pass it to hbd campaign details update --cover-file-id, or put it in a lesson as video_config.video_file_id or reading_config.attachment_file_id.
Decide submissions
These change a submission's verdict, as the review drawer in the Portal does. Read the submission with submissions inspect first: a decision names the revision you read.
| Step | Command | Capability |
|---|---|---|
| Approve or reject one submission, once | hbd campaign submissions decide <campaign-id> <submission-id> --decision approved --expected-revision <revision> --idempotency-key <your-key> | submission:decide |
| Change one submission's verdict, once | hbd campaign submissions override <campaign-id> <submission-id> --decision rejected --reason <reason> --expected-revision <revision> --idempotency-key <your-key> | submission:decide |
submissions decide approves or rejects a submission waiting for a person, as the drawer's Approve and Reject do, and submissions override changes a verdict already given, as Change verdict does. Use a signed-in terminal with editor access, or, after deployment to your environment, set HB_API_KEY to an organization Key with submission:decide and the Campaign on its allowlist. To fetch the revision with the same Key, also grant submission:read. Give --decision approved or --decision rejected, or instead --rating with a whole-number score on the submission's rating scale, whose pass mark then decides. A rejection needs --reason, which the contributor reads; an approval drops it. Pass the revision that submissions inspect showed as --expected-revision: a submission that changed since is refused with SUBMISSION_REVISION_CHANGED before anything is written, so read it again and decide on what it says now. --idempotency-key names the decision, and re-sending the same key returns the first attempt's receipt rather than deciding twice.
Approving releases the contributor's reward, which their claim reserved from the budget a person committed at launch. Overturning an approval cancels a reward that has not started paying out, and approving a rejection pays one from the Campaign's budget; when the budget cannot cover it, the change is refused with REAPPROVAL_BUDGET_UNAVAILABLE. Once a reward is settling or paid, the verdict is final here, as in the Portal, and a change is refused with SUBMISSION_PAYOUT_LOCKED. If a decision's outcome is uncertain, read its receipt with hbd campaign actions inspect --idempotency-key <your-key> --action submission.decide, or --action submission.override for a change. An API Key can look up the receipts for decisions it made. Through hbd mcp serve both are offered to an agent only for you to approve, call by call.
Template commands
A template decides which fields a candidate file has. hbd campaign init --template <template-id> references a template from here.
| Step | Command | Capability |
|---|---|---|
| Templates this organization may reference | hbd template list | campaign:read |
| One template's field contract | hbd template get <template-id> | campaign:read |
| Write a starting template document | hbd template init --kind <kind> --name <name> --out template.json | — |
| Validate a template document | hbd template validate --file template.json | campaign:author |
| Create or update a template | hbd template apply --file template.json --idempotency-key <your-key> | campaign:author |
template init writes a file on this machine. It makes no request and needs no grant.
Updating an existing template takes both --template-id and --base-hash, the second from hbd template get; --template-id alone is refused. Without it, when two people edit the same template in turn, the later write replaces the earlier one and neither of them can see that it happened.
A template apply has a receipt too, but the lookup needs --action template.apply; without it you get another write's result, or nothing at all.
This page does not cover the eleven hbd dsa … commands, which consult the Campaign design assistant, or hbd agent runs. No page documents them yet.
Look up names a Campaign File references
A complex workflow references names that already exist on the platform or in your organization. These commands read the lists the Developer portal loads while you edit a workflow; where each name goes is under the Campaign API's Reference names that already exist.
| Names to look up | Command | Required grant |
|---|---|---|
| Step types | hbd catalog nodes | campaign:read |
| One step type's parameter structure, default params, and examples | hbd catalog nodes <node-key> | campaign:read |
| Checks an acceptance step can run | hbd catalog checks | campaign:read |
| Dedup keys this organization registered | hbd catalog dedup-keys | campaign:read |
| Platform agreements an entry step can require | hbd catalog agreements | campaign:read |
| Agents this organization wired in | hbd catalog agents | campaign:read |
| Published teams | hbd catalog teams --query <part-of-a-name> | campaign:read |
In CLI 0.1.0-beta.8 or later, these five unpaged catalogs start with a count and show up to 25 rows. Add --details to see every row and the schemas and examples, including for hbd catalog nodes <node-key>. The summary says when rows are omitted; --json always retains the full response.
For a clinical campaign, run hbd catalog nodes access_gate --details on the target environment. When its schema lists medical.expert.verified, add {"claim_type":"medical.expert.verified","status":"verified","assurance_min":"high"} to the entry gateThe workflow step that holds a Campaign's joining requirements’s params.required.credentials array. Keep any existing requirements. Use hbd campaign plan and hbd campaign apply, then read the saved gate with hbd campaign version show. Enrollment and claim-time checks use the active, manually reviewed Credential Server grant. A lower medical assurance floor is refused.
After the list, each command prints which field of each entry goes where in the Campaign File, for example slug goes in: $.workflow.nodes[*].params.agent (on agent_task steps); data.referenced_at carries the same with --json.
Organization API keys and signed-in terminals can both run them. A signed-in terminal reads the organization its sign-in was approved for, and a person who has since left that organization is refused with ORG_MEMBERSHIP_REQUIRED.
An empty list is still a successful read: the command says the list is empty and exits 0. When the service that holds a list does not answer, the command ends with CATALOG_OWNER_UNAVAILABLE and exit code 6; try again later.
hbd catalog teams reads one page at a time, newest teams first; --limit is 1 to 50, 10 by default. When another page follows, an interactive terminal shows a paging hint on stderr with --cursor and --all. JSON keeps data.has_more and data.next_cursor; redirected output omits the hint. --all reads every page.
When the name given to hbd catalog nodes <node-key> is not on the list, the command exits 2 and names the step types this environment has.
Academy course commands
An Academy course is a program. You open a draft version of it, write its lessons and quiz into that version, and submit the version for review; a Humanbased reviewer approves it, and there is no way to publish one yourself. These commands work from a signed-in terminal or an organization API Key with academy:author. They build a course through review submission and let an author manage drafts and grade open answers. A Key stays bound to its accountable creator and organization.
| Step | Command | Capability |
|---|---|---|
| Create a draft program in your organization | hbd academy programs create --file program.json --idempotency-key <your-key> | academy:author |
| The programs in your organization | hbd academy programs list | academy:author |
| One program and its versions | hbd academy programs inspect <program-id> | academy:author |
| Change a program's details | hbd academy programs update <program-id> --file program.json --idempotency-key <your-key> | academy:author |
| Open a new, empty draft version of a program | hbd academy versions create <program-id> --idempotency-key <your-key> | academy:author |
| Add a lesson to a draft version | hbd academy modules create <program-version-id> --file lesson.json --idempotency-key <your-key> | academy:author |
| Change a lesson | hbd academy modules update <module-id> --file lesson.json --idempotency-key <your-key> | academy:author |
| The lessons of a version | hbd academy modules list <program-version-id> | academy:author |
| Put a draft version's lessons in a new order | hbd academy modules reorder <program-version-id> --order <module-ids> --idempotency-key <your-key> | academy:author |
| Add a question to a quiz lesson | hbd academy questions create <module-id> --file question.json --idempotency-key <your-key> | academy:author |
| Change a question | hbd academy questions update <question-id> --file question.json --idempotency-key <your-key> | academy:author |
| The questions of a quiz lesson, with their answers | hbd academy questions list <module-id> --details | academy:author |
| The learning-evidence tags on a version, and the values Academy accepts | hbd academy tag show <program-version-id> | academy:author |
| Replace a draft version's learning-evidence tags | hbd academy tag update <program-version-id> --file tags.json | academy:author |
| Clear a draft version's learning-evidence tags | hbd academy tag update <program-version-id> --clear | academy:author |
| What keeps a version from review | hbd academy versions validate <program-version-id> | academy:author |
| Ask a Humanbased reviewer to approve a version | hbd academy versions submit-review <program-version-id> --idempotency-key <your-key> | academy:author |
| Contributors' answers to open questions that wait for a grade | hbd academy answers list | academy:author |
| Grade an answer to an open question | hbd academy answers grade <response-id> --verdict correct --idempotency-key <your-key> | academy:author |
A signed-in terminal can use them. An organization API Key with academy:author can use the Academy authoring routes too. The key creator must be admitted to the Developer workspace and remain a member of the Key's organization; the Key cannot cross into another organization, even if its creator belongs there, and the request is refused with ORG_MISMATCH. A creator without Developer admission is refused with DEVELOPER_NOT_ADMITTED.
program.json holds name, and optionally description, cover_url and is_sensitive; any other field is refused before it is sent, and the organization comes from your signed-in terminal or the Key. Sending a write again under the same key returns what the first attempt created, and reusing a key for a different request is refused with REQUEST_KEY_REUSED. versions create takes --pass-threshold from 0 to 100; without it the server sets 70. programs update takes the same fields as program.json, each optional, and leaves alone what its file leaves out.
lesson.json holds title and module_type (reading, video_lesson, practice or quiz) and the config for that type: reading_config with body_md or an attachment, video_config with video_url, practice_config, or quiz_config with pass_threshold. An edit sends only what it changes and cannot change module_type. A field the server does not take is refused before it is sent, inside a config too. A lesson points at a file only by the id the Portal's upload gave it, and only at a file a member of your organization uploaded for Academy; any other is refused with LESSON_FILE_UNUSABLE. These commands upload no files.
The production Academy service and CLI 0.1.0-beta.8 report private-file URL resolution in config.file_resolution: each attempted file has available or unavailable status, and omitted_inline_references counts references beyond the 20-image limit. If a URL is unavailable, keep the saved file ID and refresh with hbd academy modules list <program-version-id>; do not upload a replacement just to refresh its address. A successful read still exits 0 and returns the lesson content. Resolution fields are read-only and cannot be sent in lesson.json.
modules reorder takes every lesson of the draft version, by module id and comma-separated, in the order to give them. An order that leaves a lesson out or names one twice is refused, so no two lessons share a place.
question.json holds prompt_md and choices, each a body_md with is_correct on the right answers, and optionally kind and points. An edit that sends choices replaces the whole set. questions list shows each question's position, ID, kind, number of choices and prompt; add --details to see every choice and which are correct.
tags.json holds domain_tags, a list. Each entry has domain and weight. skill may be omitted. Choose tags that describe what completing the course demonstrates.
{
"domain_tags": [
{"domain": "security", "skill": "web", "weight": 0.8}
]
}hbd academy tag update <program-version-id> --file tags.json replaces every learning-evidence tag on the draft with that list. hbd academy tag update <program-version-id> --clear replaces the list with an empty one. Use exactly one of --file and --clear. A call that passes neither, passes both, or puts something other than a list in domain_tags exits 2 with INVALID_ARGUMENT. Nothing is sent. Sending the same list again leaves the stored tags unchanged. This write does not take --idempotency-key.
hbd --json academy tag show <program-version-id>
hbd --json academy tag update <program-version-id> --file tags.json
hbd academy tag update <program-version-id> --clearA successful show or update exits 0. With --json, standard output is one envelope and error is null. The envelope always carries apiVersion, command, requestId, context, data, notices, nextAction and error. command is academy.tag.show or academy.tag.update. context names the profile, API origin and organization of that call.
For show, data carries program_version_id, status and domain_tags. When this Academy deployment returns its rules, data.domain_tag_rules adds domains, max_tags, skill_pattern, skill_max_length, weight_min and weight_max. An update's data is the stored program_version_id, status and domain_tags. The example below is a successful show. Its requestId and context depend on the call.
{
"apiVersion": "humanbased.cli/v2",
"command": "academy.tag.show",
"requestId": null,
"context": {
"profile": "default",
"apiOrigin": null,
"organizationId": null
},
"data": {
"program_version_id": "ver_example",
"status": "draft",
"domain_tags": [
{"domain": "security", "skill": "web", "weight": 0.8}
],
"domain_tag_rules": {
"domains": ["software", "science", "ml", "operations", "hardware", "security", "media"],
"max_tags": 8,
"skill_pattern": "^[a-z0-9]+(?:_[a-z0-9]+)*$",
"skill_max_length": 64,
"weight_min": 0,
"weight_max": 1
}
},
"notices": [],
"nextAction": null,
"error": null
}When versions validate stops on domain_tags, its next command is hbd academy tag update <program-version-id> --file tags.json.
versions validate exits 1 with ACADEMY_DRAFT_INCOMPLETE while anything keeps the version from review, and lists each field with what to fix; it exits 0 when nothing does. versions submit-review moves the version into review, where a Humanbased reviewer approves or rejects it. Sent again under the same key, it returns the same review request. A rejection puts the version back in draft, and submitting it again takes a new key.
answers list shows the answers to open questions that wait for a grade, oldest first, each with its course, lesson and question and the whole answer. answers grade grades one with --verdict correct or --verdict incorrect. A quiz with an open question waits for these grades: the last grade on an attempt sets its score and its pass or fail, and the course result follows from it. Until then, grading the same answer again replaces its grade; once the attempt has its result, a new grade is refused with ATTEMPT_FINALIZED. Sent again under the same key, a grade returns what it did.
Let a coding agent run these commands
Let a coding agent run these commands
| What it does | Command | Grant |
|---|---|---|
| Serve this build's commands to an agent client on this machine | hbd mcp serve --stdio | — |
Connect a client
Let a coding agent run these commands
Approve what changes
Let a coding agent run these commands
Files, paths and waiting
Let a coding agent run these commands
Training (preview)
Training commands are a preview in CLI 0.1.0-beta.8. The production API accepts a job only for a training template approved for your organization; if hbd train launch answers TEMPLATE_NOT_RUNNABLE, ask support whether one is available. Launching requires an organization API Key with training:run. Choose a dataset approved by the template and a cohort size that meets the template’s measured minimum.
hbd train launch --template <recipe> --dataset <dataset> --cohort-rows 1000 --idempotency-key <key> [--settings <json|->]Use the returned job ID with hbd train status <job-id>, hbd train outputs <job-id>, or hbd train cancel <job-id>.
Export every delivered record
Save records and attachments with one command
In a build whose command help lists --out, ordinary Campaigns and Recorder Campaigns use the same command. The CLI saves a JSON file for each submission. For a standalone Recorder v2 record, where the recording is the whole data of the record, it also automatically prepares, downloads and SHA-256 verifies a ZIP. You do not need to choose a data type or manage export jobs. CLI 0.1.0 and 0.1.0-beta.10 do not handle a form-plus-Recorder record, where the recording is under data.recorder: after saving that record's JSON, the command stops with ACTION_FAILED ("Unexpected recording attachment on a non-Recorder record") and exit 7.
HB_API_KEY="$HB_API_KEY" hbd campaign records pull "$HB_CAMPAIGN_ID" \
--subscription "$HB_SUBSCRIPTION_ID" --out ./campaign-data
# Later, acquire only new records with the same command and output directory:
HB_API_KEY="$HB_API_KEY" hbd campaign records pull "$HB_CAMPAIGN_ID" \
--subscription "$HB_SUBSCRIPTION_ID" --out ./campaign-data --incrementalThe default directory export replays every currently authorized record; it does not acquire previously unread paid data. --incremental advances the subscription and can incur its normal data fees. The server accepts this mode only when the subscription is bound exclusively to this Campaign, with no task or vertical bindings. A mixed subscription is refused with CAMPAIGN_INCREMENTAL_SCOPE_MIXED before its read position changes; use a dedicated subscription instead.
--out walks all pages, so --all is unnecessary. An optional --json returns a summary rather than the records: path, campaign_id, subscription_id, mode, count, pages_read and complete. Here count means records verified during this invocation, including previously saved records encountered during recovery; it is not the number of newly created files. Success requires exit 0 and complete: true. Existing stdout --json, --jsonl and --all reads without --out keep their previous behavior.
records pull --out fills a directory and walks every page. To hand over a single file instead, use hbd campaign export in CLI 0.1.0-beta.9 or later. Each run saves one page of delivered form records, 10 by default and at most 50 with --limit, to one new JSON, CSV or ZIP file; it never replaces an existing file, and an empty page saves none. It replays authorized records and does not advance the subscription. When more records remain, the command prints a cursor: run it again with the same --subscription, that --cursor and a new --out path. For builds with --all, you can join all readable pages into one file. Use --incremental for new deliveries. Use records pull --out for Recorder records or directory exports. See Download JSON, CSV, or ZIP. Use an organization API Key (HB_API_KEY); a sign-in session or a sandbox Key is refused.
Keep the private output directory and its .hb-export checkpoint together. Rerun the same command, mode, environment, API Key and directory after interruption; completed files are verified and partial media resumes in bounded ranges. If an incremental response was lost, the CLI first replays authorized records before continuing the feed. Changed files and another account/environment are refused rather than overwritten. Do not run another consumer on that subscription if this directory must capture every new record. The per-request --timeout does not limit preparation to one request's duration; attachment preparation can wait up to one day before asking you to resume. Metadata and requests persist privately; signed storage links and the API Key are not saved there. An existing directory must be private and owned by you (mode 700 on macOS/Linux).
Legacy Recorder records without supported artifact references, expired sources and failed assembly stop with a nonzero exit while preserving the checkpoint and saved JSON. Directory export cannot be combined with --cursor or --jsonl; --incremental requires --out. For direct HTTP use, follow the pull plus attachment-download flow in the API reference.
Exit code and error.code | Cause | What to do now |
|---|---|---|
1, PAGINATION_INCOMPLETE | An --all read stopped while more records remained. | Read data.pagination_stop_reason and continue as described above. |
2, INVALID_ARGUMENT | The Campaign ID is blank or a comma-separated list, an ID or cursor looks like a credential, or a --cursor came without its --subscription. Nothing was sent. | Pass one Campaign ID and the real identifiers. Supply the Key only through HB_API_KEY or --token-stdin. |
2, SUBSCRIPTION_AMBIGUOUS | --subscription was left out, and this Key reads the Campaign through several subscriptions. Nothing was read. | Pick one from hbd campaign subscription list <campaign-id> and pass it with --subscription. |
3 | No usable credential: the Key is missing, malformed, expired, or revoked, or a sign-in session was used. | Supply a full organization API Key. |
4 | The Key has no data access, or the subscription is outside its scope or organization. | Check the Key's Data grant in Create and use an API Key. |
4, SUBSCRIPTION_NOT_BOUND | --subscription was left out, and this Key reads the Campaign through no subscription. Nothing was read. | Check the Campaign ID. For one of your organization's own Campaigns, create a Key with Campaign access for it. |
6 | The service was unavailable, or the output could not be delivered. | Run the same command again; a replay charges nothing and moves no position. |