kubectl-style CLI for the Primer API
Project description
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.
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 primectl-0.1.0.tar.gz.
File metadata
- Download URL: primectl-0.1.0.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d48aede05680e0a4c897d4cf3589427630f2fd2af70548f7730a5b7e4074d95
|
|
| MD5 |
d1612899d5f08b21948d83d16cfae686
|
|
| BLAKE2b-256 |
ec8859fbb9de6edb5b11866de1ff176723fb8ca58c92de9abfb3150733f5ee60
|
File details
Details for the file primectl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: primectl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80851a258846937e978be75de60f3192430a41fdb183191ead289524175eedd1
|
|
| MD5 |
5f22a9768231acd2286b8ca6c79087b0
|
|
| BLAKE2b-256 |
bb7d6cfea5253d539e6c8b2edd3075c9620d3381ea2dcad62a635d44d8d66d38
|