demo

command
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 19 Imported by: 0

README

demo

A minimal coding-agent REPL built on jinn's tool-executor protocol. Demonstrates how to consume jinn as a subprocess.

This is an example, not a dependency. jinn itself is stdlib-only. This demo links an HTTP client, SSE parser, and REPL — if you build demo, you are opting into those via stdlib; if you only build jinn, you get nothing from this directory.

Build

go build -o demo ./examples/demo/

Requirements

  • jinn binary on $PATH
  • defuddle CLI on $PATH (used by the web_fetch tool inside the agent loop)

Environment Variables

Variable Default Description
DEMO_API_KEY API key (required; OPENROUTER_API_KEY and OPENAI_API_KEY are also accepted)
DEMO_MODEL openai/gpt-5.4-mini Model identifier
DEMO_BASE_URL OpenRouter chat/completions endpoint LLM API base URL
DEMO_MAX_TURNS 25 Maximum agent turns per session
JINN_BIN jinn Path to jinn binary
DEFUDDLE_BIN defuddle Path to defuddle binary (used by web_fetch)

Usage

One-shot (pipe via stdin):

echo "list files in the cwd" | demo

One-shot (inline prompt):

demo "list files in the cwd"

REPL mode: invoke without a prompt on a TTY to enter the interactive REPL.

Documentation

Overview

demo is a minimal coding agent that uses jinn as its sandboxed tool executor. It ports the shell-script shoop agent to Go, replacing bash primitives with the jinn binary's JSON-over-stdio protocol.

Tools map to jinn (run_shell, read_file, write_file, edit_file, multi_edit, search_files, stat_file, list_dir) with web_fetch delegated to the defuddle CLI. Zero third-party imports — stdlib only, matching jinn itself.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL