{"repo":"thatstoasty/prism","free":true,"listed":false,"github":"https://github.com/thatstoasty/prism","clone":"git clone https://github.com/thatstoasty/prism.git","description":"Mojo CLI Library.","language":"Mojo","stars":69,"topics":["cli","mojo","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":"Prism A Budding CLI Library! Prism is a Mojo library designed to help you build command-line interfaces (CLI) with ease. It provides a simple and intuitive way to define commands, subcommands, flags, and hooks, making it easier to create powerful CLI applications. This is primarily a pet project of mine, so expect it to be a bit rough around the edges. I plan to add more features and polish it up as I go along! Inspired by: Cobra and urfave/cli ! Adding the prism package to your project First, you'll need to enable the pixi-build preview by adding this to the workspace section of your pixi.toml file. Building it from source There's two ways to build prism from source: directly from the Git repository or by cloning the repository locally. Building from source: Git Run the following commands in your terminal: Building from source: Local Basic Command and Subcommand Here's an example of a basic command and subcommand! Why are subcommands wrapped with ArcPointer ? Due to the nature of self-referential structs, we need to use a smart pointer to reference the subcommand. The child command is owned by the ArcPointer , and that pointer is then shared across the program execution. Accessing arguments prism provides the parsed cli arguments as command function arguments. Command Aliases Commands can also be aliased to enable different ways to call the same command. You can change the command underneath the alias and maintain the same behavior. Pre and Post Run Hooks Commands can be con","default_branch":null,"files":null,"tree":[],"storefront":"/r/thatstoasty","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thatstoasty/prism/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}