A command-line tool that bundles Oscar Kilo’s externally usable
services into one binary. Today: git ops against
klee, and LLM embeddings against
klex. More LLM utilities (one,
exemplary) coming as the legacy klex-git binaries fold in.
Designed for both humans and AI agents (Claude, OpenClaw) to use directly from the command line.
okg is world-public. It runs anywhere — on developer laptops,
in cloud workers, in agent sandboxes — and authenticates
against OscarKilo services with a Klex API key saved to
~/.config/okg/config.json. The wire formats it sends and
decodes are deliberately limited to fields that are safe to
expose outside any data center.
If you’re writing an LLM agent, an automation script, or anything else that runs outside Oscar Kilo’s infrastructure, okg is the entry point.
go install oscarkilo.com/okg@latest
Or build from source:
git clone https://code.oscarkilo.com/okg
cd okg && go build .
By default okg talks to the production klee host
(https://code.oscarkilo.com); the only setup you need is your
API key. okg auth login saves it to
~/.config/okg/config.json.
# Non-interactive (for agents and scripts).
okg auth login --key sk-...
cat ~/.klex.key | okg auth login # equivalent, ps-safe
# Interactive (prompts for host then key).
okg auth login
Override the host for dev/local work with --host on auth login.
okg repo list
okg pr list [--state open|closed]
okg pr create --head BRANCH [--base master] --title TITLE [--body BODY]
okg pr view NUMBER
okg pr diff NUMBER
okg pr comment NUMBER --body BODY [--approve | --request-changes]
okg pr merge NUMBER
okg pr close NUMBER
okg pr reopen NUMBER
okg auth login [--key KEY] [--host HOST]
okg group list [--json]
okg group create NAME [--full-name TEXT] [--owner USER]
okg group add-member GROUP USER [USER ...]
okg group remove-member GROUP USER [USER ...]
okg group members GROUP [--json]
okg group delete NAME
okg authz list [--json]
okg authz set URI OWNER READER
okg authz delete URI
okg chat send TO TEXT
okg chat fetch [--to GROUP] [--json]
okg embed [--model NAME] [--dims N] [--full-path]
(reads stdin → vectors on stdout)
okg one [--model NAME] [--system-file FILE] \
[--prompt-file FILE] [--attach FILE] \
[--format text|json|jsonindent] [--fast-fail]
(reads stdin as a JSON MessagesRequest)
okg exemplary [--dir DIR] [--model NAME] [--dry-run] [--debug]
(few-shot batch runner; walks <case>.<ext>
files in DIR, writes responses to <case>.out)
With okg exemplary in place, the standalone klex-git
binaries (one, embed, exemplary) are deprecated.
--repo REPO overrides auto-detected repo name
(normally parsed from git remote get-url origin)--json outputs raw JSON for any commandOKG_REPO env var also overrides repo detectionLike gh, okg detects the repo from the current directory’s
git remote:
git remote get-url origin
→ https://code.oscarkilo.com/widget.git
→ repo = "widget"
oscarkilo.com/klex-git for the LLM API client (transitional;
to be folded in once all klex-git binaries have moved here).