{"slug": "instagui-turn-any-cli-into-a-web-gui-with-one-command", "title": "Instagui – turn any CLI into a web GUI with one command", "summary": "Instagui, a new open-source tool, lets users turn any command-line interface into a web GUI with a single command by parsing the tool's --help text using AI. The tool requires no code changes to the CLI and works instantly with bundled schemas for ffmpeg, yt-dlp, and pandoc, while other tools need a one-time Claude API key for schema extraction. It aims to make powerful CLIs accessible to non-terminal users while teaching them the underlying commands.", "body_md": "**Any CLI. Instant GUI. One command.**\n\nTurn any command-line tool into a clean local web form — no config, no code changes to the tool.\n\n```\nnpx instagui ffmpeg\n```\n\nThat's it. instagui reads the tool's `--help`\n\n, turns it into a web form, opens your browser, and\n(when you click **Run**) executes the command locally and streams the output back — while always\nshowing you the exact command it will run, so it teaches you the CLI instead of hiding it.\n\nThousands of powerful CLIs (ffmpeg, pandoc, yt-dlp, curl, imagemagick…) are unfriendly to anyone\nwho doesn't live in a terminal — and even experts re-read man pages to recall flag syntax. Tools\nlike Gooey require the tool's *author* to change their code. instagui needs nothing from the tool: it\nparses the tool's own `--help`\n\ntext with AI into a structured schema and renders that as a form.\n\nThe three demo tools ship with **bundled schemas**, so they work instantly with **no API key**:\n\n```\nnpx instagui ffmpeg      # video/audio transcoding\nnpx instagui yt-dlp      # download media\nnpx instagui pandoc      # convert documents\n```\n\nFor any *other* tool, instagui extracts the schema on first run using the Claude API (see\n[How it stays free](#how-it-stays-free)):\n\n```\nexport ANTHROPIC_API_KEY=sk-ant-...    # POSIX\n$env:ANTHROPIC_API_KEY=\"sk-ant-...\"    # Windows / PowerShell\nnpx instagui curl\n```\n\nGet a key at [https://console.anthropic.com](https://console.anthropic.com). The first extraction is cached, so every launch\nafter that is instant and free.\n\n**Capture**— run`<tool> --help`\n\n(falling back to`-h`\n\n,`help`\n\n, then the man page), reading both stdout and stderr, under a timeout and size cap so a misbehaving tool can't hang the launch.**Extract**— send the help text to the Claude API (`claude-haiku-4-5`\n\n) and get back a validated JSON schema of the tool's options (name, flag, type, description, enum values, required, grouping) plus positional arguments. Invalid output is retried once, then fails clearly.**Serve**— render the schema as a single-page form on`http://127.0.0.1`\n\n, grouped, with the right control per type (checkbox / dropdown / number / text).**Preview**— show the exact command as you edit the form, one-click copyable.** Run**— execute the command with`spawn`\n\n(arguments array, never a shell string) and stream stdout/stderr live into the page until it exits.\n\ninstagui resolves a schema in this order, and only the last step costs an API call:\n\n| Precedence | Source | Needs a key? |\n|---|---|---|\n| 1 | `--schema <file>` override you supply |\nno |\n| 2 | Your cache in `~/.instagui/` (written on first extraction) |\nno |\n| 3 | Bundled schemas shipped with the package (ffmpeg, yt-dlp, pandoc) | no |\n| 4 | Fresh extraction via the Claude API | yes |\n\nSo the demo tools are free forever, any tool you've used once is free forever after, and you only need a key the first time you point instagui at a brand-new tool. A friendly message tells you exactly what to do if a key is needed and missing — you're never dropped into a stack trace.\n\n`--refresh`\n\nre-extracts and overwrites your cache entry.`--schema ./mytool.json`\n\nuses a hand-tuned schema and skips capture**and** the AI entirely.\n\n```\ninstagui <tool>                 resolve <tool>'s Schema and serve the Form (auto-opens the browser)\ninstagui <tool> --print         resolve and print the Schema JSON instead of serving\ninstagui <tool> --schema <path> use a hand-supplied Schema file (no capture, no AI)\ninstagui <tool> --refresh       ignore cache + bundled and re-extract fresh\ninstagui <tool> --help-file <p> extract from a captured help-text file\n<tool> --help | instagui <tool> or pipe help text on stdin\n\n  --port <n>     preferred port for the Form server (default 5177; falls back if busy)\n  --no-open      do not auto-open the browser (still prints the URL)\n  --model <id>   extraction model (default: claude-haiku-4-5)\n  -v, --version  print the instagui version\n  -h, --help     show help\n```\n\ninstagui is a **local, single-user tool**. Be clear-eyed about what it does:\n\n**It runs commands you compose.** The whole point is to execute a real CLI with the arguments you set in the form. Treat the form like your own terminal — don't run something you wouldn't type.**The exact command is always shown before you Run it.** No hidden arguments; preview is generated from the*same*argument array that Run executes, so what you see is what runs.**Arguments are passed as an array to** A value containing spaces, quotes,`spawn`\n\n, never concatenated into a shell.`;`\n\n, or`&&`\n\nis passed verbatim as a single argument — there is no shell to interpret it, so form input can't inject extra commands.**The server binds** It is not reachable from your network.`127.0.0.1`\n\nonly.**State-changing requests fail closed.**`POST /run`\n\nand`POST /stop`\n\nrequire a matching`Origin`\n\nheader; a missing or foreign origin is rejected (CSRF protection). Exactly one run at a time, and closing the tab (dropping the stream) kills the child process — no orphans.**Your API key is never logged, echoed, or embedded in any served page.** The only data that leaves your machine is the tool's help text, sent to the Claude API for extraction. No telemetry.\n\nWant a tool to work keyless for everyone, like the demo tools do? Bundled schemas live in\n[ schemas/](/Soutar97/instagui/blob/main/schemas) and are generated from captured\n\n`--help`\n\nfixtures:- Capture the tool's help into\n`test/fixtures/<tool>-help.txt`\n\n. - Add the tool to\n`scripts/gen-bundled-schemas.ts`\n\n. - Regenerate with your key:\n`ANTHROPIC_API_KEY=sk-ant-... npx tsx scripts/gen-bundled-schemas.ts`\n\n(a hallucination guard + golden check run before anything is written). - Open a PR with the fixture and the generated\n`schemas/<tool>.json`\n\n.\n\nEach generated schema is validated so every flag appears verbatim in the source help text — no\nhallucinated options. See [ schemas/README.md](/Soutar97/instagui/blob/main/schemas/README.md) for provenance details.\n\n**Node.js ≥ 22**- An\n`ANTHROPIC_API_KEY`\n\nonly for extracting a tool that isn't bundled or cached.\n\nDeliberately out of scope to keep it small and sharp: interactive/TUI programs (vim, top, REPLs);\nsubcommand trees (flat tools only — `git commit`\n\nvs `git push`\n\nis v0.2); native file-picker dialogs;\na hosted version, auth, telemetry, or a plugin system; a local-LLM option (contributions welcome).\n\nMIT © Omar", "url": "https://wpnews.pro/news/instagui-turn-any-cli-into-a-web-gui-with-one-command", "canonical_source": "https://github.com/Soutar97/instagui", "published_at": "2026-07-07 12:08:33+00:00", "updated_at": "2026-07-07 12:30:09.851606+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "ai-tools", "generative-ai"], "entities": ["Instagui", "Claude API", "Anthropic", "ffmpeg", "yt-dlp", "pandoc", "curl", "ImageMagick"], "alternates": {"html": "https://wpnews.pro/news/instagui-turn-any-cli-into-a-web-gui-with-one-command", "markdown": "https://wpnews.pro/news/instagui-turn-any-cli-into-a-web-gui-with-one-command.md", "text": "https://wpnews.pro/news/instagui-turn-any-cli-into-a-web-gui-with-one-command.txt", "jsonld": "https://wpnews.pro/news/instagui-turn-any-cli-into-a-web-gui-with-one-command.jsonld"}}