primectl
A kubectl-style CLI for the Primer API. It learns the API surface at runtime from the server's OpenAPI document, so generic verbs work against any resource the server exposes.
Install / run (uv workspace)
uv run --package primectl primectl --help
Quick start
# point at a server (tokenless works when the server has auth disabled)
primectl config set-context dogfood --server http://localhost:9000
primectl config use-context dogfood
primectl api-resources # what resources exist
primectl get agents # list
primectl get agent <id> -o yaml # one object as a manifest
primectl get agents --filter model=gpt # server-side find
primectl explain agent # schema fields
# declarative
primectl get agent <id> -o yaml > a.yaml # edit it
primectl apply -f a.yaml # upsert (PUT if present else POST)
# collection documents, addressed by path
primectl doc put <col> notes/readme.md --content "hi" --title Readme
primectl doc get <col> notes/readme.md --content # bare body
primectl doc list <col> --prefix notes/
primectl doc move <col> notes/a.md notes/b.md
primectl doc delete <col> notes/old.md
# custom operations + escape hatch
primectl call agent status <id>
primectl raw GET /v1/health
Output formats
-o table (default), json, yaml, name (ids only), wide.
The -o flag is accepted by the read commands (get, describe, call, raw); write commands (create, apply, delete, edit) print a status line.
Config
~/.primectl/config.yaml (override with PRIMECTL_CONFIG). Token resolution:
--token > context token (inline or env:VARNAME) > PRIMER_API_TOKEN > none.
Shell completion
Typer provides it: primectl --install-completion.
Not in v1
WebSocket streaming (watch/logs) is intentionally out of scope; v1 is
request/response only.
Metadata
Release files for primectl 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| primectl-0.6.0.tar.gz | 44.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| primectl-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.9 kB
Release files / primectl-0.6.0.tar.gz
| Download URL | primectl-0.6.0.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16caa290cbd7dbcdfd2ce06a2812927a4b50a18dce18ce15fe9b8e8e9c9233e6
|
|
BLAKE2b-256 checksum How to use checksums |
4925e0eff5dd9743f8dd38b4762ed7f89fab6e091b62dd4d273efcbf7a3b208a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / primectl-0.6.0-py3-none-any.whl
| Download URL | primectl-0.6.0-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59cfd31bbacd04cf25824b2b00071a4cd374d18af594ac0732414809103ef525
|
|
BLAKE2b-256 checksum How to use checksums |
55be885aa5b02a89814c40d94c9c1e2be213303e6137efb3cc31e1dbfdd4b39b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|