Modern Creator
DevOps Toolbox · YouTube

I Gave Pi Access to Obsidian And I'm Not Looking Back

How Obsidian's new CLI turns your personal knowledge base into a scriptable memory layer for AI agents, chained with Pi and Graphify for 11x fewer tokens.

Posted
2 weeks ago
Duration
Format
Tutorial
educational
Views
48.1K
1.5K likes
Big Idea

The argument in one line.

Obsidian's CLI transforms your personal knowledge base into a structured, queryable memory layer for AI agents, reducing token costs by 11x while improving retrieval accuracy through semantic search and knowledge graphs instead of plain file scanning.

Who This Is For

Read if. Skip if.

READ IF YOU ARE…
  • A knowledge worker using Obsidian who runs AI agents regularly and wants to reduce token costs while improving retrieval quality for agent queries.
  • A developer or technical founder with an existing Obsidian vault who's frustrated that AI agents can't access their notes and wants to build that integration themselves.
  • Someone building with Claude or similar coding agents who needs a structured way to capture and reuse context across multiple agent runs without ballooning prompt size.
SKIP IF…
  • You're new to Obsidian or haven't built a personal knowledge base yet — this assumes you already have a vault worth connecting to an agent.
  • You use a different note-taking system like Roam, Logseq, or Notion — the implementation is specific to Obsidian's CLI and architecture.
  • You're looking for a no-code or UI-based solution — this requires terminal work, symlink setup, and comfort with agent scripting.
TL;DR

The full version, fast.

Obsidian's new command-line interface turns your markdown vault into a scriptable memory layer that AI agents can read, write, and reason over, fixing the missing third leg of the note-taking, reviewing, querying loop Andrej Karpathy described. Instead of letting agents grep raw files or dump throwaway summaries, you give them structured access to titles, tags, front matter, links, and backlinks through the CLI, then layer Graphify on top to build a knowledge graph that reduces token usage dramatically while improving retrieval quality. Pair the CLI with an agent like Pi, script daily-note routines, fetch random recalls, and capture LLM responses as durable notes. The leverage comes from better context and memory, not bigger models, and markdown wins because it stays portable and yours.

Members feature

Chat with this breakdown.

Modern Creator members can chat with any breakdown — ask for the hook, quote a framework, find the exact transcript moment. Unlocks at T2: refer 3 friends + add your own API key.

Create a free account →
Chapters

Where the time goes.

00:0001:37

01 · Karpathy frame + problem statement

Chat history is not memory. summary.md is not a knowledge system. Obsidian positioned as the IDE for reviewing and editing LLM text.

01:3702:50

02 · Getting the Obsidian CLI

Upgrade to Obsidian 1.12, enable CLI in settings, symlink obsidian-cli to /usr/local/bin. Tour of available commands.

02:5004:16

03 · CLI basics: notes, search, tasks

Daily note creation and append, search returning ranked note titles not grep lines. Honest UX critique.

04:1605:12

04 · Sponsor + context quality argument

Oracle Developer Center sponsor. Bigger models won't fix weak memory -- fix the surrounding system first.

05:1206:08

05 · Tasks + morning automation script

tasks daily, tasks active, filter by status. Morning script: open daily note, add inbox-review todo, follow up on unresolved items.

06:0807:14

06 · Backlinks, graph intent, random-read

backlinks command gives agents a graph mental model. Links let agents forge knowledge connections. Random-read note for daily recall.

07:1408:14

07 · dev:screenshot + TV TUI

Screenshot command exposes full Obsidian UI for visual-context agents. TV fuzzy TUI for human terminal retrieval with Neovim keybindings.

08:1409:36

08 · Pi agent + pi-obsidian extension

Install Pi coding agent, add pi-obsidian skill. Pi self-evaluates: compares its own CLI wrapper to extension, keeps its own, removes the package.

09:3610:22

09 · Graphify introduction

Knowledge graph tool originally for code repos. Claims 70x token reduction. Host runs it on his Obsidian vault.

10:2211:24

10 · Graphify + graphify-pi setup

