osp-cli
It is also a library for teams that want to embed the upstream host, add site-specific native commands, and wrap it in a product-specific crate.
It combines:
- command execution
- interactive shell ergonomics
- layered configuration
- multiple render modes and output formats
- a small pipeline DSL
- external command plugins
Use it as:
- a normal command-line tool
- a long-running REPL with history, completion, inline help, and cached results
- a library/runtime foundation for a downstream product wrapper
As A Library
If you are evaluating osp-cli as an embedder or wrapper-crate dependency,
start with:
Install
From crates.io:
From source:
Run it:
Quick Start
CLI:
REPL:
osp> plugins commands
osp> plugins commands | P name about
osp> config explain ui.format
osp> help config
Per-invocation flags work the same in the CLI and REPL:
plugins commands --json
plugins commands --format table -v
Capabilities
- CLI and REPL entrypoints with shared command semantics
- history, completion, highlighting, and scoped shells in the REPL
- invocation-local output and debug controls
- output formats including table, JSON, markdown, mreg, and value
- a row-oriented pipeline DSL for filtering, projection, grouping, sorting, aggregation, and quick search
- profile-aware config with file, env, secrets, CLI, and REPL-session layering
- theming, color policy, unicode policy, and presentation presets
- plugin discovery and dispatch through a JSON subprocess protocol
Configuration And Output
Default paths:
- config:
<platform-config-dir>/osp/config.toml(for example~/.config/osp/config.tomlon Linux) - secrets:
<platform-config-dir>/osp/secrets.toml(for example~/.config/osp/secrets.tomlon Linux)
On Linux, XDG_CONFIG_HOME overrides the base config directory when set.
Invocation flags such as --json, --format, --color,
--plugin-provider, -v, -q, and -d affect only the current
command. They do not mutate stored config.
See:
Plugins
osp-cli can discover external commands from configured plugin
directories and invoke them through a documented JSON protocol.
See:
Documentation
Start with:
If you are just using osp, read these first:
Core operator guides:
If you are building a product wrapper on top of osp-cli, read these:
If you are writing plugin executables or other extension-side integrations, read these:
If you are working on the repo itself, read:
Development
Useful commands:
See: