- Swift 88.3%
- Shell 11.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| scripts | ||
| Sources | ||
| .claude_consciousness.m8 | ||
| .gitignore | ||
| .swift-version | ||
| .swiftlint.yml | ||
| context.md | ||
| LICENSE | ||
| NOTICE | ||
| Package.swift | ||
| README.md | ||
🔐 PGP.mac
Making encryption sexy again, one hotkey at a time!
A beautiful, modern macOS menu bar app for PGP encryption. Because copying keys between apps shouldn't feel like performing surgery.
✨ What Makes PGP.mac Special?
Tired of command-line PGP? We were too! PGP.mac brings encryption to the 21st century:
- 🎯 Menu Bar App - Always there when you need it, hidden when you don't
- ⌨️ Global Hotkeys - Highlight text anywhere, press ⌘⇧E, boom - encrypted!
- 🎨 Beautiful UI - SwiftUI-powered interface that doesn't make your eyes bleed
- 📋 Copy & Paste Heaven - All operations support clipboard workflow
- 🔑 Multiple Keys - Manage work keys, personal keys, family keys - all in one place
- 📄 File Support - Encrypt and decrypt files with ease
- ✍️ Sign & Verify - Prove authenticity of your messages
🚀 Quick Start
Requirements
- macOS 13.0 (Ventura) or later
- Xcode 15.0 or later (for building from source)
- Swift 5.9+
Installation
Option 1: Quick Install (Easiest!)
curl https://aye.is/8bit-wraith/PGP.mac | sh
This intelligent installer will:
- ✅ Detect your macOS version
- 📦 Download the latest release from GitHub
- 🚀 Install to your Applications folder
- 💫 Just works!
Note: Legacy endpoint curl https://aye.is/pgp | sh also works!
Option 2: Build from Source
# Clone the repo
git clone https://github.com/8bit-wraith/PGP.mac.git
cd PGP.mac
# Build and create app bundle
./scripts/manage.sh app
# Open the app
open build/PGP.mac.app
Option 2: Using the Manage Script
Our colorful management script makes everything easy:
# Build debug version
./scripts/manage.sh build
# Build release version
./scripts/manage.sh release
# Run the app
./scripts/manage.sh run
# Run tests
./scripts/manage.sh test
# Clean build artifacts
./scripts/manage.sh clean
# Show all commands
./scripts/manage.sh help
🎮 How to Use
First Launch
-
Grant Accessibility Permissions
- When you first run PGP.mac, macOS will ask for Accessibility permissions
- This is required for global hotkeys to work
- Go to System Preferences → Privacy & Security → Accessibility
- Enable PGP.mac
-
Find the Menu Bar Icon
- Look for the 🔐 shield icon in your menu bar
- Click it to open the app
Managing Keys
Import a Key
- Click the menu bar icon
- Go to the Keys tab
- Click Import
- Paste the PGP key or choose a file
- Give it a nickname (like "Mom's Key" or "Work Email")
Generate a New Key
- Click the menu bar icon
- Go to the Keys tab
- Click Generate
- Enter your name and email
- Choose a strong passphrase (you can't recover this!)
- Wait a moment while your key is generated
Encrypting Messages
Using the App
- Open PGP.mac from the menu bar
- Go to the Encrypt tab
- Select a recipient from your keys
- Type or paste your message
- Click Encrypt
- Copy the encrypted message!
Using Global Hotkey (⌘⇧E)
- Set a default recipient in Settings
- Highlight any text in any app
- Press ⌘⇧E
- Boom! Text is replaced with encrypted version
- Magic! ✨
Decrypting Messages
Using the App
- Open PGP.mac from the menu bar
- Go to the Decrypt tab
- Select your key (the one with the private key)
- Enter your passphrase
- Paste the encrypted message
- Click Decrypt
- Read your secrets!
⚙️ Global Hotkeys
PGP.mac supports system-wide hotkeys to encrypt/decrypt selected text in any application!
| Hotkey | Action | Requirements |
|---|---|---|
| ⌘⇧E | Quick Encrypt | Default recipient set in Settings |
| ⌘⇧D | Quick Decrypt | Coming soon! 🚧 |
How it works:
- Highlight text in any app (Mail, Notes, Slack, whatever!)
- Press the hotkey
- PGP.mac grabs the text, encrypts/decrypts it, and replaces it
- Like magic, but with more math! 🎩✨
🏗️ Project Structure
PGP.mac/
├── Sources/
│ ├── App/ # macOS app code
│ │ ├── PGPmacApp.swift # App entry point & menu bar
│ │ ├── Views/ # SwiftUI views
│ │ └── Services/ # Hotkey manager
│ └── Core/ # Core PGP functionality
│ ├── Models/ # Data models
│ └── Services/ # Key management & crypto
├── Tests/ # Unit tests
├── scripts/
│ └── manage.sh # Colorful management script
└── Package.swift # Swift Package Manager config
🛠️ Development
Building
# Debug build
swift build
# Release build
swift build -c release
# Or use our fancy script!
./scripts/manage.sh build
Testing
# Run all tests
swift test
# Or with our colorful script
./scripts/manage.sh test
# Verbose mode
./scripts/manage.sh test-v
Code Style
We use SwiftFormat and SwiftLint to keep code clean:
# Format code
./scripts/manage.sh format
# Lint code
./scripts/manage.sh lint
🎨 Features Roadmap
- Menu bar app
- Import/export keys
- Generate new keys
- Encrypt/decrypt text
- Sign/verify messages
- Global hotkey for encryption
- Global hotkey for decryption (with secure passphrase prompt)
- File encryption/decryption UI
- Keybase integration
- iCloud keychain sync for keys
- Touch ID for passphrase
- Dark mode support
- Custom hotkey configuration
- Key server integration
- Signed commits for Git
🤝 Contributing
Contributions are welcome! This project is built with love by Hue & Aye, but we'd love your help making it even better.
How to Contribute
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Comment your code - We love comments! Explain the "why", not just the "what"
- Keep it clean - Run
./scripts/manage.sh formatbefore committing - Test your changes - Add tests for new features
- Have fun! - This is a passion project, enjoy it!
📝 License
PGP.mac is released under the MIT License - see LICENSE file for details.
Attribution Requirement ⭐
If you use PGP.mac in your project, you must include a visible link:
Example attribution:
- "Built with PGP.mac - https://aye.is/pgp"
- "Powered by PGP.mac - https://aye.is/pgp"
- "Encryption by PGP.mac - https://aye.is/pgp"
This link should be reasonably visible (About window, footer, credits, etc.)
Quick Install
curl https://aye.is/pgp | sh # bash it if you want
Important Licensing Note
PGP.mac itself is free and open source (MIT License) for both personal and commercial use.
However, PGP.mac depends on ObjectivePGP, which uses a dual license:
- ✅ Free for non-commercial use
- 💰 Requires commercial license for commercial use
If you plan to use PGP.mac in a commercial product, you'll need to obtain a commercial license for ObjectivePGP from its author:
- Contact: Marcin Krzyżanowski (marcin@krzyzanowskim.com)
For personal, educational, or non-commercial use, no additional licenses are required! 🎉
💬 Contact
Built with ❤️ by:
Special thanks to Trisha from Accounting for insisting on colorful output and keeping us organized! 🎨📊
🙏 Acknowledgments
- ObjectivePGP - The awesome Swift PGP library that powers this app
- The OpenPGP community for making encryption accessible
- Coffee ☕ - For making this possible
Remember: Keep your private keys safe, use strong passphrases, and encrypt all the things! 🔐✨
P.S. - If you find a bug, it's a feature. If you find a feature, it's probably a happy accident. 😄