A CLI-Managed Second Brain
Building a CLI-managed Second Brain.
Most people start from zero every day. They open their apps, scan their inbox, and try to remember what they were working on. They are librarians, not architects.
I spent years filing notes into folders. It was a hobby, not a system. Real intelligence doesn't come from storing notes; it comes from the connections between them. If your system isn't compounding your knowledge, you are just hoarding data.
The Architecture I built a CLI-managed Second Brain on my Mac. It is not a SaaS app; it is a directory of structured raw material managed by an autonomous AI agent.
The file structure is simple, prioritizing states of processing over topics: - 00-INBOX: Raw landing zone. Zero friction. - 01-CAPTURES: Sorted by type (observations, patterns, numbers). - 02-CONNECTIONS: Synthesized insights. - 03-BRIEFS: Production queue. - 05-HERMES: The intelligence layer (Skills & Context).
This structure isn't arbitrary. Organizing by note type—not topic—forces disparate ideas into the same domain. A pattern in AI strategy and a pattern in actuarial risk suddenly share a folder. That is where the connection happens.
The Intelligence Layer: Meet Hermes
The difference between this and a standard Obsidian vault is the 05-HERMES directory. This is where my agent, Hermes, lives.
Hermes is an open-source, terminal-native AI agent built by Nous Research. It doesn't just chat; it has persistent memory and can execute tools on my machine. When I run a capture session, Hermes doesn't just store the data; it sharpens it. It identifies patterns I haven't seen. It turns my raw commute observations into a structured content brief while I'm still drinking coffee. It even pushes code and manages Docker containers.
How to Build Yours A few friends asked how to replicate this. You don't need a PhD in engineering, but you do need a Mac or Linux terminal, and a clear set of hard rules. Here is the exact setup.
Step 1: Install Hermes Agent Hermes is an open-source CLI tool. Pop open your terminal and run the install script:
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
Once installed, run hermes setup to link it to your preferred LLM provider (Anthropic, OpenRouter, OpenAI, etc.).
Step 2: Scaffold Your Vault
Create a directory on your machine to serve as your brain. I keep mine at ~/SecondBrain. Inside, create the numbered folders outlined in the Architecture section above.
Step 3: Define Your Identity
Inside the 05-HERMES folder, create a SYSTEM.md file. This is the prime directive for your agent. Write down exactly who you are, how you want it to process information, and what its role is. Whenever Hermes operates in this directory, it will read this file and adopt your desired persona.
Step 4: Hook the Terminal to the Root
Navigate your terminal to your new directory and type hermes. You are now in a persistent command-and-control session with your data. Start dropping text files into the INBOX and ask Hermes to process them.
That's all.