# Pimalaya CLI [](https://docs.rs/pimalaya-cli/latest/pimalaya_cli) [](https://matrix.to/#/#pimalaya:matrix.org) [](https://fosstodon.org/@pimalaya) [](https://pimalaya.org/sponsor/)
CLI utils for Pimalaya
Shared building blocks for the Pimalaya command-line tools: the pieces every CLI would otherwise reimplement, factored out behind cargo features so each binary pulls in only what it uses. Unlike the io-* protocol libraries this crate is deliberately std, since it exists to talk to a terminal, a filesystem and a human.
## Table of contents
- [Features](#features)
- [Usage](#usage)
- [Examples](#examples)
- [AI policy](https://github.com/pimalaya/.github/blob/master/AI_POLICY.md)
- [License](#license)
- [Social](#social)
- [Contributing](./CONTRIBUTING.md)
- [Sponsoring](#sponsoring)
## Features
- **Argument parsing glue**: shared clap arguments and the ready-made completion, manual page and JSON Schema generation commands, so every binary exposes them the same way: a positional list selecting what to generate, an optional `--dir` to write files in, and the standard output otherwise.
- **Output rendering**: a printer that writes command output and a reporter that writes failures, both to stdout, as JSON or as plain text: records as aligned `Label: value` lines, lists as borderless aligned columns, untrusted strings defused.
- **Logging**: a logger initialized from a shared verbosity flag.
- **Interactive input**: text, confirmation and choice prompts, and a cancellable spinner for long-running work.
- **Sessions**: a read-eval-print loop running the binary's own commands over stdin, and a Model Context Protocol server over stdio whose tools may take their input from the clap grammar, both holding one account open across commands.
- **Build helpers**: small utilities for build scripts, such as feature and git metadata.
> [!TIP]
> Pimalaya CLI is written in [Rust](https://www.rust-lang.org/) and uses [cargo features](https://doc.rust-lang.org/cargo/reference/features.html) to gate each tool. The default feature set is declared in [Cargo.toml](./Cargo.toml) or on [docs.rs](https://docs.rs/crate/pimalaya-cli/latest/features).
## Usage
See documentation at [docs.rs](https://docs.rs/pimalaya-cli/latest/pimalaya_cli).
## Examples
See complete examples at [./examples](./examples).
## License
This project is licensed under either of:
- [MIT license](LICENSE-MIT)
- [Apache License, Version 2.0](LICENSE-APACHE)
## Social
- Chat on [Matrix](https://matrix.to/#/#pimalaya:matrix.org)
- News on [Mastodon](https://fosstodon.org/@pimalaya) or [RSS](https://fosstodon.org/@pimalaya.rss)
- Mail at [pimalaya.org@posteo.net](mailto:pimalaya.org@posteo.net)
## Sponsoring
[](https://nlnet.nl/)
Special thanks to the [NLnet foundation](https://nlnet.nl/) and the [European Commission](https://www.ngi.eu/) that have been financially supporting the project for years:
- 2022 → 2023: [NGI Assure](https://nlnet.nl/project/Himalaya/)
- 2023 → 2024: [NGI Zero Entrust](https://nlnet.nl/project/Pimalaya/)
- 2024 → 2026: [NGI Zero Core](https://nlnet.nl/project/Pimalaya-PIM/)
- 2026 → 2027: [NGI Zero Commons Fund](https://nlnet.nl/project/Pimalaya-pimdir/)
This program is part of Pimalaya, free software funded entirely by grants and donations. If you find it useful, consider [sponsoring](https://pimalaya.org/sponsor/) its development:
[](https://github.com/sponsors/soywod)
[](https://ko-fi.com/pimalaya)
[](https://www.buymeacoffee.com/pimalaya)
[](https://liberapay.com/pimalaya)
[](https://thanks.dev/u/gh/soywod)
[](https://www.paypal.com/paypalme/soywod)