@sivori/quixotic
v0.1.2
Published
Two desktop advisors — Don Quixote and Sancho Panza — in dialogue at your terminal.
Downloads
394
Readme
quixotic
Two desktop advisors — Don Quixote and Sancho Panza — in dialogue at your terminal.
Ask a question and receive counsel from both the dreaming knight and his earthy squire. Don Quixote answers first, in soaring idealism; Sancho follows with folk wisdom, a proverb, and a gentle dose of reality. Optionally let them go back and forth, debating your question across multiple rounds.
It's a small, single-file CLI built on the Anthropic Claude API. The two personalities are nothing more than two system prompts — the "dialogue" emerges by feeding each character what the other just said.
? Should I quit my job to start a company?
Don Quixote
Ah, traveler! You speak of the noblest of quests — to leave the safe walls of
the castle and ride out upon the open road in pursuit of a dream...
Sancho Panza
Now, master means well, but as my grandmother used to say, "a bird in the hand
is worth two in the bush." Before you go tilting at this windmill, ask yourself
how many months of bread sit in your larder...Requirements
- Node.js 18+ (uses native ES modules and
node:readline/promises) - An Anthropic API key — get one at console.anthropic.com
Install
Run it directly without installing:
npx @sivori/quixotic "What should I have for dinner?"Or install globally to get the quixotic command:
npm install -g @sivori/quixoticSetup
Export your API key into the environment (the CLI exits early if it isn't set):
export ANTHROPIC_API_KEY="sk-ant-..."Usage
One-shot — pass your question as arguments and get a single exchange:
quixotic "Should I take the job in another city?"Interactive — run with no question to enter a REPL that remembers the conversation:
quixoticIn interactive mode, the advisors recall your recent exchanges (the last 10), so you can ask follow-ups. Press Ctrl+D to depart, or Ctrl+C to quit.
Multi-round debate — let Quixote and Sancho respond to each other:
quixotic --rounds 3 "Is it foolish to chase a creative passion?"After Quixote and Sancho each give their opening counsel, Quixote answers Sancho's objections, Sancho replies again, and so on for the number of rounds you choose.
Configuration
| Variable | Default | Description |
| ------------------- | -------------------- | -------------------------------------------- |
| ANTHROPIC_API_KEY | (required) | Your Anthropic API key. |
| MODEL | claude-sonnet-4-6 | Which Claude model to use for both advisors. |
MODEL=claude-opus-4-8 quixotic "How do I know if I'm on the right path?"How it works
The entire app lives in index.js:
- Two system prompts (
QUIXOTE_SYSTEM,SANCHO_SYSTEM) define each character's voice and constraints. These are the "soul" of each advisor. streamCharacter()makes one streaming Messages API call per character and prints the reply live, color-coded (cyan for Quixote, yellow for Sancho).ask()orchestrates an exchange: Quixote speaks, then Sancho is given the transcript of Quixote's reply so he can respond to it. With--rounds > 1, they continue trading responses.formatHistory()rebuilds conversation memory by concatenating prior exchanges into the prompt — the API itself is stateless, so context is re-sent each turn.
The banner
The startup banner in art/banner.txt is a braille-character rendering of a public-domain Gustave Doré etching of Don Quixote and Sancho Panza (1863). It was generated once at build time with ascii-image-converter (-W 60 -b -n) and ships as a static asset, so no image tooling is required to run the CLI.
License
MIT © Sivori
