Skip to content
/ snape Public

πŸ§™ A Severus Snippet Manager for macOS

License

Notifications You must be signed in to change notification settings

rgcr/snape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§™ Snape - A Severus Snippet Manager for macOS

Handle your snippets with Severus precision.

image

Features

  • ⚑ Quick index selection (a-z, A-Z)
  • πŸ” Real-time filtering with /
  • πŸ“ Folder-based snippet grouping with separators
  • πŸ‘€ Preview popup on hover and keyboard navigation
  • πŸ“‹ Automatic clipboard copy with visual confirmation
  • 🎨 Light/Dark/System theme support
  • πŸ–±οΈ Opens at cursor position
  • πŸ’Ύ Remembers window size
  • πŸšͺ Click outside to close

πŸ“– Philosophy

Snape follows the KISS principle β€” Keep It Simple, Severus πŸ§™.

  • Minimal UI, instant access
  • Zero learning curve: open, pick, done
  • Plain text storage for easy syncing and versioning
  • Integrates with your existing workflow, not the other way around
  • No accounts, no cloud, no nonsense

Requirements

  • macOS 13.0 (Ventura) or later

Installation

Homebrew

brew tap rgcr/formulae
brew install --cask snape

Or Download Latest Release

  1. Download Snape-2.0.0-macos.dmg from Releases
  2. Open the DMG and drag Snape.app to /Applications
  3. Bypass Gatekeeper xattr -cr /Applications/Snape.app

Hotkey Integration

  • Snape works best when bound to a global hotkey.
  • The app opens at your cursor position, you select a snippet, and it's copied to your clipboard.

macOS Shortcuts (Native)

  1. Open Automator β†’ New β†’ Quick Action
  2. Add "Run Shell Script" action
  3. Script: open -a Snape
  4. Save as "Launch Snape"
  5. Go to System Settings β†’ Keyboard β†’ Keyboard Shortcuts β†’ Services
  6. Find "Launch Snape" β†’ Assign shortcut (e.g., Cmd+Option+S)

Hammerspoon

-- In ~/.hammerspoon/init.lua:
hs.hotkey.bind({"cmd", "alt"}, "s", function()
    hs.application.launchOrFocus("Snape")
end)

skhd

# In ~/.config/skhd/skhdrc:
cmd + alt - s : open -a Snape

Raycast

Create a Quicklink with open -a Snape and assign a hotkey.

Keyboard Shortcuts

Normal Mode

Key Action
↑ ↓ Navigate snippets
Enter Select snippet and copy to clipboard
a-z A-Z Quick selection by index
/ Enter filter mode
? Show about dialog
Esc Quit

Filter Mode

Key Action
Type Filter snippets by name or content
Backspace Delete last character
↑ ↓ Navigate filtered list
Enter Select snippet
Esc Exit filter mode

Snippets Directory

Snippets are stored in: ~/.config/snape/

Each file is a snippet. The filename (without extension) becomes the snippet name.

Folder Structure

Use folders to organize snippets into groups:

~/.config/snape/
β”œβ”€β”€ readme.txt              # Ungrouped (shown first)
β”œβ”€β”€ 01-aws/                 # Group: "aws"
β”‚   β”œβ”€β”€ 01-get-account.txt
β”‚   └── 02-list-buckets.txt
β”œβ”€β”€ 02-linux/               # Group: "linux"
β”‚   β”œβ”€β”€ 01-find-files.txt
β”‚   └── 02-disk-usage.txt
└── scripts/                # Group: "scripts" (no prefix)
    └── backup.txt

Ordering:

  • Folders become section separators in the UI
  • Numeric prefix (01-, 02-) controls display order
  • Prefixes are stripped from display (e.g., 01-aws shows as "aws")
  • Ungrouped files (in root) appear first
  • Files within folders are also sorted by name/prefix

Default Snippets

On first launch, if no snippets exist, sample snippets are created:

  • hello.txt – "Hello, World!"
  • greeting.txt – Friendly greeting
  • hello-world.go – Hello World in Go

Settings

Click the βš™οΈ gear icon to access settings:

  • Theme: System / Light / Dark

Window size is saved automatically when you resize.

Acknowledgments

  • Inspired by the template system of AutoHotkey’s CL3 utility

Contributing

  1. Fork the repo
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push the branch: git push origin my-new-feature
  5. Open a Pull Request πŸš€

About

πŸ§™ A Severus Snippet Manager for macOS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors