A small TypeScript harness for coding agents.
Build your own agent on it, or run ours on your desktop, in your terminal or on your server. Every turn has a hook, and you pick the provider.
MIT licensedGitHubnpmBrowse the docs
An agent in ten lines of TypeScript.
Spread a preset, pick a provider and run. A hook changes any turn where a default does not fit.
import { createAgent } from 'zidane'
import { basic } from 'zidane/presets'
import { anthropic } from 'zidane/providers'
const agent = createAgent({
...basic,
provider: anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }),
})
const stats = await agent.run({ prompt: 'build a REST API' })
console.log(`Done in ${stats.turns} turns`)// Every delta, tool call and budget event is a hook.
agent.hooks.hook('tool:gate', (ctx) => {
if (ctx.name === 'shell' && /\brm -rf\b/.test(String(ctx.input.command))) {
ctx.block = true
ctx.reason = 'Destructive command: ask the user first.'
}
})
agent.hooks.hook('stream:text', ({ delta }) => process.stdout.write(delta))
agent.hooks.hook('turn:after', ({ usage }) => {
console.log(`${usage.input} in / ${usage.output} out`)
})# The terminal app: the TUI and the zidane CLI
npm install -g zidane-tui
zidane
# The desktop app, for macOS and Linux
npm install -g zidane-gui
# Your own server, from the terminal app
zidane server startEvery session in one window.
zidane-gui, for macOS and Linux, lists sessions in a sidebar and the agent's work in panels.
Link docs/releases/v8.md from the changelog, tag v8.0.0 and open a pull request.
- Link the notes from CHANGELOG.md
- Tag v8.0.0
- Open a pull request
A chat client and a CLI.
Run zidane to chat in your terminal, or zidane run to send one prompt from a script.
Sessions on a machine you own.
zidane-server runs the same engine on your computer or a VPS. Both apps and web pages connect to it.
What the terminal and desktop apps share.
Both apps read the same sessions, settings and sign-ins, and share live runs with the daemon on.
- SpacesGroup sessions into spaces such as Personal and Work, each with its own default model.
- SkillsAgent Skills from your project and home folders. Install or remove them in settings.
- MCP serversOne MCP setup and OAuth sign-in for both apps.
- ExtensionsA TypeScript file adds tools, hooks, slash commands or side panels to both apps.
- Plan usageWhat is left of your Claude, ChatGPT or SuperGrok plan, and your OpenRouter credits.
- Claude Code importImport your Claude Code conversations, MCP servers, skills and commands. Nothing in ~/.claude changes.
Start with the quickstart.
It installs the package and runs your first task.