Crate cata

Source
Expand description

cata(lyst) for building complex CLI tools.

This crate provides a collection of utilities that make it easier to build CLI tools.

  • command: recursively traverse a tree of clap commands and subcommands calling lifecycle hooks at each level.
  • file: derive clap::value_parser for deserializing values from files. Detects the file format from the extension and currently supports JSON in addition to YAML.
  • output: structured output for commands. Users can choose the output format they would like, currently supporting JSON, YAML and pretty.\
  • telemetry: a simple way to track activity and errors for your CLI.

Re-exports§

pub use crate::command::Command;
pub use crate::output::Format;

Modules§

command
Lifecycle hooks for arbitrarily deep trees of clap commands.
file
Consume input into a struct automatically.
output
Structured output for commands.
telemetry
Integrate activity and error reporting with tracing

Functions§

execute
Executes a command and all of its subcommands.

Derive Macros§

Container
Derive the Container trait for structs and enums.
File
Implement value parsing for arbitrary structs deserialized from files.