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

Uploaded Python 3

File details

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

File metadata

  • Download URL: primectl-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 9740b2ff523beaa289c021adc8965d20066e7e6d9b40c85fadb04cf5cdebf716
MD5 df80e16b640a7c53e83b14a8a57b8cb8
BLAKE2b-256 d923a558ba02623b0496c33263fc7f224765783a15ea0f416a71fb1f67890e5b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: primectl-0.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 965ce1d21bd96c58b2531179ab7d482a4399da5c5ce438f819b9069607fa4d8d
MD5 92810c469ebe35e4f9669bd3a5e26705
BLAKE2b-256 62220c6a6845ec2e2b684f730eea5829560f941e7fd457144ae6200ac5963687

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

This release

0.3.0 This release

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