Terminal-based agentic coding assistants like Claude Code, Codex, Opencode, and Aider are generally used to work with codebases, but nothing prevents us from using them on other types of content.
Here is an example of how to use Aider on a collection of Foam notes. The basic idea can be transposed to any combination of coding assistant and note taking system.
-
Install Aider
-
Create a
CONVENTIONS.mddocument and place it in the root of your Foam repo. Fill it with information about the types of notes you have, how you like to structure them, what styling conventions you follow, etc. Think of it as an extensive system prompt. If you're unsure what to include, describe your system in plain language to an LLM and get it to write aCONVENTIONS.mdfor you. -
Create an
.aider.conf.yamlfile telling Aider to ingest the conventions file at startup.
read:
- CONVENTIONS.md- Optionally, add an
.aiderignorefile to exclude files and folders Aider doesn't need to see.
.foam/
.vscode/
- Navigate to the folder containing your Foam repo and launch Aider.
- Clean up or flesh out individual notes or sets of notes
- Add tags and links to other notes
- Create new notes from a conversation with the LLM, from a website, from a book, or something else
- Grab statistics from sets of daily notes and get the LLM to graph it
- There is an Aider leaderboard
- For note manipulation you probably don't need a very powerful model; a large context window is more important
- For personal notes, you probably want to use a locally hosted model
- Mistral models don't work well with Aider
- If you don't mind proprietary models,
gemini-2.5-flashis fast, cheap, and has a 1M context window - Among open source models,
qwen3:4bandqwen3:30bwork well and have large context windows (256k). Note that you may need to configure the model to not use thinking mode and to override your LLM backend's token limit. You do this by creating an.aider.model.settings.ymlfile and adding this:
- name: ollama/qwen3:30b # or ollama/qwen3:4b
streaming: false
edit_format: diff
use_repo_map: true
weak_model_name: ollama/qwen3:4b
examples_as_sys_msg: true
system_prompt_prefix: "/no_think "
extra_params:
num_ctx: 131072- With luck, you might be able to fit all your notes in the model's context window. To get the rough number of tokens in the collection (or a subfolder of it), navigate to the directory and run:
- Mac/Linux:
echo "$(( $(find . -type f -name "*.md" -exec cat {} + | wc -c) / 4 )) tokens (approx)" - Windows (PowerShell):
"$([math]::Floor((gci *.md -Recurse | gc -Raw | measure -Char).Characters / 4)) tokens (approx)"
- Mac/Linux: