{"id":13509118,"url":"https://github.com/maaslalani/nap","last_synced_at":"2025-10-23T22:13:26.930Z","repository":{"id":63576969,"uuid":"565010765","full_name":"maaslalani/nap","owner":"maaslalani","description":"Code snippets in your terminal","archived":false,"fork":false,"pushed_at":"2024-05-18T15:20:50.000Z","size":186,"stargazers_count":1979,"open_issues_count":18,"forks_count":53,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-14T13:07:56.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maaslalani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["maaslalani"]}},"created_at":"2022-11-12T03:55:57.000Z","updated_at":"2025-04-14T09:56:52.000Z","dependencies_parsed_at":"2022-11-21T17:53:27.209Z","dependency_job_id":"4fe75a6b-440e-4f8d-b7c0-e69bd25e3bd1","html_url":"https://github.com/maaslalani/nap","commit_stats":{"total_commits":111,"total_committers":5,"mean_commits":22.2,"dds":"0.19819819819819817","last_synced_commit":"516b48f90163636709ec7589059903bb72893663"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fnap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fnap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fnap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fnap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maaslalani","download_url":"https://codeload.github.com/maaslalani/nap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:03.176Z","updated_at":"2025-10-23T22:13:26.815Z","avatar_url":"https://github.com/maaslalani.png","language":"Go","funding_links":["https://github.com/sponsors/maaslalani"],"categories":["Go","others","\u003ca name=\"cheatsheet\"\u003e\u003c/a\u003eCommands cheatsheet and snippets","Table of Contents","Misc"],"sub_categories":["Luke Pighetti Videos"],"readme":"# Nap\n\n\u003cimg width=\"1200\" alt=\"Nap\" src=\"https://user-images.githubusercontent.com/42545625/202545409-eb53f92a-233a-4f78-b598-a59c65248ad3.png\"\u003e\n\n\u003csub\u003e\u003csub\u003ez\u003c/sub\u003e\u003c/sub\u003e\u003csub\u003ez\u003c/sub\u003ez\n\nNap is a code snippet manager for your terminal. Create and access new snippets\nquickly with the command-line interface or browse, manage, and organize them with the\ntext-user interface. Keep your code snippets safe, sound, and well-rested in your terminal.\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"1000\" src=\"https://user-images.githubusercontent.com/42545625/202577549-f2e0887a-b740-41f4-9408-c2f53673503f.gif\" /\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Text-based User Interface\n\nLaunch the interactive interface:\n\n```bash\nnap\n```\n\n\u003cimg width=\"1000\" src=\"https://user-images.githubusercontent.com/42545625/202768989-caf2ab62-b69d-4e2d-ac93-1517eab7f2ad.gif\" /\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eKey Bindings\u003c/summary\u003e\n\n\u003cbr /\u003e\n\n| Action | Key |\n| :--- | :--- |\n| Create a new snippet | \u003ckbd\u003en\u003c/kbd\u003e |\n| Edit selected snippet (in `$EDITOR`) | \u003ckbd\u003ee\u003c/kbd\u003e |\n| Copy selected snippet to clipboard | \u003ckbd\u003ec\u003c/kbd\u003e |\n| Paste clipboard to selected snippet | \u003ckbd\u003ep\u003c/kbd\u003e |\n| Delete selected snippet | \u003ckbd\u003ex\u003c/kbd\u003e |\n| Rename selected snippet | \u003ckbd\u003er\u003c/kbd\u003e |\n| Set folder of selected snippet | \u003ckbd\u003ef\u003c/kbd\u003e |\n| Set language of selected snippet | \u003ckbd\u003eL\u003c/kbd\u003e |\n| Move to next pane | \u003ckbd\u003etab\u003c/kbd\u003e |\n| Move to previous pane | \u003ckbd\u003eshift+tab\u003c/kbd\u003e |\n| Search for snippets | \u003ckbd\u003e/\u003c/kbd\u003e |\n| Toggle help | \u003ckbd\u003e?\u003c/kbd\u003e |\n| Quit application | \u003ckbd\u003eq\u003c/kbd\u003e \u003ckbd\u003ectrl+c\u003c/kbd\u003e |\n\n\u003c/details\u003e\n\n## Command Line Interface\n\nCreate new snippets:\n\n```bash\n# Quick save an untitled snippet.\nnap \u003c main.go\n\n# From a file, specify Notes/ folder and Go language.\nnap Notes/FizzBuzz.go \u003c main.go\n\n# Save some code from the internet for later.\ncurl https://example.com/main.go | nap Notes/FizzBuzz.go\n\n# Works great with GitHub gists\ngh gist view 4ff8a6472247e6dd2315fd4038926522 | nap\n```\n\n\u003cimg width=\"600\" src=\"https://user-images.githubusercontent.com/42545625/202767159-134d679f-490f-4ad2-8875-cda604aa7b13.gif\" /\u003e\n\nOutput saved snippets:\n\n```bash\n# Fuzzy find snippet.\nnap fuzzy\n\n# Write snippet to a file.\nnap go/boilerplate \u003e main.go\n\n# Copy snippet to clipboard.\nnap foobar | pbcopy\nnap foobar | xclip\n```\n\n\u003cimg width=\"600\" src=\"https://user-images.githubusercontent.com/42545625/202240249-d724fd73-2f90-4036-b9fc-6d2ccef982b3.gif\" /\u003e\n\nList snippets:\n\n```bash\nnap list\n```\n\u003cimg width=\"600\" src=\"https://user-images.githubusercontent.com/42545625/202242653-1696dda6-2527-4c38-b673-74d67ad1517f.gif\" /\u003e\n\nFuzzy find a snippet (with [Gum](https://github.com/charmbracelet/gum)).\n\n```bash\nnap $(nap list | gum filter)\n```\n\n\u003cimg width=\"600\" src=\"https://user-images.githubusercontent.com/42545625/202240268-3a71fde6-73c3-4b0a-b129-f87ec1bb1b88.gif\" /\u003e\n\n## Installation\n\n\u003c!--\n\nUse a package manager:\n\n```bash\n# macOS\nbrew install nap\n\n# Arch\nyay -S nap\n\n# Nix\nnix-env -iA nixpkgs.nap\n```\n\n--\u003e\n\nInstall with Go:\n\n```sh\ngo install github.com/maaslalani/nap@main\n```\n\nOr download a binary from the [releases](https://github.com/maaslalani/nap/releases).\n\n\n## Customization\n\nNap is customized through a configuration file located at `NAP_CONFIG` (`$XDG_CONFIG_HOME/nap/config.yaml`).\n\n```yaml\n# Configuration\nhome: ~/.nap\ndefault_language: go\ntheme: nord\n\n# Colors\nbackground: \"0\"\nforeground: \"7\"\nprimary_color: \"#AFBEE1\"\nprimary_color_subdued: \"#64708D\"\ngreen: \"#527251\"\nbright_green: \"#BCE1AF\"\nbright_red: \"#E49393\"\nred: \"#A46060\"\nblack: \"#373B41\"\ngray: \"240\"\nwhite: \"#FFFFFF\"\n```\n\nThe configuration file can be overridden through environment variables:\n\n```bash\n# Configuration\nexport NAP_CONFIG=\"~/.nap/config.yaml\"\nexport NAP_HOME=\"~/.nap\"\nexport NAP_DEFAULT_LANGUAGE=\"go\"\nexport NAP_THEME=\"nord\"\n\n# Colors\nexport NAP_PRIMARY_COLOR=\"#AFBEE1\"\nexport NAP_RED=\"#A46060\"\nexport NAP_GREEN=\"#527251\"\nexport NAP_FOREGROUND=\"7\"\nexport NAP_BACKGROUND=\"0\"\nexport NAP_BLACK=\"#373B41\"\nexport NAP_GRAY=\"240\"\nexport NAP_WHITE=\"#FFFFFF\"\n```\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg\n    width=\"1000\"\n    alt=\"image\"\n    src=\"https://user-images.githubusercontent.com/42545625/202867429-5bcf8fae-5dd7-478c-b958-638aa5765d97.png\"\n  /\u003e\n\u003c/p\u003e\n\n## License\n\n[MIT](https://github.com/maaslalani/nap/blob/master/LICENSE)\n\n## Feedback\n\nI'd love to hear your feedback on improving `nap`.\n\nFeel free to reach out via:\n* [Email](mailto:maas@lalani.dev) \n* [Twitter](https://twitter.com/maaslalani)\n* [GitHub issues](https://github.com/maaslalani/nap/issues/new)\n\n---\n\n\u003csub\u003e\u003csub\u003ez\u003c/sub\u003e\u003c/sub\u003e\u003csub\u003ez\u003c/sub\u003ez\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaslalani%2Fnap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaaslalani%2Fnap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaslalani%2Fnap/lists"}