ppex install graphify, pi install graphify-pi. Graph and skill installed. Supports Claude, Gemini, Cursor, Copilot, OpenCode, Kiro.

11:2412:48

11 · Graphify in action on the full vault

574 files, 4.2M words. God notes, surprising connections. graphify explain and query return structured responses with references.

12:4813:07

12 · Benchmark: 11.2x token reduction

207,950 words vault yields 11.2x fewer tokens per query. Not 70x, but this is a knowledge base not a code repo.

13:0714:19

13 · Closing: markdown is boring and boring wins

Scriptable beats new tool. Markdown is portable, diffable, git-compatible. Warning: a big graph is useless if you don't read your notes.

Atomic Insights

Lines worth screenshotting.

  • Obsidian's new CLI turns a static personal knowledge base into a scriptable memory layer that agents can search, read, and write to through the terminal.
  • Before the CLI, agents searched Obsidian with grep — raw matches with no structure, no ranking, and no awareness of tags, frontmatter, or link relationships.
  • With the CLI, agents can pick notes rather than lines — Obsidian search understands vault semantics that grep cannot, which changes retrieval quality fundamentally.
  • Adding Graphify to the Obsidian and Pi pipeline cuts agent token costs by 11x because the knowledge graph provides structured context instead of raw file dumps.
  • Reaching for a bigger model before fixing memory retrieval and context grounding is the most common waste in AI engineering — more expensive confusion is still confusion.
  • Storing agent outputs as structured notes rather than chat history means the knowledge compounds in a system you can review, edit, and query indefinitely.
  • Links between notes are not decorative — they carry the relational context that allows an agent to answer questions about how ideas connect, not just what individual notes say.
Takeaway

Steal the reframe.

DevOps Toolbox playbook

The whole video is built on one reframe: the tool you already use should become scriptable -- and that structure is fully portable.

  • summary.md is not a system is a repeatable hook for any you're-doing-X-wrong video -- find the naive workaround your audience uses and name it.
  • Honest UX critique before the audience gets there (the syntax feels like a curl request) builds credibility fast.
  • Markdown is boring and boring wins is a standalone short -- clip the last 8 seconds, no context needed.
  • The three-layer cake frame (notes > read > Q&A) is a clean structural scaffold for any knowledge or productivity video.
  • God notes concept: what are your god posts? is a hook for any creator strategy or content audit video.
Glossary

Terms worth knowing.

LLM
Large Language Model — the type of AI system, like ChatGPT or Claude, that generates text by predicting words based on patterns learned from massive training datasets.
Second brain
A personal knowledge management system where you store notes, ideas, and references outside your head so you can retrieve and connect them later, popularized by methods like PARA.
Obsidian
A local-first note-taking app that stores notes as plain Markdown files on your computer and supports linking between notes to form a personal knowledge graph.
CLI
Command Line Interface — a text-based way to control a program by typing commands in a terminal, useful for scripting and automation rather than clicking through a GUI.
Markdown
A lightweight plain-text formatting syntax using symbols like # and * for headings, lists, and links, designed to be readable as-is and convertible to HTML.
Vault
Obsidian's term for a folder on your computer that contains a collection of Markdown notes treated as a single knowledge base.
Agent
An AI program that can take actions on its own — running commands, reading files, calling tools — to complete multi-step tasks rather than just answering a single prompt.
Symlink
A symbolic link, or shortcut file that points to another file or program elsewhere on disk, often placed in a system path so a command becomes runnable from anywhere.
Charm
An open-source toolkit and set of libraries used to build polished, interactive terminal user interfaces in the Go programming language.
Front matter
A small YAML or similar metadata block at the top of a Markdown file used to store structured fields like tags, dates, or aliases that tools can read and filter on.
grep / ripgrep
Command-line tools that scan files for lines matching a text pattern; ripgrep is a faster modern rewrite of the classic Unix grep.
Backlinks
An automatically generated list of every other note that links to the current note, letting you traverse a knowledge base by relationships instead of folder structure.
PARA method
A personal organization system by Tiago Forte that sorts notes into four buckets — Projects, Areas, Resources, and Archives — to keep active work separate from reference material.
Daily note
A timestamped note Obsidian can auto-create each day, used as a landing page for journaling, tasks, and quick capture that gets reviewed and filed later.
Notes inbox
A holding area for raw, unsorted notes captured throughout the day, processed later into their proper place in a knowledge base.
TUI
Text User Interface — a keyboard-driven, full-screen interactive program that runs inside a terminal, offering menus and panels without a mouse or graphical window.
Neovim
A keyboard-driven, highly extensible terminal-based text editor, a modern fork of the classic Vim editor favored by developers who live in the command line.
Pi (PY)
A lightweight open-source coding agent that runs in the terminal, designed to be extended with small skill packages that teach it how to use new tools.
Skill / extension package
A small bundle of instructions and code that plugs into an AI agent to teach it how to use a specific tool or follow a specific workflow.
Graphify
An open-source tool that builds a knowledge graph of a code repository or note collection so AI agents can answer questions using structured connections instead of brute-force file scanning.
Resources Mentioned

