maaslalani/nap has 2,216 GitHub stars and 66 forks. GitHot measured -1 in 7 days. Last checked 2026-11-09 20:49 UTC. Last push 2024-05-18.
Code snippets in your terminal
Measured star growth
- in 24h
- Update delayed
- in 7 days
- -1
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalNap

zzz
Nap is a code snippet manager for your terminal. Create and access new snippets quickly with the command-line interface or browse, manage, and organize them with the text-user interface. Keep your code snippets safe, sound, and well-rested in your terminal.
Text-based User Interface
Launch the interactive interface:
nap

Key Bindings
| Action | Key |
|---|---|
| Create a new snippet | n |
Edit selected snippet (in $EDITOR) |
e |
| Copy selected snippet to clipboard | c |
| Paste clipboard to selected snippet | p |
| Delete selected snippet | x |
| Rename selected snippet | r |
| Set folder of selected snippet | f |
| Set language of selected snippet | L |
| Move to next pane | tab |
| Move to previous pane | shift+tab |
| Search for snippets | / |
| Toggle help | ? |
| Quit application | q ctrl+c |
Command Line Interface
Create new snippets:
# Quick save an untitled snippet.
nap < main.go
# From a file, specify Notes/ folder and Go language.
nap Notes/FizzBuzz.go < main.go
# Save some code from the internet for later.
curl https://example.com/main.go | nap Notes/FizzBuzz.go
# Works great with GitHub gists
gh gist view 4ff8a6472247e6dd2315fd4038926522 | nap

Output saved snippets:
# Fuzzy find snippet.
nap fuzzy
# Write snippet to a file.
nap go/boilerplate > main.go
# Copy snippet to clipboard.
nap foobar | pbcopy
nap foobar | xclip

List snippets:
nap list

Fuzzy find a snippet (with Gum).
nap $(nap list | gum filter)

Installation
Install with Go:
go install github.com/maaslalani/nap@main
Or download a binary from the releases.
Customization
Nap is customized through a configuration file located at NAP_CONFIG ($XDG_CONFIG_HOME/nap/config.yaml).
# Configuration
home: ~/.nap
default_language: go
theme: nord
# Colors
background: "0"
foreground: "7"
primary_color: "#AFBEE1"
primary_color_subdued: "#64708D"
green: "#527251"
bright_green: "#BCE1AF"
bright_red: "#E49393"
red: "#A46060"
black: "#373B41"
gray: "240"
white: "#FFFFFF"
The configuration file can be overridden through environment variables:
# Configuration
export NAP_CONFIG="~/.nap/config.yaml"
export NAP_HOME="~/.nap"
export NAP_DEFAULT_LANGUAGE="go"
export NAP_THEME="nord"
# Colors
export NAP_PRIMARY_COLOR="#AFBEE1"
export NAP_RED="#A46060"
export NAP_GREEN="#527251"
export NAP_FOREGROUND="7"
export NAP_BACKGROUND="0"
export NAP_BLACK="#373B41"
export NAP_GRAY="240"
export NAP_WHITE="#FFFFFF"
License
Feedback
I'd love to hear your feedback on improving nap.
Feel free to reach out via:
zzz
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,625 starspublic-apis/public-apis
A collective list of free APIs
497,974 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
450,225 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,301 stars