ntasp
v1.1.0
Published
Personal Dev Memory - Lightweight alternative to git stash with global snippet vault
Downloads
104
Maintainers
Readme
ntasp
Personal Dev Memory - Lightweight alternative to git stash with global snippet vault
What is ntasp?
ntasp is a CLI tool for developers who want to:
- Save code snippets without git
- Compare saved versions with current files
- Work across multiple projects
- Keep a personal code vault
Think of it as "git stash" but global and project-independent.
Features
- Save any file to a global vault
- List all saved snippets with timestamps
- Show full content of saved snippets
- Restore snippets to working directory
- Apply snippets to existing files (overwrite)
- Delete unwanted snippets
- Diff saved version vs current file (opens in IDE like Git changes)
Installation
npm install
npm linkOr run directly:
npx . <command>Usage
Save a file
ntasp save app.jsList all snippets
ntasp listShow snippet content
ntasp show 1Restore snippet
ntasp restore 1
ntasp restore 1 app-backup.jsApply snippet to existing file
ntasp apply 1
ntasp apply 1 app.jsNote: apply overwrites existing files, while restore creates new files.
Compare with current file
Opens diff view directly in IDE (like Git changes):
ntasp diff 1
ntasp diff 1 app.jsSupported IDEs (auto-detected):
- VS Code
- IntelliJ IDEA
- WebStorm
- Sublime Text
Force console output:
ntasp diff 1 --consoleNote: By default, diff will try to open your IDE. If no IDE is detected, it will fallback to console output.
Delete snippet
ntasp delete 1How it works
All snippets are stored in:
~/.ntasp-vault/
index.json
1.json
2.json
...Data Structure
index.json
{
"lastId": 3,
"items": [
{
"id": 1,
"name": "app.js",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]
}Snippet file (e.g., 1.json)
{
"id": 1,
"name": "app.js",
"createdAt": "2024-01-01T00:00:00.000Z",
"content": "console.log('hello');"
}Why ntasp?
- No git required - Works anywhere
- Global - Access from any project
- IDE Integration - Diff view opens directly in your editor
- Simple - File-based, no database
- Fast - Instant save and restore
- Cross-platform - Mac, Linux, Windows
Roadmap
Current (v1.0)
- [x] save
- [x] list
- [x] show
- [x] restore
- [x] apply
- [x] delete
- [x] diff
- [x] IDE integration (VS Code, IntelliJ, WebStorm, Sublime)
Future (v1.1+)
- [ ] Full-text search
- [ ] Tag system
- [ ] Edit snippet
- [ ] Rename snippet
- [ ] Notes/descriptions
- [ ] Encryption mode
- [ ] Cloud sync
- [ ] Export/import
- [ ] Random string IDs
- [ ] Git branch awareness
- [ ] History/versions
Technical Stack
- Node.js
- chalk (colors)
- diff (comparison)
Requirements
- Node.js >= 14.0.0
License
MIT
