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.5.0.tar.gz (43.7 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.5.0-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for primectl-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c9a54bd753f7d2ce46bc189b7a72a2f67081928bb750a9df2fe1cf3b7cb6d370
MD5 f7f21679ea6ac238ef1b95f11a7e5095
BLAKE2b-256 421fc4717587047cb2034da58a1b37f251445351e3a2abf29d5e2aa5c8268e59

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primectl-0.5.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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 689cc235fc802d15978d2b3d197688ca8cf9b4ec4926b7bdee67f1e268bc5116
MD5 9b15745ab88b074a5bb66a5eac867bbc
BLAKE2b-256 99c009070db6b9a76af1cb36411b476146b4da676b9b32f873889eb4e519a422

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

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