Context management for projects made easy.
When working in a complex codebase, I need a fast way to capture and retrieve context tied to specific parts of the project.
Inline notes like TODO or FIXME are intrusive and leak internal intent into the codebase.
External note-taking tools are disconnected from the workflow and introduce unnecessary friction.
AI tools can summarize past work, but they remain bound to session-based context and are not a persistent, structured layer over the project.
den is a tool for capturing and retrieving context scoped per project without breaking your flow.
- Terminal-first access: Run
den recentto surface recent context when opening a shell session. - Project-scoped storage: Context is isolated per project, determined by the nearest
.gitdirectory found by traversing upward from the current working directory. - Fast capture: Bind
den addto editor shortcuts (e.g. Neovim). Capture selected code as context without leaving the buffer. - Portable storage: Context is stored locally and can be versioned or synced using standard tooling like
git. - CLI core:
den add,den rm,den ls, etc. for scriptable, precise operations. - TUI interface:
denlaunches an interactive session to browse, create, and edit context.
Important
The PyPI package name is den-python, but the installed command is den. Requires Python 3.12+.
The recommended way to install den is using pip (or pipx for an isolated environment):
pip install den-pythonIf you are using Arch Linux, you can install from the AUR:
yay -S denIf you are using a Debian-based system, you can install den from the following apt repository:
curl -fsSL https://demonkingswarn.is-a.dev/debmon-repo/pubkey.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/debmon-repo.gpg
echo "deb [arch=amd64] https://demonkingswarn.is-a.dev/debmon-repo stable main" | sudo tee /etc/apt/sources.list.d/debmon-repo.list
sudo apt update
sudo apt install -y denYou can always clone and install directly from the source:
git clone https://github.com/RaghavGohil/den.git
cd den
pip install .denOpens an interactive curses-based TUI to quickly navigate and operate on your notes.
den recentFetches the most recent notes globally across all your projects. Hook this to your .bashrc or .zshrc to get a workflow summary when you open a terminal.
den lsDisplays all saved notes for the current project.
den add <note text>You can pass multiple words without quotes:
den add build a realtime terrain engineAttach a code reference:
If your thought is linked to a specific implementation, you can track it with the --ref flag:
den add fix this rendering issue --ref src/engine.py:42-50den edit [id]Opens the note in your default $EDITOR. If no id is provided, edits the most recently added note (default: 1).
den rm [id]Deletes a note. If no id is provided, removes the most recently added note (default: 1).
| Command | Description |
|---|---|
den |
Launch interactive TUI |
den recent |
Fetch globally recent notes across projects |
den ls |
List all notes for the current project |
den add [text] |
Add a note |
den add --ref [path] |
Add a note with an anchored code reference |
den edit [id] |
Edit a note (defaults to the most recent note) |
den rm [id] |
Remove a note (defaults to the most recent) |
This project uses no external dependencies (outside of the Python standard library), ensuring a lightweight and conflict-free tool logic.
If you find this project to be useful, please don't forget to leave a star. This keeps me motivated to continue working on the project.
