POMA AI CLI
The poma CLI is the command-line client for the POMA AI public API. It covers the same core ingest workflow as the SDK and HTTP API, with a few shell-friendly extras like ingest-sync and --json.
These docs intentionally stay focused on the main path: install the CLI, authenticate, check health, ingest a document, watch the job, and download the resulting .poma archive.
For full endpoint details, use the API docs. For the complete command surface and implementation notes, see poma-cli on GitHub.
Core command groups
| Area | Commands | Purpose |
|---|---|---|
health | poma health | Check whether the API is reachable |
account | register-email, verify-email, me, api-key, my-projects, my-usage | Bootstrap auth and inspect the current account |
jobs | ingest, ingest-sync, status, status-stream, download, delete | Submit work, follow progress, fetch the archive, and clean up |
Install
Prebuilt release archives are published for:
- Linux:
amd64,arm64 - macOS:
amd64,arm64 - Windows:
amd64
Download the archive that matches your platform from the poma-cli releases page, extract it, and place poma or poma.exe on your PATH.
Homebrew (macOS):
brew tap poma-ai/poma
brew install pomaGo (macOS / Linux / Windows, Go 1.21+):
go install github.com/poma-ai/poma-cli@latestMake sure $GOBIN or $GOPATH/bin is on your PATH.
Authentication
Most commands need a JWT. The exceptions are:
poma healthpoma account register-emailpoma account verify-email
From the app
Sign in at app.poma-ai.com and copy your API key.
From the CLI
poma account register-email --email you@example.com
poma account verify-email --email you@example.com --code '<code-from-email>'The token printed by verify-email is enough to start using authenticated commands immediately. For ongoing use, fetch the long-lived api_key:
poma account api-keySet the environment variable
Use either the API key copied from the app or the api_key value returned by poma account api-key.
export POMA_API_TOKEN="your-api-key"setx POMA_API_TOKEN "your-api-key"On Windows, open a new terminal after running setx.
You can also pass the token directly with --token, or provide it via --json.
Global flags
These flags apply to every subcommand:
| Flag | Default | Purpose |
|---|---|---|
--base-url | https://api.poma-ai.com/v2 | REST API base URL |
--status-base-url | https://api.poma-ai.com/status/v1 | Status / SSE base URL |
--token | none | JWT for authenticated requests |
--json | none | Inline JSON ({...}) or a .json file under the current working directory |
Token precedence is:
- Explicit
--token tokenfrom--jsonPOMA_API_TOKEN
--json only merges the core snake_case keys that map to real flags on the invoked command:
base_url, status_base_url, token, email, username, company, code, file, job_id, output
Explicit flags always override values from --json.
Example:
poma jobs download --json '{"job_id":"<job_id>","output":"bin/result.poma"}'Health check
Use this when you want a quick unauthenticated check against the API:
poma healthCore workflow
Fast path: ingest, wait, and download
ingest-sync is the easiest end-to-end workflow. It submits the job, streams status updates until a terminal state, and downloads the archive when the job finishes.
poma jobs ingest-sync --file document.pdf --output result.pomaYou can also pipe bytes through stdin and provide the filename separately:
poma jobs ingest-sync --filename document.pdf < document.pdf --output result.pomaAdd --eco if you want the eco ingest route.
If you omit --output, the archive is written to bin/<job_id>.poma.
Step by step
Submit a job:
bashpoma jobs ingest --file document.pdfOr from stdin:
bashpoma jobs ingest --filename document.pdf < document.pdfOn success,
ingestprints the job id as JSON.Follow the job:
bashpoma jobs status-stream --job-id '<job_id>'If you only want a single status response instead of a live stream:
bashpoma jobs status --job-id '<job_id>'Download the result:
bashpoma jobs download --job-id '<job_id>' --output result.poma
Delete a job
If you no longer need a job, you can request deletion:
poma jobs delete --job-id '<job_id>'Output and path rules
The CLI keeps a few path-related behaviors intentionally narrow:
--jsonfile paths must resolve under the current working directory.- Download outputs must also resolve under the current working directory.
- If you do not pass
--output, downloads go tobin/<job_id>.poma.
The CLI downloads .poma archives, but it does not unpack them. If you want to inspect archive contents programmatically, use the SDK archive docs.
Discovering commands
Use Cobra help to explore the full surface:
poma --help
poma account --help
poma jobs --help