CLI and AI agents

Your health record from the terminal

Selera CLI gives terminals and AI agents access to your cards: upload documents, read values, add notes and prepare summaries for your doctor.

Updated 12 October 2026

Installation

The CLI supports macOS and Linux, arm64 and x64, including musl Linux. Node.js and Bun are not required to run it. Installation needs curl, tar, and sha256sum or shasum.

curl -fsSL https://selera.health/install-cli | bash
selera auth login
selera commands --json

The installer verifies the archive’s SHA-256 and installs selera in ~/.local/bin. If that directory is missing from PATH, run the command printed by the installer. It leaves shell startup files alone. SELERA_INSTALL_DIR selects the directory; SELERA_VERSION selects a release.

Sign-in and access

selera auth login opens Selera’s approval page. Sign in with Google or an email link, read the health-data consent and compare the code with your terminal before approving. For a remote terminal, use selera auth login --no-browser.

The CLI session lasts 30 days and grants reading, uploading, changing and deleting data in accessible cards. The server checks permissions and current consent on every request. selera auth status checks the session; selera auth logout revokes it. You can also manage CLI sessions in the app’s account menu.

Credentials live in macOS Keychain or Linux Secret Service. When the OS store is unavailable, the CLI uses a private file (0600) in a private directory (0700). It reports the storage choice on stderr and never prints the token.

Commands and JSON

selera --help
selera documents upload --help
selera persons list --json
selera subscription get --json

selera commands --json works offline and describes the installed version’s commands: arguments, flags, JSON schemas, permissions, side effects, costs and retries. Inspect this catalog before working. --help is available for every group and command.

Successful responses go to stdout: JSON with --json or automatically when piped. Progress and errors go to stderr. Errors use {error:{code,message,status?,retryable}}. --locale uk|en selects the language of generated content; Ukrainian is the default. --timeout accepts 1–300 seconds, with a default of 120.

Use --file ./request.json or --file - for JSON from stdin to avoid leaving health data or share tokens in shell history. --body is also supported. Downloads require an explicit --out and refuse to overwrite an existing file.

Deletion, consent, Premium changes and granting access require --yes. This is a confirmation flag, not permission for an agent to act without your instruction. Writes are never automatically retried: inspect state after a lost response before repeating.

Documents, notes and summaries

First find the intended card with persons list. Replace PERSON_ID and DOCUMENT_ID with returned IDs. PDFs, images and signed documents may be up to 20 MiB.

selera documents upload report.pdf --person PERSON_ID --json
selera documents get DOCUMENT_ID --json
selera entries list --person PERSON_ID --json

Selera’s server performs analysis, just like the app. An upload response does not mean analysis has finished: inspect status with documents get. waiting means the document needs available allowance; documents retry asks the server to try starting analysis again.

selera notes create --person PERSON_ID --file ./note.json --json
selera notes read NOTE_DOCUMENT_ID --json

note.json contains text and date. The server analyzes notes without consuming the file-reading allowance.

selera explanations ask --person PERSON_ID --body '{"overview":true}' --json
selera summaries create --person PERSON_ID --file ./summary-options.json --json
selera summaries pdf SUMMARY_ID --out ./summary.pdf --json

selera summaries create --help describes summary-options.json. Explanations stay in your private thread; a summary is a separate snapshot. The catalog also covers profiles, care plans/calendar, family access and summary sharing. plans means care plans; subscription means Free/Premium.

The same limits as the app

The CLI does not bypass permissions, consent or quotas. Free includes 10 document reads for the lifetime of the account; standard Premium includes 200 over the last 12 months. subscription get reports your account’s actual limits, usage and waiting files.

AI explanations need a Premium-covered card and allow 40 requests per user over 24 hours, including cancelled and failed requests. A doctor summary includes its AI brief only for a Premium-covered card. Premium is free during the beta, but enabling it must be your decision.

Selera performs the processing; no separate AI-provider key is needed. If you use a third-party agent, health data it reads may be sent to its provider, depending on your agent and settings. Selera helps organise information: check important facts against originals and discuss treatment with your doctor.

Exit codes

CodeMeaning
0Success
2Usage or input
3Authentication
4Permission or consent
5Not found
6Conflict
7Rate limit
8Unavailable
9Network
10Internal error

Skill for AI agents

Install the Selera skill for an agent that supports Agent Skills. This command needs Node.js with npx; Selera CLI itself does not.

npx skills add https://selera.health --skill selera

Read SKILL.md

CLI guide as Markdown

The skill helps an agent discover commands and follow permissions, limits and your task. It does not grant account access: you approve the session separately in your browser.