CLI Usage
The interactive REPL CLI (src/cli.ts) runs the full agent workflow locally in your
terminal, without needing any HTTP server or remote client.
Starting a session
npm run cli
This starts a session with a randomly generated thread ID (cli-session-<random>) and
prints a banner:
==================================================
Pinky and the Brain - Interactive Agent CLI REPL
Session Thread ID: cli-session-abc123
Type your message to prompt the agent workflow.
Type 'exit' or 'quit' to end the session.
==================================================
Interacting with the agent
Type a message at the You: prompt and press Enter. The CLI:
- Sends your message to the agent (
runGraphWorkflow) using the session's persistent thread ID. - Streams progress updates to
stderr, sostdoutstays clean if you redirect it. - Prints the final response between
---separators once the turn completes.
Just say hello — The Brain leads from there, and you answer with a number or a name:
You: hello
Agent executing...
--------------------------------------------------
Response:
Behold, Pinky, the four pillars of tonight's potential enlightenment:
1. **AWS Cloud Practitioner Certification** - the CLF-C02 exam: core services,
infrastructure, security, and pricing.
2. **Cellular Automata** - Conway's Game of Life, Wolfram's automata, Lenia.
3. **English for Certifications** - IELTS, TOEFL, Cambridge.
4. **Technical Interview Preparation** - role-based roadmaps.
Which subject shall we dissect first, Pinky?
--------------------------------------------------
Pick a topic, then a subtopic, and The Brain asks whether you want to learn about it
or write an article about it. Articles are saved as markdown under ./articles/ and
the file path is reported back to you. See Agent Flow for
the whole journey.
Because the thread ID stays the same for the whole session, the conversation persists across turns via the SQLite checkpointer, which is what lets the journey span many turns - see Architecture.
The REPL expects an interactive terminal. Piping input (echo "hello" | npm run cli)
closes readline after the first turn, so use it interactively for multi-turn journeys.
Ending a session
Type exit or quit (case-insensitive) to close the REPL.