The Phema CLI — query your AI's customer-context failure map from any terminal.
Project description
phema — the Phema CLI
Query your AI's customer-context failure map from any terminal. phema is a
thin, published HTTPS client of the Phema read API (/api/v1). It authenticates
with a workspace API key and renders human-readable output by default, with
--json on every command for scripting, jq, and CI.
This is the customer CLI. It is a separate artifact from the internal operator CLI (
phema-cli): it depends on nothing buthttpx+typer, talks only over HTTPS, and ships to PyPI.
Install
uvx phema --help # zero-install one-off
uv tool install phema # or: pipx install phema / pip install phema
Authenticate
Mint a workspace API key in the Phema dashboard, then:
phema auth login # prompts for the key (hidden), stores it in ~/.phema/config
phema auth whoami # confirms the key authenticates
phema auth logout # removes the stored key
The key resolves from PHEMA_API_KEY (environment, highest precedence) then the
stored config file (written with 0600 permissions). Point the CLI at a
non-default host with PHEMA_API_URL or phema auth login --api-url ....
Read commands
phema themes # list failure-mode themes
phema themes --theme-id <uuid> # one theme's detail
phema failure-map --top-n 10 # severity-ranked coverage
phema cited-cases --theme-id <uuid> # eval cases + citation chains
phema case-history --case-id <uuid> # provenance / lineage
phema dispositions --view coverage # triage / coverage surface
phema themes --json | jq '.themes[].label' # --json on every command
Errors are honest, never silent
| Situation | What you get |
|---|---|
| No key configured | Run \phema auth login`` (exit 2) |
| Key rejected (401) | invalid / revoked / expired → auth login (exit 2) |
| Plan not entitled (403) | "requires a paid plan (Signal or above)" (exit 3) |
| Rate limited (429) | retry hint with Retry-After (exit 4) |
| API unreachable | network / timeout message (exit 5) |
Scope
Read-only. Export/download and generate/push are separate milestones.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phema-0.1.0.tar.gz.
File metadata
- Download URL: phema-0.1.0.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
740612fa4e111ce5d7c41b1cfa250185c1c3473010136547800caf9c5983590d
|
|
| MD5 |
af1fcd7a3e79461e059f07e60b93ddeb
|
|
| BLAKE2b-256 |
22d3dd90ba94784245ca8ccdad7ea60e06bc570bf3c850d359060a14f318e6a7
|
File details
Details for the file phema-0.1.0-py3-none-any.whl.
File metadata
- Download URL: phema-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cda112136650828307b2340cf8447af4511d70828a3fe9cbe03c9226ff61051
|
|
| MD5 |
4ae5526b09dd04d48fb3d5d29b9e0b33
|
|
| BLAKE2b-256 |
fd83660dcb9a8fe0f568857b4480e975324e66ed3b3eab8508f582cd89d77e1d
|