At a complex sequence of git, pnpm, and docker commands, trying to remember the exact flags for a clean build and deploy. Usually, this involves a round-trip to an LLM, a "hope this doesn't break everything" copy-paste, and a prayer to the terminal gods.
The problem isn't the AI's ability to help, it's the lack of a validation layer between a model's potential hallucination and your actual file system. We need a way to turn "plain English" into executable, schema-validated plans that we can actually review before hitting enter.
json-cli solves this by acting as a strict task runner. It takes your intent, generates a JSON plan validated by a Zod schema, and checks it against a whitelist of allowed commands. It's essentially a "Safety First" AI wrapper for your terminal that supports Claude, OpenAI, and even local models via Ollama. By moving from raw strings to validated JSON, you get the speed of AI with the guardrails of a predictable state machine.
Here is how you can put your terminal on autopilot without losing control:
1. Natural Language Task Execution
Instead of remembering every flag, just describe the goal. The CLI handles the translation into a valid command string.
# Single intent
json-cli "please run tests"
# Multiple intents in one go
json-cli "heyy ... run typecheck, test and then check git status"
2. Flexible Provider Support
You aren't locked into one API. You can use Claude for complex logic or Ollama if you want to keep your task descriptions entirely local and private.
# Using OpenAI
pnpm dev "run build and publish" --provider openai
# Using Ollama (Local)
pnpm dev "start dev server" --provider ollama
3. The Safety Catalog
The runner doesn't just execute anything. It checks a whitelist of allowed commands (pnpm, npm, git, etc.) to prevent the AI from accidentally running something destructive.
# The workflow looks like this:
# User Prompt -> AI Provider -> JSON Plan (Zod Validated) -> Catalog Check -> User Confirm -> Execution
Wrap Up
The future of CLI work isn't memorizing every flag in a man page, it's about describing the goal and having a validated system handle the boilerplate. By moving to a JSON-first execution model, json-cli gives you a "Confirm before you Commit" workflow that makes AI-assisted terminal work actually safe for production.
Check out the task catalog, review the validation schema, or contribute to the project at this repository: github.com/ekaone/json-cli
Happy intent 😉
Top comments (0)