The Visual Dimension Elevator in Unix Pipes
Agent outputs JSON in โ Human's visual decision JSON out
ไธญๆ ยท English
AI Agents (Codex CLI, Claude Code, Cursor, Gemini CLI...) are blazing fast in the terminal. They read code, generate plans, and execute commands at machine speed.
But when they need human approval โ a refactoring plan, an architecture change, a multi-step deployment โ they dump walls of text into the terminal. Humans are forced to read 50+ lines of monospace text, mentally parse the structure, and type "yes" or "no."
This is insane. Humans are visual creatures. Our brains process images 60,000ร faster than text.
AVC is a 3MB single binary that does one thing perfectly:
echo '{"view":"plan","data":{...}}' | avc- Reads JSON from
stdin - Pops up a native WebView window with a beautiful interactive UI
- Human drags, edits, reorders โ making decisions visually
- Outputs modified JSON to
stdout - Window closes. Agent continues.
Like fzf gave CLI users interactive selection, AVC gives all CLI agents visual interaction.
Traditional pipe: agent | grep | jq | awk (text processing)
AVC pipe: agent | avc (visual processing)
One-line install (builds binary + installs skills for all detected agents):
curl -sSL https://raw.githubusercontent.com/study8677/Agent_View_Controller-AVC/main/install.sh | bashManual install
git clone https://github.com/study8677/Agent_View_Controller-AVC.git
cd Agent_View_Controller-AVC
go build -o avc .
sudo cp avc /usr/local/bin/
# Install skill for your agent
cp -r skills/avc/ ~/.codex/skills/avc/ # Codex CLI
cp -r skills/avc/ ~/.claude/skills/avc/ # Claude Code
cp -r skills/avc/ ~/.gemini/skills/avc/ # Gemini CLIcat examples/execution-plan.json | ./avcA native window pops up:
Drag steps to reorder, edit text, skip steps, add new ones, then click โ Confirm โ the modified JSON appears in your terminal.
echo '{
"view": "plan",
"title": "Database Migration v3 โ v4",
"editable": true,
"data": {
"steps": [
{"id": 1, "label": "Backup production database", "status": "pending"},
{"id": 2, "label": "Run migration scripts on staging", "status": "pending"},
{"id": 3, "label": "Verify data integrity checks", "status": "pending"},
{"id": 4, "label": "Switch DNS to maintenance page", "status": "pending"},
{"id": 5, "label": "Execute production migration", "status": "pending"},
{"id": 6, "label": "Run smoke tests", "status": "pending"},
{"id": 7, "label": "Remove maintenance page", "status": "pending"}
]
}
}' | ./avc๐ก Human can reorder steps (e.g., move smoke tests before DNS switch), skip backup if already done, or add a "Notify team on Slack" step.
echo '{
"view": "plan",
"title": "REST โ GraphQL Migration",
"editable": true,
"data": {
"steps": [
{"id": 1, "label": "Set up GraphQL server with Apollo", "status": "pending"},
{"id": 2, "label": "Define schema types for User, Post, Comment", "status": "pending"},
{"id": 3, "label": "Implement resolvers with existing service layer", "status": "pending"},
{"id": 4, "label": "Add authentication middleware", "status": "pending"},
{"id": 5, "label": "Set up DataLoader for N+1 prevention", "status": "pending"},
{"id": 6, "label": "Write integration tests", "status": "pending"},
{"id": 7, "label": "Deploy with REST fallback route", "status": "pending"},
{"id": 8, "label": "Deprecate REST endpoints", "status": "pending"}
]
}
}' | ./avc# Agent captures the human-approved plan
RESULT=$(cat examples/execution-plan.json | ./avc)
if [ $? -eq 0 ]; then
echo "โ
Human approved:"
echo "$RESULT" | jq '.data.steps[] | select(.skipped != true) | .label'
# Agent proceeds to execute only the approved, non-skipped steps
else
echo "โ Human cancelled the plan"
fi| View Type | Description | Interaction | Status |
|---|---|---|---|
plan |
Execution plans / step lists | Drag to reorder, edit, skip, add/delete | โ Ready |
graph |
Architecture topology | Drag nodes, edit connections | ๐ง Coming |
diff |
Code diff review | Accept/reject per line | ๐ง Planned |
table |
Data tables | Edit cells, sort columns | ๐ง Planned |
{
"view": "plan",
"title": "Microservice Refactor Plan",
"editable": true,
"token_count": 4500,
"data": {
"steps": [
{ "id": 1, "label": "Extract UserService", "status": "pending" },
{ "id": 2, "label": "Create API Gateway", "status": "pending" },
{ "id": 3, "label": "Configure service discovery", "status": "pending" }
]
},
"actions": ["confirm", "cancel"]
}Note:
token_countis optional. If omitted, AVC estimates from byte length.
AVC has a built-in smart filter: only when the content exceeds a token threshold (default: 3000 tokens) will the WebView window pop up. Short content passes through directly without interrupting the human.
stdin JSON โโโ AVC reads โโโ Check token count
โ
โค 3K token โ > 3K token
โ โ
Output to stdout Pop up WebView
(pass-through) Interactive review
- If the JSON contains a
token_countfield โ use that value - Otherwise โ estimate from byte length (
bytes / 3) - If token count โค threshold โ pass-through (exit code
0, original JSON on stdout)
# Always show WebView (bypass threshold)
echo '<json>' | avc --no-threshold
# Set a custom threshold
echo '<json>' | avc --threshold=5000For accurate control, have the Agent include token_count in the JSON:
{
"view": "plan",
"title": "Your Plan",
"token_count": 4500,
"data": { "steps": [...] }
}AVC is agent-agnostic โ it works with any AI coding agent that can execute shell commands.
The easiest way. Copy the skill folder into your agent's skills directory โ works globally across all projects:
# For Gemini CLI / Antigravity
cp -r skills/avc/ ~/.gemini/skills/avc/
# For any project with a skills/ directory
cp -r skills/avc/ your-project/skills/avc/Once installed, the agent automatically knows when and how to use AVC. No per-project configuration needed.
Add the included AGENTS.md to your project root (already provided in this repo).
## Visual Decision Tool
When you generate a complex execution plan (>3 steps), architecture change,
or multi-file refactoring plan, output it as AVC-compatible JSON and pipe
it through `avc` for human visual review:
echo '{"view":"plan","title":"...","data":{"steps":[...]}}' | avc
The command blocks until the human confirms. Capture stdout to get the
human-modified plan, then execute accordingly.Then Codex will automatically use AVC when it generates complex plans:
# Codex generates a plan โ pipes to AVC โ waits for human โ continues
echo '{"view":"plan","title":"Refactor Auth Module","data":{"steps":[
{"id":1,"label":"Extract auth middleware","status":"pending"},
{"id":2,"label":"Create JWT service","status":"pending"},
{"id":3,"label":"Update route handlers","status":"pending"},
{"id":4,"label":"Add integration tests","status":"pending"}
]}}' | avcIn your project's CLAUDE.md or system prompt:
## AVC Integration
For complex execution plans, use the `avc` visual tool instead of
printing plain text. Construct a JSON object with view type and data,
then pipe it through `avc`:
echo '<json>' | avc
This opens a visual UI for the human to review and modify the plan.
The modified JSON is returned via stdout. Wait for it before proceeding.In Cursor's terminal, AVC works as a standard Unix pipe tool. Configure via .cursorrules:
## Visual Planning
When generating multi-step plans, use `avc` for visual human review:
1. Construct plan as JSON with view:"plan" schema
2. Run: echo '<json>' | avc
3. Read stdout for the human-approved plan
4. Execute the approved stepsThe pattern is universal โ any tool that can:
- Write JSON to a process's stdin
- Read the process's stdout
- Wait for the process to exit
...can use AVC. It's just a Unix pipe.
| Principle | Description |
|---|---|
| Agent is CPU, AVC is Display | Agents do the thinking. AVC does the showing. |
| Agent-agnostic | Works with Codex, Claude, Gemini, Cursor, or any CLI tool |
| Unix Philosophy | stdin in, stdout out. Compose with any pipe |
| Zero Dependencies | Single binary. Uses system-native WebView |
| < 100ms Startup | Native binary, no Node.js / npm overhead |
- Go + webview/webview_go โ system-native WebView bindings
- Vanilla JS โ embedded via
go:embed, zero frontend dependencies - macOS: WKWebView ยท Linux: WebKitGTK ยท Windows: WebView2
โโโโโโโโโโโโ stdin โโโโโโโโโโโโ render โโโโโโโโโโโโ
โ AI Agent โ โโโโ JSON โโโโ โ AVC โ โโโโโโโโโโโโโ โ WebView โ
โ (Codex, โ โ (3MB Go โ โ (Native โ
โ Claude, โ โโโ JSON โโโโ โ Binary) โ โโโ confirm โ โ Window) โ
โ Cursor) โ stdout โโโโโโโโโโโโ callback โโโโโโโโโโโโ
โโโโโโโโโโโโ โ Human
AVC's vision is to become the universal visual layer for all CLI agents. Every type of structured data an agent produces should have a beautiful, interactive view.
| View | What Agent Outputs | What Human Sees | Status |
|---|---|---|---|
plan |
Steps with order & status | Draggable step list with edit/skip/delete | โ Done |
| View | What Agent Outputs | What Human Sees |
|---|---|---|
graph |
Nodes + edges (services, modules) | Interactive topology โ drag nodes, edit labels, add/remove connections |
diff |
File paths + hunks | Side-by-side diff with per-line Accept / Reject / Edit |
table |
Rows + columns | Sortable, filterable, editable data grid |
| View | What Agent Outputs | What Human Sees |
|---|---|---|
tree |
File/directory structure | Interactive file tree โ rename, move, create, delete |
timeline |
Events with timestamps | Gantt-chart-style timeline โ drag to adjust scheduling |
kanban |
Cards with columns | Kanban board โ drag cards between columns |
form |
Fields + validation rules | Multi-step wizard form โ fill in configs, select options |
mindmap |
Hierarchical ideas | Expandable mind map โ restructure by dragging branches |
| View | What Agent Outputs | What Human Sees |
|---|---|---|
metrics |
Numbers + time series | Live dashboard with charts and gauges |
flow |
Pipeline stages + conditions | CI/CD flow diagram โ reorder stages, toggle gates |
compare |
Multiple options with pros/cons | Side-by-side comparison cards โ vote & rank |
3d-graph |
Complex dependency graphs | 3D force-directed graph โ rotate, zoom, filter |
The goal: Any structured JSON โ one
| avcโ instant visual interaction. No more reading walls of terminal text.
Contributions welcome! We especially need help with:
- New view types โ Pick any from the roadmap above and implement it
- UI polish โ Animations, themes, accessibility
- Platform testing โ Linux (WebKitGTK) and Windows (WebView2)
- Agent integration examples โ Show how AVC works with different agents
Apache 2.0
