Skip to main content
cargo pantry is a cargo subcommand that launches and scaffolds TUI Pantry projects.

Commands

cargo pantry

Launch the Pantry. Requires a pantry.toml in the current directory (or a -p flag targeting a workspace package that has one).
cargo pantry
Runs cargo run --example widget_preview --features tui-pantry with inherited stdio so the TUI owns the terminal. Falls back to --features pantry if the first feature name is not found.

cargo pantry init

Scaffold a new pantry in the current crate. Requires a Cargo.toml in the working directory.
cargo pantry init
This creates:
  • tui-pantry as an optional dependency (via cargo add tui-pantry --optional)
  • pantry.toml with default config
  • examples/widget_preview/main.rs: entry point using tui_pantry::run!()
  • examples/widget_preview/widgets.rs: sample Widget tab ingredients
  • examples/widget_preview/panes.rs: sample Panes tab ingredients
  • examples/widget_preview/views.rs: sample Views tab ingredients
Existing files are not overwritten. The scaffold compiles and runs immediately.

Flags

-p <package> / --package <package>

Target a specific workspace package:
cargo pantry -p my-widget-crate
All other flags are forwarded to cargo run.