Skip to content

sprezzature-cli-gui

command-line interface (CLI) → graphical user interface (GUI)

Wrap an existing command-line tool in a single-page vanilla-JavaScript (JS) + Tailwind GUI: read the arg parser, emit forms and file inputs, and build the exact command line.

Makes

  • One self-contained HTML file wrapping your CLI: the markup, the Tailwind config and the script that builds the command line, all inline
  • Sub-commands and flags mapped to forms, segmented controls, file inputs
  • The exact command line, assembled in the visitor’s own browser and never run there. Copy it, or wire it to a Tauri invoke, a FastAPI endpoint, a shell
  • For a bespoke wrapper the agent spec goes further than the one command: host wiring, and a streaming log panel for the commands that take a while
  • Imports and walks the parser object itself for argparse, Click and Typer — a Typer app is converted by typer and then walked as Click, because that is what it already is
  • For clap, commander and cobra: --from-help runs the tool’s own --help and reads the text. Works on any CLI at all, and lower fidelity, because help text says less than a parser knows
  • A Click group takes its name from the decorated function, which is almost never the command you installed. Unasked, the page would build a command line that does not exist

Audits

  • sprezzature-cli-gui-audit reads the parser and the page back together: every sub-command and flag reachable, no field building an option the parser rejects, no choice quietly dropped, and a command line seeded with the name the tool is installed as. Exit 1 on any finding, so it gates a build
  • Follows the sprezzature-ui stack rules: install sprezzature-ui alongside for the full design tokens
  • Hardening guidance for shipping the wrapper safely

Say one of these

The skill triggers itself on phrasing like this, no command to memorize.

wrap this CLI in a GUI argparse to GUI click to web UI GUI for my Python script Typer / clap / cobra to GUI frontend for a CLI streaming log panel

Reference library

The knowledge the skill draws on: read them straight from the repo.

Frequently asked questions

How do I install sprezzature-cli-gui?

Run pip install sprezzature-cli-gui (Python 3.10 or newer): one install brings the argparse, Click and Typer readers, the --from-help reader, the audit, the HTTP API and the MCP server, with no extras to choose. For the agent skill, pip install sprezzature then sprezzature-skills --install, or sprezzature-skills --install --agent opencode for OpenCode.

Which command-line parsers can sprezzature-cli-gui read?

sprezzature-cli-gui imports and walks argparse, Click and Typer parsers directly, so every sub-command, flag and choice comes from the parser itself. A tool written in anything else, such as Go's cobra or Rust's clap, goes through --from-help, which runs the tool's own --help and reads the text, at lower fidelity.

What does the GUI made by sprezzature-cli-gui contain?

sprezzature-cli-gui writes one self-contained HTML page in plain JavaScript and Tailwind: a collapsible section per sub-command and a field per option (checkbox, dropdown, number or text). Pressing “Build command” assembles the exact command line in the browser; the page never runs it, so you copy it or wire it to a Tauri invoke or a server.

Does sprezzature-cli-gui send my code to a cloud service or need an AI model?

No: sprezzature-cli-gui uses no model and no Ollama, and its command line imports your CLI on your own machine; the HTTP API and the MCP server only accept the parser tree, never a module to import. The one network call is the generated page's: it loads Tailwind from cdn.tailwindcss.com for styling, and its fields still work unstyled offline.

Can I use sprezzature-cli-gui without Claude Code?

Yes: sprezzature-cli-gui is a Python library (walk, render_html, audit), a command line such as sprezzature-cli-gui my_pkg.cli:build_parser --out gui.html, an HTTP API with a Docker image, and an MCP server, sprezzature-cli-gui-mcp, for any MCP client. The agent skill is only one of those ways in.

How is sprezzature-cli-gui different from Gooey, Streamlit or Gradio?

Gooey also reads your parser, but it runs the command in a wxPython desktop window, whereas sprezzature-cli-gui emits a static HTML file that builds the command line and runs nothing. Streamlit and Gradio read no parser at all: you write every widget yourself, which is the right trade when the interface is the product rather than a face on an existing command.

Can I run sprezzature-cli-gui in CI?

Yes: sprezzature-cli-gui-audit mytool.cli:build_parser gui.html reads the parser and the page back together and exits 1 when the page has fallen behind the CLI, for instance a flag with no field, a field for an option the parser rejects, a dropped choice or the wrong program name. Add --format json for a machine-readable report.

Is sprezzature-cli-gui free?

Yes. sprezzature-cli-gui is open source under the BSD 3-Clause licence, with no account, API key or paid tier, and its source is on GitHub.