GitHub Gist Integration
Two-way sync with GitHub Gists.
GitHub Gist Integration
SnipperApp 3 integrates with GitHub Gists, enabling two-way synchronization between your local snippets and your GitHub Gists. This lets you manage Gists from the comfort of SnipperApp while keeping them accessible on GitHub.
Setting Up GitHub Authentication
SnipperApp 3 uses the GitHub OAuth Device Flow for authentication, which is a secure method that does not require you to generate or paste personal access tokens.
Step-by-Step Setup
- Open Settings (Cmd+,).
- Navigate to the GitHub or Integrations section.
- Click Connect GitHub Account.
- A dialog appears with a device code and a link to GitHub's verification page.
- Open the link in your browser (or it opens automatically).
- Enter the device code on the GitHub page.
- Authorize SnipperApp 3 to access your Gists.
- Return to SnipperApp -- the connection is confirmed automatically.
The OAuth token is stored securely in your Mac's Keychain. You only need to authenticate once.
Two-Way Sync
Once connected, SnipperApp 3 provides true two-way sync with your GitHub Gists:
Pull from GitHub
- Import all Gists -- On first sync, all your existing GitHub Gists are imported into SnipperApp as local snippets.
- Ongoing updates -- Changes made to Gists on GitHub (via the web, API, or other tools) are pulled into SnipperApp on the next sync.
Push to GitHub
- Create Gists -- When you create a snippet in SnipperApp and sync, a corresponding Gist is created on GitHub.
- Update Gists -- Edits to synced snippets in SnipperApp are pushed to the corresponding Gist.
- Delete Gists -- Deleting a synced snippet in SnipperApp can optionally delete the corresponding Gist on GitHub.
Sync Direction
You can configure sync behavior in Settings:
- Two-way (default) -- Changes flow in both directions.
- Pull only -- Only import changes from GitHub; do not push local changes.
- Manual -- Sync only when explicitly triggered.
Multi-File Gist Support
GitHub Gists can contain multiple files. SnipperApp 3 handles this gracefully:
- Multi-file Gists are imported as a single snippet with all files' content.
- The primary file (typically the first file in the Gist) is used as the snippet content.
- Additional files in the Gist are preserved and can be viewed.
- When editing a multi-file Gist locally, changes to the primary content are synced back to the corresponding file in the Gist.
Editing Gists Locally
When you open a synced Gist in SnipperApp:
- The snippet editor works exactly as it does for any other snippet -- full syntax highlighting, themes, and all editor features are available.
- Edit the content as needed.
- On the next sync, your changes are pushed to the Gist on GitHub.
The Gist's description maps to the snippet's title, and the Gist's file content maps to the snippet's body.
Gist Visibility
When creating Gists through SnipperApp:
- Secret Gists (default) -- Gists are created as secret (unlisted). They are not searchable on GitHub but can be accessed by anyone with the URL.
- Public Gists -- You can configure SnipperApp to create public Gists instead, which are searchable and visible on your GitHub profile.
You can change the visibility setting in the GitHub integration preferences.
Sync Indicators
Synced Gists have a visual indicator in the snippet list:
- A GitHub icon appears next to snippets that are linked to a Gist.
- The snippet detail view shows the Gist URL, which you can click to open the Gist on GitHub in your browser.
Disconnecting GitHub
To disconnect your GitHub account:
- Open Settings (Cmd+,).
- Navigate to the GitHub section.
- Click Disconnect.
- Your local snippets are preserved but are no longer linked to GitHub Gists.
Reconnecting later will re-link snippets to their corresponding Gists based on stored identifiers.
Tips
- Use Gist sync for sharing -- If you want to share a snippet with a colleague, sync it as a Gist and send them the URL.
- iCloud + Gist sync -- These two sync mechanisms are independent. You can use both simultaneously -- iCloud for cross-device sync and Gists for public sharing.
- Rate limits -- GitHub API has rate limits. If you have a very large Gist library, the initial import may take a few minutes.
Related
- iCloud Sync -- Device-to-device sync via iCloud.
- Backup & Restore -- Additional data protection.