Architecture¶
Overview¶
The CLI is split into focused modules:
cli.py: Typer app and command wiringgenerator.py: LLM inference and prompt handlingsafety.py: safety checks for commandsexecutor.py: execution viasubprocessconfig.py: local config storage for API key
Flow¶
- User provides a prompt
generate_command()calls Groq to produce a commandunsafe_reasons()evaluates risk- Command is shown to the user
- If confirmed,
run_command()executes it with a timeout
Extension points¶
- Swap the LLM provider in
generator.py - Add advanced safety policies in
safety.py - Add stronger sandboxing in
executor.py