Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

primectl-0.2.0.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

primectl-0.2.0-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file primectl-0.2.0.tar.gz.

File metadata

  • Download URL: primectl-0.2.0.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for primectl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f050e313c425bb27e2f0a928ee302d2b3be0096e1f748cf371c6b3b3b901c264
MD5 42d99616ac67548b9f80b22f57b8c36b
BLAKE2b-256 f4e28ce3a795f64451af29195f72dd2c8406055ea70eb9835ee110dfc1c0cfee

See more details on using hashes here.

File details

Details for the file primectl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: primectl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for primectl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d262c215297e5eef90aabcb54a6a84a74f97df2fde36d2156266db9d5e3121e5
MD5 f45b001d7fa608c96e2f54c769034af4
BLAKE2b-256 0e606de2122e6b60578d8c2d76973bbc5e6dabc917f4dd99d9d6bba557c64584

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page