Skip to content

newssourcecrawler/nattr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

nattr — directory-aware history and context for your shell

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.


Features

  • 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.

Install (1 minute)

Option A — paste & go

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.

About

directory-aware history and context for your shell

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages