@aotumuri/project-history
v0.1.0
Published
Simply manage project history
Readme
project-history
Store per-project command history in .projh.json (cwd is stored relative to the project root). Keep this file private and out of version control.
First-time setup (install once)
Do this once after installing the CLI.
- Add the hook to
~/.zshrc:ph hook >> ~/.zshrc - Reload your shell:
source ~/.zshrc
Per-project setup (do this for each project)
Run this in every project where you want history tracking.
- Initialize:
ph init(orphi) - If asked, choose whether to add
.projh.jsonto.gitignore(recommended so it is not published). - If asked, choose whether to record
phcommands in history.
View history
- Interactive viewer (latest 10 per page):
ph list(orph l,phl)- Press
1-9/0to run a command - Use Left/Right arrows to move between pages
- Press
- Full output (full ISO timestamp + recorded cwd):
ph list --full - Plain output (latest 20):
ph list --plain - Plain output (latest 100):
ph list --plain -n 100 - Plain output (all):
ph list --plain --all
Commands
ph initinitializes.projh.jsonand can add it to.gitignore.ph recordis used by the shell hook to append entries.ph listshows recent entries (newest first).ph resetclears history entries after confirmation.phirunsph init.phlrunsph list.ph hookprints the zsh hook snippet.ph unhookremoves the hook from~/.zshrc.ph uninstallis an alias ofph unhook.
Build (publish)
npm run build emits JavaScript into dist/.
Uninstall (macOS, zsh)
- Remove the hook:
ph unhook - Uninstall the package with your package manager.
