X Tutup
Skip to content

unioslo/osp-cli-rs

Repository files navigation

Verify Release Crates.io Docs.rs

osp-cli

osp-cli screenshot

`osp-cli` is a batteries-included Rust CLI and interactive REPL for structured operational workflows.

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

Install

From crates.io:

cargo install osp-cli

From source:

cargo install --path .

Run it:

osp --help
osp

Quick Start

CLI:

osp config show
osp theme list
osp plugins list

REPL:

osp> ldap user alice
osp> ldap user alice | P uid cn mail
osp> ldap user alice --cache | V uid
osp> help config

Per-invocation flags work the same in the CLI and REPL:

osp ldap user alice --json
osp ldap user alice --format table -v
ldap user alice --json
ldap user alice --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: ~/.config/osp/config.toml
  • secrets: ~/.config/osp/secrets.toml

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:

Core guides:

Development

Useful commands:

./scripts/check-rust-fast.sh
cargo test --all-features --locked
python3 scripts/check-coverage-gate.py --fast

See:

License

GPLv3

About

The Rust implementation of osp: a plugin-driven CLI + REPL with layered config and consistent output rendering.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Languages

X Tutup