[ { "id": "example-basic", "name": "Basic", "icon": "πŸš€", "category": "core", "desc": "Demonstrates the basic usage of Mingling with a simple `greet` subcommand that takes a name and prints a greeting.\n", "tags": [ "dispatcher!", "#[chain]", "#[renderer]" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-argument-parse", "name": "Argument Parse", "icon": "πŸ“‹", "category": "parsing", "desc": "Shows how to use Mingling's `parser` feature with a `Picker` to extract and validate typed arguments from the command line.\n", "tags": [ "pick", "Pickable" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-async-support", "name": "Async Support", "icon": "⚑", "category": "runtime", "desc": "Shows how to drive an async runtime with Mingling using the `async` feature, enabling `async fn` in `#[chain]` with tokio.\n", "tags": [ "async", "await", "#[chain]" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-clap-binding", "name": "Clap Binding", "icon": "πŸ”—", "category": "parsing", "desc": "Demonstrates how to bind a `clap::Parser` derive struct to Mingling using `#[dispatcher_clap]` for advanced argument parsing.\n", "tags": [ "clap" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-completion", "name": "Completion", "icon": "πŸ”„", "category": "ux", "desc": "Demonstrates how to implement dynamic shell completion with `#[completion]` and generate scripts for bash, zsh, fish, and pwsh.\n", "tags": [ "comp" ], "files": [ "src/main.rs", "build.rs", "Cargo.toml" ] }, { "id": "example-custom-pickable", "name": "Custom Pickable", "icon": "🎯", "category": "parsing", "desc": "Shows how to implement the `Pickable` trait on custom types for seamless extraction from CLI arguments via Picker.\n", "tags": [ "Pickable", "custom" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-dispatch-tree", "name": "Dispatch Tree", "icon": "🌳", "category": "dispatch", "desc": "Introduces the `dispatch_tree` feature that converts the subcommand list into a compile-time prefix trie for O(n) command lookup.\n", "tags": [ "dispatch_tree" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-enum-tag", "name": "Enum Tag", "icon": "🏷️", "category": "parsing", "desc": "Shows how to derive `EnumTag` on enums for parsing variants from CLI strings with renames and descriptions.\n", "tags": [ "enum_tag", "Pickable" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-error-handling", "name": "Error Handling", "icon": "⚠️", "category": "runtime", "desc": "Demonstrates how to define custom error types with `pack!` and route them to dedicated `#[renderer]` functions for user-friendly output.\n", "tags": [ "Result" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-exitcode", "name": "Exitcode", "icon": "πŸšͺ", "category": "runtime", "desc": "Shows how to set custom exit codes using `ExitCodeSetup` and the `finish` hook to signal success or failure to the shell.\n", "tags": [ "ExitCode" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-general-renderer", "name": "General Renderer", "icon": "πŸ“€", "category": "output", "desc": "Demonstrates how to render structured output in JSON or YAML using `GeneralRendererSetup` and the `general_renderer` feature.\n", "tags": [ "general_renderer", "--json", "--yaml" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-help", "name": "Help", "icon": "πŸ’‘", "category": "ux", "desc": "Shows how to use the `#[help]` attribute to provide custom per-command help text that activates when the user passes `--help`.\n", "tags": [ "#[help]" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-hook", "name": "Hook", "icon": "πŸͺ", "category": "runtime", "desc": "Demonstrates how to use Mingling's `ProgramHook` system to observe and debug every stage of the execution pipeline.\n", "tags": [ "ProgramHook" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-implicit-dispatcher", "name": "Implicit Dispatcher", "icon": "πŸ«₯", "category": "dispatch", "desc": "Shows the abbreviated `dispatcher!(\"cmd.path\")` syntax from `extra_macros` that auto-derives struct names from the command path.\n", "tags": [ "implicit" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-lazy-resources", "name": "Lazy Resources", "icon": "πŸ’€οΈ", "category": "advanced", "desc": "Demonstrates how to use `LazyRes` for lazily initialized resources that only allocate when first accessed.\n", "tags": [ "LazyRes" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-pack-err", "name": "pack_err!", "icon": "πŸ›‘", "category": "macros", "desc": "Demonstrates how to use the `pack_err!` macro to define error types with automatic `name` field (snake_case at compile time) and optional `info` field. Also shows `--json` serialization when `general_renderer` is enabled.\n", "tags": [ "pack_err!", "extra_macros", "general_renderer", "--json" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-panic-unwind", "name": "Panic Unwind", "icon": "πŸ’₯", "category": "runtime", "desc": "Shows how to catch panics during program execution and display friendly error messages instead of a raw panic trace.\n", "tags": [ "panic_unwind" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-repl-basic", "name": "REPL Basic", "icon": "πŸ”", "category": "repl", "desc": "Demonstrates how to build an interactive REPL shell with Mingling using `exec_repl()`, custom prompts, and built-in setups.\n", "tags": [ "repl" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-resources", "name": "Resources", "icon": "πŸ“¦", "category": "advanced", "desc": "Shows how to share global state across commands using `with_resource()` and inject `&T` or `&mut T` into chain and renderer functions.\n", "tags": [ "Resources", "injection" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-setup", "name": "Setup", "icon": "πŸ—οΈ", "category": "core", "desc": "Demonstrates how to build a custom `ProgramSetup` with `#[program_setup]` for modular configuration of program behaviour.\n", "tags": [ "#[setup]", "extra_macros" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "example-unit-test", "name": "Unit Test", "icon": "πŸ§ͺ", "category": "testing", "desc": "Shows how to write unit tests for Chain and Renderer functions using the `entry!` macro and assertion helpers.\n", "tags": [ "testing", "extra_macros" ], "files": [ "src/main.rs", "Cargo.toml" ] }, { "id": "full-todolist", "name": "Todo List", "icon": "πŸ“", "category": "full", "desc": "This is a complete example project that demonstrates how to develop a todo list application using Mingling\n", "tags": [ "todolist", "CRUD", "clichΓ© example" ], "files": [ "src/main.rs", "src/todolist.rs", "src/help.rs", "Cargo.toml" ] } ]