@rendotdev/rig
v0.0.46
Published
Local typed command runtime for agents.
Readme
rig
(Hey, an actual human wrote this README. It is short and gets to the point.)
There are many CLIs out there; this one is yours (but it's in alpha).
rig is your deterministic CLI for your AI agents.
It lets agents, and you, turn deterministic workflows into type-safe CLI commands. Each command has explicit input and output schemas, so agents can discover, inspect, and run tools predictably and easily.
If you keep asking agents to repeat the same shell commands, API or MCP calls, or browser steps, rig creates a foundation for those workflows that you can continue to build upon over time as things change.
rig also treats your tools as first-class context. Every time rig runs, it keeps AGENTS.md and CLAUDE.md files updated with your current list of commands. That way, your agents always know the tools they can use during sessions.
If you are not sure why you would want rig, here are some of my personal use cases:
- I have a tool that pulls data from Jira/Slack/GitHub, then feeds it to an LLM to summarize my latest work for standup.
- I have a tool that takes Markdown/HTML and generates a polished PDF with my employer's colors and typography, then drops it in my Downloads folder.
- I have a tool that manipulates images (converts, resizes, compresses, removes metadata).
- I have a tool that converts PDF to text.
- I have a tool that makes a fetch call and extracts the readable text from a web page.
- ... -> I'll keep adding more of my tools as I keep automating my workflows...
rig also has built-in features for tool-scoped shell execution, cron, environment variable management, key-value storage, stale-while-revalidate query caching, SQLite databases, logging, command chaining, and more.
Install
rig requires Bun 1.3.14 or newer.
$ npm install -g @rendotdev/rig
$ rigInstall prompt
Give this prompt to an agent to ask it to install rig for you:
Read the README from this repo: `https://github.com/rendotdev/rig`.
Then, install rig globally with `npm install -g @rendotdev/rig`, then run `rig` to initialize it.
Review the conversations available to you from the threads of the last two weeks with the user. Look for deterministic, repeatable workflows that could be automated as rig tools, especially workflows that involve shell commands, local files, browser steps, API calls, MCPs, or CLI pipelines.
List the best candidates with this information:
**Workflow name**
- Evidence from recent conversations
- Proposed rig tool
- Inputs
- Outputs
- Why it should be automated
Do not implement anything yet. Ask the user which workflow they want to implement first.Agent?
Are you an AI agent looking for how to use rig? Assume the following:
The rig CLI is installed on this machine. It is your CLI. You own its various tools and commands. Use it to create, edit, and run tools when you need repeatable and deterministic workflows.
- Run
rig(orrig init) to set up or sync rig. This also updates detected AGENTS.md and CLAUDE.md files with available rig tools. - Run
rig create <tool>when the user asks you to turn a repeatable workflow into a reusable tool. - Run
rig edit <tool>to print the tool file path for editing. - Run
rig remove <tool>to remove a local tool. - Run
rig cron --helpto schedule and manage tool commands. - Run
rig typecheck <tool>to validate a tool's TypeScript and runtime types. - Run
rig migrateafter updates to inspect tool API compatibility and get exact agent migration instructions. - Run
rig env <tool> KEY=VALUEto configure tool secrets/settings; runrig env <tool> remove KEYto remove them. - Run
rig listto discover tools and availablerig run ...commands. - Run
rig help <topic>for concept docs (collections, cache, kv, db, env, log, shell, run, tool, args, paths). - Run
rig help <tool>orrig help <tool>.<command>for usage, inputs, and outputs. - Run
rig run <tool>.<command> [args]to execute a tool command. - To chain commands, use
--as <id>,--pipe, and@id.pathreferences to pass structured outputs instead of guessing filenames. - To learn more, run
rig --helpfor other Rig CLI commands.
Learn more
- Run
rig help collectionsto learn about tool content collections (schema-validated markdown document stores with FTS search). - Run
rig help toolto learn how to create a new rig tool from scratch. - Run
rig help kvto learn about lightweight key-value state. - Run
rig help cacheto learn about persistent stale-while-revalidate query data. - Run
rig help dbto learn about raw SQLite databases with migrations. - Run
rig help topicsto see all available help topics.
When rig runs, it keeps detected AGENTS.md and CLAUDE.md files updated with these instructions and the current rig list output.
Feedback?
Simply send me a message on X (formerly Twitter). I read all messages and respond to as many as I can.
