Skip to main content

What can you do with the CLI?

Landbase CLI lets you work with Landbase from your terminal, Claude Code, Codex, or your own scripts. You can ask for audiences in plain English, enrich records, enrich contacts with email and phone data, upload spreadsheets, run dataset workflows, and download structured files for analysis.Most commands return JSON, which makes the CLI easy for agents and scripts to read. When something goes wrong, the CLI returns a stable error code so your workflow can recover or ask for the right fix.

Find audiences with natural language

Use the CLI when you want Landbase to build a company or people audience from a plain-English request.
You can also use the explicit search command:
This is the fastest path when you want an agent to:
  • Find companies or contacts that match a market, role, location, industry, or signal.
  • Save the results to a local file.
  • Pass the dataset into another script, notebook, dashboard, or app.

Use Advanced Dataset Creator for precise audiences

Most searches can use the default agent. When you need custom SQL, aggregations, exact filters, ratios, or output columns, use --agent=advanced_dataset_creator.Advanced Dataset Creator is especially useful for searches like:
  • Companies where one team’s headcount is low relative to another team’s headcount.
  • Accounts from an uploaded list that match a computed condition.
  • Rankings, counts, or breakdowns that need aggregation.
  • Prospect lists where the output columns need to be defined in the prompt.
It uses a two-step flow. First, ask for the dataset and reuse a session label:
Then confirm the proposed query in the same session:
Add --session=<label> when you want follow-up prompts to continue the same conversation.
This is useful when you want to start broad, inspect what came back, and then tighten the audience without starting over.

Download results in the format you need

The --download flag writes search results to disk. If you do not pass a path, it defaults to ./results.jsonl.The file extension controls the output:Published files can take a few minutes because Landbase runs a publish workflow before the download is ready.

Match a person or company

Use match when you have one record and want Landbase to find the best corresponding person or company.
This is helpful for record cleanup, CRM matching, deduplication, and workflows where you need to turn partial information into a Landbase match.

Enrich a record

Use enrich when you already have a person or company identifier and want more fields back.
You can request company fields, person fields, or both. If you pass a person identifier, the CLI can automatically resolve the related company and return company enrichment too.

Enrich contacts with email and phone

Use contact-enrich when you have a batch of leads and want asynchronous contact enrichment for emails, phone numbers, or both.
This is different from enrich: enrich is a synchronous single-record lookup for person and company attributes, while contact-enrich starts a batch job and gives you a request_id.Each lead should include either a LinkedIn URL or a name plus a company anchor:
You can pass leads as:Email enrichment is on by default. Add --enrich-phone when you also want phone numbers, or use --no-enrich-email --enrich-phone for phone-only enrichment.Add --wait when you want the CLI to poll until the batch reaches a terminal status. The default polling ceiling is about 10 minutes, and you can override it with --timeout=<seconds>. If the wait times out or is interrupted, the error includes the request_id, so you can resume with:
For larger jobs, keep each batch at or below 100 leads and avoid submitting more than about 10 batches per minute per account.

Upload your own spreadsheet

Use upload to bring a CSV or Excel file into Landbase as a dataset.
The command returns a dataset ID. You can use that ID to run workflows such as onboard, match, enrich, publish, and download.

Select an account, onboard, and import contacts

In platform mode (the default), some commands run against a specific Landbase account. Pick which account the CLI uses, fill in its onboarding profile, and bulk-import contacts from a dataset.First, sign in and choose the account. Run account set with no arguments to pick from a list — your choice is saved, so this is a one-time step per machine:
Fill in the account’s onboarding profile. Run get to see which fields are still needed, then submit a partial payload:
Import the contacts in a dataset into the active account under a tag. --watch blocks until the import finishes and prints a summary of what landed:
To target a different account for a single command without changing the saved one, pass --account=<id>.

Launch outbound campaigns

Create and launch outbound email and LinkedIn campaigns against an imported tag. Both channels share the same shape — create a draft, then launch. A template-mode campaign carries one shared message per step and is ready to launch immediately:
For per-contact copy, create in personalized mode and fill the exported audience CSV before launching: audience → fill subject_i/body_i (email) or message_<order> (LinkedIn) → messagescoveragelaunch. Sending inboxes and LinkedIn accounts are connected in the web app. See How to launch a campaign.

Manage datasets

Use dataset commands when you need to list, inspect, download, trace, or delete datasets in your workspace.
lineage is especially useful after workflows because it helps you find the child dataset created by a publish, enrich, match, onboard, or sketch run.

Run batch workflows

Use workflow commands when you want Landbase to process an existing dataset.
Add --wait when you want the command to block until the workflow completes. Without --wait, the CLI returns a workflow run ID that you can poll with workflow status.

Chain commands into a full pipeline

A typical workflow is upload, onboard, publish, find the published child dataset, and download it.
For search results, you can do the common conversion in one command:
If you do not have a LinkedIn URL, match the person first, then pass the matched contact into contact-enrich:

Inspect previous agent runs

Use runs when you need to review prior agent runs for a session.
Pass the same session label you used with --session, or use the raw session_id returned by a search response.

Authenticate and stay current

Use auth to sign in, check which key is active, paste an API key, or clear the locally stored key.
Add --force to re-authenticate even when a valid session already exists — useful when a stale session keeps causing errors.Use update to self-update to the latest release:

Read outputs safely

Search commands return a structured response with fields such as run_id, session_id, status, content, dataset_id, and created_at.Other commands return the relevant endpoint JSON directly. When you only need a single value, pipe the output through jq:

Common options

Failure codes

Errors are printed to stderr as JSON so agents and scripts can branch on error.code.