Things they pointed at.

00:12linkAndrey Karpathy LLM OS post
07:40toolTV (fuzzy TUI)
09:51toolGraphify
10:55toolgraphify-pi
04:16linkOracle Developer Center
Quotables

Lines you could clip.

00:26
Chat history is not only memory.
Punchy counterintuitive thesis, no setup neededTikTok hook↗ Tweet quote
00:37
Most people just ask for a summary.md -- not a system.
On-screen text + spoken, tight contrast, speaks directly to AI audienceIG reel cold open↗ Tweet quote
13:33
I don't want another place. I want the place I already used to become scriptable.
Standalone anti-SaaS take, no context neededIG reel cold open↗ Tweet quote
13:56
Markdown is boring -- and boring wins.
Six words, counterintuitive, quotable closerNewsletter pull-quote↗ Tweet quote
The Script

Word for word.

metaphor
00:00This recent Anray Karpathy post was a bit of a light bulb moment for me. It talks about the strong link between LLMs and knowledge base or in simple words AI and your second brain. It's a simple three layered cake, taking notes, have a place to read them, and then q and a on an ongoing basis.
00:16Simple, but it gets complicated if you dive in. Agents don't really have a good place to put pieces of information that we will actually use later. Chat history is not only memory, it has some lessons learned.
00:27Right? Some for the agent, sure, but some for you, the slave. I mean, the user.
00:31Many people just ask it to create a summary MD five, but that's not a knowledge system. If you tell them to store information they gathered as MD files in a central place, just like you're asking them to store code in Git repos, you now have your own handwritten notes along with knowledge you've read as ZLM responses, but never actually captured.
00:51It can now be stored in your second brain. Now you can review this information with Obsidian. By doing that, you're kind of treating it as your IDE.
00:59It's used to review and edit LLM text. See the connection? Now you can start asking your second brain questions, and that is exactly why Obsidian's new CLI is so interesting.
01:10And on top of that, I added another open source to bring this concept to life but on god mode because the goal here isn't LinkedIn fluff. It's actually getting around my own personal second brain and using it. So this video is not just Obsidian runs in the terminal now.
01:25That's cool. Not the point. The point is Obsidian might be the perfect interface layer between you and your agents, and we're going to take it from this to, well, this, a context aware system.
01:37Let me show you.
01:44Let's first get the thing to try out before we dive deeper into what we can do, but more importantly, how to do it. If you've upgraded Obsidian recently, you have noticed this, an Obsidian command line interface where you can pretty much do anything you like with Obsidian through the terminal.
02:00Obviously, the point isn't regular note taking, but rather scripting automation and integrating with tools. You'd want the latest Obsidian installer downloaded and updated to the latest release. Next, head over to your settings or command comma for Mac users where you'll now see a command line interface activation on the bottom.
02:19This button is helpful, but I can tell you it doesn't always do the full job, and you may head overexcited to your terminal just to see Obsidian command is not found. Not to worry.
02:29The CLI is now under the Obsidian app path, but an executable called Obsidian hyphen CLI, which you can symlink to local bin. That's it.
02:37Pop it open. Oh, and make sure Obsidian's open at the same time to see the same vault welcoming you.
02:43It's not fancy. It does look like they've used charm to build it and it's a list of commands that you can find and use. You can start simple and create a daily note with thoughts, journaling, and tasks if you use these.
02:55The syntax alone here already feels like it's not intuitive or user friendly, if I may. You have to set sub commands and add parameters like it's a curl request. Nevertheless, new note from the CLI.
03:07You can read it directly, and if you pop Obsidian, you'll see the same note waiting for you opened. You can keep appending content to your note like so and the syntax would get translated to proper markdown like Obsidian's to do slash done lists.
03:22But writing notes from the CLI is not very exciting. Sure. It's very helpful for the agent which will soon connect, but let's talk about searching.
03:30If you search for something like meeting notes and it finds a bunch, some not exactly what you'd expect from this kind of a search term. Here's why. Before the CLI, your agent searches like this with grep, rip grep or even worse, just scanning files manually.
03:45That gives you raw matches, no structure, no ranking unless you built it, and of course, no awareness, non Obsidian semantics. So fast but dumb.
03:55With the CLI, instead of here are 200 lines that match Kubernetes, you get something closer to no titles, relevant matches. That means your agent can pick pick notes, not lines.
04:05Obsidian search isn't just text search. It understands your notes tags, the path in the vault, your front matter fields, the entries on top of your notes. And lastly, probably the most important bit of everything, understanding links.
04:18Now if you actually want to read one of these findings, you'll be very disappointed to find this UX was not made for you. I mean, you'd expect at the very least that the results are fed into a fuzzy list, but nope. Not even auto completion when you do get the name right.
04:32Literally provide the full name or path to use. You can view it directly or have it pop up in Obsidian. One thing I keep noticing with AI tooling is that people reach for bigger models before fixing the surrounding system.
04:45If your agent has weak memory pool retrieval or no use for grounding, a larger model usually just gives you more expensive confusion. I was reading through Oracle's developer resources and two things stood out. One was getting more out of your smaller language models.
04:59The other was agent memory and why so many agents lose context once a task gets a bit longer. That feels much closer to the real engineering problem than generic AI hype. If you're building internal tools, Copilot, or automations, the real leverage usually comes from better context, better memory, and better data flow, not just swapping in a larger model and hoping for the best.
05:21If you want to dig into that side of the stack, Oracle has a developer resources page with articles, code, and examples worth browsing. Link in the description. Thank me later.
05:30And now back to the video. Some commands just shorten the path for automation. So if your tasks are built into daily notes and they should, we can talk about that another time, you can get them very quickly like so.
05:43These are daily tasks. If you just go tasks, well, you'll see every single task in your system. You can filter by file.
05:49You can actually get the ones that are done or in to do or any status you've set. A morning automation script can open the daily note then add a to do line to check your notes inbox, which is a critical step in the power method if you're following the second brain structure. And you could also tell your procedure to follow-up on unresolved items.
06:09Now this is where intent starts showing. You can find links and backlinks for notes, which basically gives you the mental model of a graph to work with, allowing an automation that collects data to search but also forge knowledge. Hear me out.
06:23Links are part of what makes note taking in Obsidian, Notion, and other similar systems so good. You can use them to break down notes or simply link to other relevant written pieces. Implementing the para method in Obsidian or Notion relies heavily on these links.
06:38You link a resource to a project or an area and maybe another resource. You've made the connection because it makes sense. You can now hand over that information to your automation or AI or what have you.
06:50When you ask the information, the context is not only bigger, it's smarter. When you create knowledge, bringing up the Carpathi post again, you let the agent give you context. Starting to get it?
07:01There are some fun ones too, like a random read note that you can have your personal assistant fetch for you every morning or just add it to the morning script. This is a real way to slowly recall old yet relevant notes over time. But if there's one thing that LLMs absolutely suck at is understanding visual concepts.
07:20If you're debugging or building a plugin or just want to fix workflows in Obsidian using an agent through the CLI, its API is exposing a screenshot that you can take on demand exposing the full UI. Open notes, tabs, menus, whether collapsed or expanded, adding context to the flow you're trying to achieve with an agent running underneath.
07:40Now if for whatever reason you are picking up notes on your own as a user through the terminal, I've recently shared a video around TV, a fuzzy searchable TUI where you can just pipe over your Obsidian files and enjoy a quick retrieval from the comfort of your terminal. My god. That was a nerdy sentence.
07:56I need to put that on a t shirt. TV also has channels where you can configure the preview and different actions with key bindings, like you'd probably want a key to pop a note to Neovim and another to open it on Obsidian or other actions that you can take with the CLI like tagging, aliasing, etcetera. More about TV in the video on the channel.
08:14Now we've been dancing around the CLI, it's time to actually let the agent use it. Another video I recently made was around PY, a lean agent I've been falling in love with recently. So I'll head over to its packages repo and grab pi obsidian, a small extension that adds a skill for the obsidian CLI.
08:31You can install it with pi install command or b me and let it figure out stuff on its own, which is an incredible inefficient token usage. And just like that, it's now on top of the CLI. By the way, one of the beautiful things about Pi is its ability to change itself according to your needs.
08:47So earlier, I asked it to teach itself about the Obsidian CLI. After installing extension package, I actually asked it to compare the two solutions, and until it gives us the result, we can use Py's on demand inline session to query my Obsidian Vault already. Now mind you, this took twenty seconds, not ideal, but in my defense, I am running highest reasoning model here, which may force its hands trying to overkill a simple task.
09:11Regardless, the note is opened and PY realized it had done a better job itself by wrapping around the CLI, so it kept its own thing and removed the extension. The CLIs in our tool belts and the agents. You can script around it, type results to your favorite TUIs, and then join notes through the terminal.
09:26But we've mentioned tokens usage a lot earlier, both the fact that the CLI should improve the consumption, but also the quality of usage. Just scanning files is fine, but not extremely efficient.
09:37The CLI improves capturing notes and improves the results. But if we take a quick look again at Karpathy's previous LLM post, we're now at stage three, q and a. We want to query the knowledge base and maximize both docking usage and quality of results.
09:51Someone actually went ahead and built it. Graphifi graphifi graphifi is a knowledge graph for coding assistance, and I'm pretty sure this was designed for code repos. So you can improve the questions on top of these, like how the author is implemented, where's the data layer, and so on.
10:08It uses tree seater and every context it can find to build a graph that should reduce up to 70 times token usage. Now that graph made me think of this immediately. So I thought what the hell, let's run it run on my notes fault.
10:23Ppex install graphifi with two y's and you can start working. If you run install, it'll create a Claude skill and instructions, but I'm not a Claude fan. It comes with installations for Gemini, cursor, codecs, OpenCode, Ader if someone still uses that, Copilot, Versus Code, Claw Hermes.
10:39If an AWS has attempted an IDE, Kiro is here. Long list, no PIE. If I pick open code and check the instructions, they added a reference to Graphify out directory and a request to check the graph, report, and index, then update when necessary.
10:55If you're a PI user, someone took care of that for you and there's a GraphifyPy package ready that adds roughly the same workflow to PI. It'll use the same out path there, remind the agent to traverse it before any search, etcetera. PY install, give it a minute, and we're good to go.
11:11We now have graphifi and a matching skill because the extension ships with both. You can use the command from PI or a generic skill command. If you let it run with no instructions, it'll just print the commands itself and other options.
11:25But we want actual work. Let's build a graph, mister. And after a minute, get this.
11:30It actually stopped itself because it's past the intended size. Like I mentioned, this was made to provide answers to relatively small repos with a bunch of files in the system and forcing its hand into something massive. So let's do the entire vault, and I'll try to show you the result in hopes my Mac doesn't start smoking.
11:47Over five minutes later, we've got a report, a JSON, Wiki index, and other stuff. The report, while a bit much to go into, looks for what's described as god notes, the notes with most edges, most well connected.
12:00It also lists surprising connections like launching a course note that I have is semantically similar to what's DevOps. Then there are tags and many other indexes, cohesion calculations of found notes. But here's the fun part.
12:14Graph HTML opens this, and while it's beautiful, I don't think you'll learn anything by just watching it. What you can, however, do now is run explain a topic and the system would yield connections for that context. This is basically a reasoning layer that checks the graph and adds a touch of context.
12:31If you want proper answers to questions, you can query things like everything I know about Kubernetes. You'll get all the relevant nodes ready to compile a response. When you finally actually do it from the agent, you'll get response you're looking for properly structured for review, references, and everything you like.
12:48Lastly, while I'm not one to get excited about benchmarks, surely not from the tool we're benchmarking, Grafify comes with its own internal benchmarking tool that tries to analyze reduction of tokens per query based on the index and the graph it's generated. In our case, not the 70 x promised, but again, this is a knowledge base, not a repository.
13:07You be the judge. At this point, you might ask, why not use one of a million AI note taking tools that promise to organize your life, summarize your meetings, write your emails, and probably raise your kids if you upload enough PDFs? But I don't want another place.
13:21I want the place I already used to become scriptable. That's a very different thing. Obsidian doesn't force agents worldview on me.
13:29It doesn't say here's your AI workspace, here's your AI memories, here's your AI graph that only exists inside our subscription. It just says here are your markdown files. That's powerful because markdown is boring and boring wins.
13:41Boring means portable, it means diffable, it means I can use git, and I can edit in NeoVim. And if Obsidian disappears tomorrow, I still have my notes. Lastly, I must say, this does not make Obsidian a magical second brain that thinks for you.
13:54You can't outsource thinking yet. If you don't compile notes and read them, this isn't knowledge.
14:00Not only it's not cemented in your brain, it doesn't even get there. A large graph is great, but that's just a fancy way to waste even more token. And if you want the human side of this workflow, the Obsidian and Neovim setup is still one of my favorite videos I've ever made.
14:13If you want the agent side, watch OpenCode or Py videos next. Thank you for watching. I'll see you on the next one.
The Hook

