nattr is a tiny, open-source Zsh helper that makes your shell remember places.
When you work in a project or a folder, nattr keeps per-directory history and lets you browse it easily.
It also provides a simple way to attach a short note to any directory (a .here file) and recall it on demand.
nattr is designed to be open, simple, and usable right away — no indexing, no background services, no AI — just honest context.
- Per-directory history: commands you run in one directory are stored separately.
- Fuzzy recall (
fh): quickly pick a previous command from this directory’s history. - Notes (
.here): attach a short memory to a folder and call it up when you want. - Portable & readable: everything is just shell functions and plain text.
- Zero bloat: no extra dependencies beyond your shell.
curl -fsSL https://raw.githubusercontent.com/newssourcecrawler/nattr/main/nattr.zsh -o ~/.nattr.zsh
echo '\nsource ~/.nattr.zsh\n' >> ~/.zshrc
exec zsh
Option B — Oh-My-Zsh plugin
git clone https://github.com/newssourcecrawler/nattr ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/nattr
Then add nattr to your plugins=(...) in .zshrc and restart your shell.
⸻
Usage
📌 Per-directory history
Just cd around as usual.
Use:
fh
This opens your directory-specific history (via fzf) so you can select a previous command and run it again.
⸻
📝 Attach a note to a folder
Create a .here file — a plain text file with one or two lines:
Last: refactored tokenizer
Note: tests failing on edge cases
Labels: fragile, experimental
Edit it with:
nattr edit
Display it with:
nattr show
⸻
Philosophy
nattr believes that memory should be local, explicit, and human-controlled:
• No global scanning.
• No hidden indexes.
• No telemetry. No guessing.
• Just useful context where you need it.
This makes your shell feel more like a workspace, not a log.
⸻
Contributing
Contributions are welcome.
If you want to expand this beyond Zsh, add features, or refine the UX — open an issue or a pull request.
⸻
License
This project is licensed under the MIT License — see LICENSE for details.