Part of the tinker toolkit: tinker-cli (this repo) · tinker-nvim
A CLI tool that helps AI agents build interactive demo files for users to explore in their editor.
The --help text is comprehensive enough to serve as the only documentation an LLM needs.
uvx tinker-cli
or
pip install tinker-cli
tinker init parser-demo --lang python
tinker cell parser-demo "Import and test the new parser"
tinker code parser-demo <<'EOF'
from myproject.parser import Parser
p = Parser()
result = p.parse("hello")
assert len(result.tokens) == 1
print("Parser works:", result)
EOF
tinker set-command parser-demo "python .tinker/parser-demo/demo.py"
tinker run parser-demo
tinker show parser-demoThe agent builds the demo, runs it to verify correctness, then tells the user the file path. The user opens it in their editor and explores interactively -- stepping through cells, modifying code, and re-running.
| Command | Description |
|---|---|
tinker init <name> --lang <lang> |
Create a new demo |
tinker cell <name> [text] |
Append commentary (text or stdin) |
tinker code <name> [code] |
Append code (code or stdin) |
tinker set-command <name> <cmd> |
Set the run command |
tinker run <name> |
Execute the demo |
tinker show <name> |
Print demo file and command |
tinker pop <name> |
Remove the last cell |
tinker list |
List all demos in this project |
Run tinker --help for the full reference.
python, c, zig, go, javascript, bash
-
Python uses percent-format (
# %%cells) for REPL-based exploration. Each cell is a block of code preceded by a# %%marker and optional commentary. This is the same format used by Jupyter, Spyder, and VS Code's interactive window. -
Compiled languages (C, Zig, Go) and scripting languages (JavaScript, Bash) use standalone source files with
// ---commentary delimiters.
- The LLM calls
tinker initto create a demo file. - It adds cells with
tinker celland fills them withtinker code. - It sets the run command with
tinker set-commandand runs the file withtinker runto verify everything works. - It tells the user the file path.
- The user opens the file in their editor and steps through the cells interactively.
The demo files are plain source files. No special runtime or notebook format is required.
tinker-nvim is the Neovim plugin companion. It provides:
<leader>rsto send cells to a REPL (IPython via toggleterm)<leader>rfto run the file]h/[hto navigate between cells
The CLI produces files; the plugin runs them interactively. They are fully independent -- neither imports nor depends on the other.
- Showboat by Simon Willison -- LLM-as-user CLI design, where the
--helptext is the skill instruction. - Solveit by fast.ai -- exploratory dialog over code dumps.
- jupytext.nvim -- plain
.pyfiles with# %%cells, no notebook JSON.
MIT