The bait, then the rug-pull.

Andrey Karpathy posted a deceptively simple framework: take notes, have a place to read them, Q&A on demand. DevOps Toolbox takes that three-layer cake and asks the uncomfortable question: if chat history isn't memory and a summary.md isn't a system, where does agent knowledge actually live?

Frameworks

Named ideas worth stealing.

00:12list

Three-Layer Knowledge Cake

  1. Take notes
  2. Have a place to read them
  3. Q&A on an ongoing basis

Karpathy's framework for an effective personal knowledge system.

Steal forAny second brain / AI memory video opener
11:59concept

God Notes

Graphify's term for highest-edge nodes in a vault -- notes referenced most by others. Reveals the architecture of your thinking.

Steal forContent audit framing: what are your god posts?
00:51concept

Obsidian as IDE

Treat Obsidian not as a note-taking app but as an IDE for reviewing and editing LLM-generated text. The CLI is the API surface.

Steal forAny reframe-a-familiar-tool video structure
CTA Breakdown

How they asked for the click.

14:01next-video
If you want the human side of this workflow, the Obsidian and Neovim setup is still one of my favorite videos I've ever made. If you want the agent side, watch OpenCode or Pi videos next.

Soft, no subscribe push -- two content-relevant next-video nudges.

Storyboard

Visual structure at a glance.

open
hookopen00:00
summary.md not a system
hooksummary.md not a system00:22
obsidian --cli tease
promiseobsidian --cli tease00:59
CLI welcome screen
valueCLI welcome screen01:52
grep vs CLI
valuegrep vs CLI02:50
morning script
valuemorning script05:12
dev:screenshot
valuedev:screenshot07:14
Pi agent
valuePi agent08:14
Graphify intro
valueGraphify intro09:36
11.2x benchmark
value11.2x benchmark12:48
closing argument
ctaclosing argument13:33
Frame Gallery

Visual moments.