Skip to content

massimobonanni/KubePizza

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ• kubepizza โ€” a playful System.CommandLine demo

A kubectl-style pizza orchestrator built with .NET System.CommandLine.
Playful, but designed to showcase all the key features of the library โ€” from parsing and validation to tab completion, custom help, and testable command handlers.


๐Ÿš€ Overview

kubepizza is a demo CLI that simulates managing pizza orders like Kubernetes manages pods.
Itโ€™s built to support a live session or workshop titled:

โ€œCLI-first: Modern command-line apps with System.CommandLineโ€

Through a series of progressive demos, it illustrates how to create modern, structured, and testable command-line tools in .NET.


๐Ÿงฉ Demo Steps

Step Topic Example Command Features Highlighted
1 Basic command and parameter parsing kubepizza order create --pizza margherita --size large --toppings basil,mozzarella Arguments, options, parsing
2 Commands and subcommands kubepizza order list, kubepizza topping add Nested commands, aliases, global options
3 Parameter validation kubepizza order create --size small --toppings mozzarella,cheddar,parmesan Validation rules, error messages
4 Tab completion kubepizza order create --pizza [TAB] Dynamic completions, AddCompletions()
5 Custom help kubepizza order create --help Custom HelpBuilder, rich descriptions
6 Final application kubepizza order list --output table Middleware, formatting, testable handlers

๐Ÿง  Learning Goals

  • Understand the core concepts of System.CommandLine (RootCommand, Option, Argument, CommandHandler).
  • Learn how to structure and test CLI applications in .NET.
  • Discover built-in features: autocomplete, validation, help generation, and dependency injection.
  • Build a production-grade CLI using the same library that powers the .NET SDK tools.

About

kubepizza is a playful yet practical demo CLI built with System.CommandLine. It simulates a pizza delivery orchestrator โ€” think kubectl, but for pizzas! ๐Ÿ• The project showcases all key features of the library: command hierarchies, argument parsing, validation, tab completion, custom help, and testable command handlers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors