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.4.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.4.0-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: primectl-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 5ed298b3b44f16246394f2425f5e7e59fb39f59895c5a98f6a8ad13988da3ac7
MD5 a20b25c4ad75c6d737b5cdfec682ebca
BLAKE2b-256 5dfa3e7192667d38a60a64af5ada231169b07effd3d10539c552ba6b07491bf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primectl-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc2c924759cad649a0cb497a325dd40bb5b12e6c56cfde194d44030423668a25
MD5 79581bcf80fa8fa9b03fcb213967e423
BLAKE2b-256 6dc85e7d97b9237260de4fe73504957b73629f467bb8f38c72c75853837392a7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.0

2 files

This release

0.4.0 This release

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