Build interactive demo files for exploring code changes. A CLI tool designed to be used by AI agents — the --help text is the only documentation needed. Produces cell-based percent-format scripts that users step through interactively in their editor. Inspired by Showboat (LLM-as-user CLI design), Solveit (exploratory dialog over code dumps), and jupytext.nvim (plain .py files, no notebook JSON).
Project description
tinker-cli
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.
Install
uvx tinker-cli
or
pip install tinker-cli
Quick example
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-demo
The 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.
Commands
| 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.
Supported languages
python, c, zig, go, javascript, bash
File formats
-
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.
How it works
- 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.
Companion: tinker-nvim
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.
Inspirations
- 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.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinker_cli-0.1.2.tar.gz.
File metadata
- Download URL: tinker_cli-0.1.2.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62ed7365f7636cf345711602ecc925947bab181394b72b9adc0a4d12d862070f
|
|
| MD5 |
351fb8ba0e97e6e99f1d26bd34a6a137
|
|
| BLAKE2b-256 |
55233bbe2b6ecbf7aa8de676cd5fbe645743a77922b1252059935c5e90409b36
|
File details
Details for the file tinker_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tinker_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05dc560d8207e17d5e87f5337ecb99daa2e7cad77b053a3acbe5776ad153a067
|
|
| MD5 |
9bf9cf44a972ec16957ebbb2e8a4caad
|
|
| BLAKE2b-256 |
08248cea6ea60f350736e6f7b27bfef13a306692440b49a66412b84b63ed07d4
|