Skip to content

Guide · Open source

How to use Lepton: install, sync snippets and customize

Updated · written with AI from the project's own documentation and checked against our catalogue data

Lepton is a desktop app for saving and organizing small pieces of code and notes, with snippets synced to GitHub Gist or GitLab personal snippets. This guide shows how to install it on macOS or Linux, connect a snippet provider, organize and search your snippets, and customize it. It is written for people who already keep snippets online and want a desktop editor for them.

Leptonhackjutsu/Lepton · ★ 10.3k · MIT

Quick start

  1. 1Install the app. On macOS, run the Homebrew cask command. On Linux, install the Snap package. Other systems can use the released packages.
  2. 2Open the About page. Press Command/Ctrl + , to find the exact path of your configuration file.
  3. 3Create .leptonrc. Create the file in your home directory if it does not exist, then set your options.
  4. 4Choose a snippet provider. Set the provider to github or gitlab, and add your token or personal access token.
  5. 5Sync your snippets. Press Cmd/Ctrl + R to sync with the selected provider.
  6. 6Organize and search. Add tags, group by language, and use Shift + Space to search.

Install Lepton on macOS or Linux

On macOS, Lepton can be installed with Homebrew. On Linux, it is available from the Snap Store. You can also download the released packages for macOS, Windows or Linux from the project's releases page.

  • macOS: Homebrew (optional prerequisite)
  • Linux: Snap (optional prerequisite)
  • Windows and other systems: download the released packages
brew install --cask lepton snap install lepton

Connect Lepton to GitHub Gist or GitLab

Lepton syncs your snippets with GitHub Gist or GitLab personal snippets, so your collection is stored with those services rather than only on your computer. The snippet provider is set in the configuration file with the value github or gitlab. GitLab support covers GitLab.com and self-managed GitLab through a personal access token. GitHub Enterprise is also supported.

For real GitHub login, the README says you need to register your own application and put its client ID and client secret in a configuration file. If that file is missing, Lepton falls back to a dummy config that is useful for rendering tests but does not support real GitHub login.

  • GitHub: uses a GitHub token and supports GitHub Enterprise
  • GitLab: uses a personal access token and works with GitLab.com and self-managed instances
  • Proxy: supported via the proxy setting

Create, edit and sync snippets

Snippets can be public or secret, and there is no stated limit on how many you can keep or how many tags you can add. Use the keyboard shortcuts to create, edit, submit and sync without leaving the keyboard. Sync pulls and pushes your snippets with the selected provider.

  • New snippet: Cmd/Ctrl + N
  • Edit snippet: Cmd/Ctrl + E
  • Delete selected snippet: Cmd/Ctrl + Del
  • Submit changes from the editor: Cmd/Ctrl + S
  • Sync with the selected provider: Cmd/Ctrl + R

Lepton lets you add tags and group snippets by language. Search finds snippets quickly, and the search bar is opened with Shift + Space. The search FAQ in the project's wiki explains which fields are searched and how content search behaves.

  • Tags: unlimited
  • Language groups
  • Search bar: Shift + Space
  • Dashboard: Cmd/Ctrl + D
  • Immersive mode: Cmd/Ctrl + I

Use Markdown and Jupyter Notebook snippets

Besides plain code, Lepton supports Markdown and Jupyter Notebook content in the same app. This is useful if your notes and runnable examples live next to your code snippets.

  • Markdown content
  • Jupyter Notebook content

Customize Lepton with .leptonrc

Lepton is customized through a file named .leptonrc in your home directory. The About page, opened with Command/Ctrl + ,, shows the exact path. Create the file if it does not exist. Options include theme, editor, proxy, shortcuts, zoom, snippet provider, enterprise settings and interface language.

Built-in themes include light, dark, dracula and several others. For full options, see the project's configuration docs.

  • Themes: light, dark, dracula, solarized-light, solarized-dark, github-dark and more
  • Interface languages: en, es, fr, ja, ko, tr, zh-Hans, zh-Hant
  • Other sections: snippet, editor, logger, proxy, shortcuts, zoom, notifications
<home_dir>/.leptonrc

What people use it for

  • Keeping a personal library of code snippets that is backed by your GitHub Gists.
  • Storing GitLab personal snippets, including on a self-managed GitLab instance, in a desktop editor.
  • Keeping Markdown notes and Jupyter Notebook examples next to ordinary code snippets.
  • Working in a dark or light theme with keyboard-driven snippet editing.

Frequently asked questions

Is Lepton free?

The README lists Lepton as free and open source under the MIT licence. It says the project does not accept donations, but the maintainer has an optional buy me a coffee link.

How do I install Lepton on Mac?

Run brew install --cask lepton with Homebrew. You can also download the released packages from the project's releases page.

How do I install Lepton on Linux?

Run snap install lepton with Snap. The README points to the Snap Store listing for Lepton.

Does Lepton work offline?

No. The README describes Lepton as syncing snippets with GitHub Gist or GitLab, so it is not a fully offline storage tool.

Why does GitHub login not work after install?

Real GitHub login requires your own registered application client ID and client secret. Without them, Lepton uses a dummy config that does not support real login.

How does Lepton compare to GitHub Gist or Snippets (Burn)?

Lepton is a desktop editor that syncs with Gist or GitLab snippets, so it suits people who already store snippets there. The README does not provide a feature comparison with the other tools listed, so check each one for what you need.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Lepton suits developers who already keep snippets as GitHub Gists or GitLab snippets and want a desktop editor with tags, Markdown and Jupyter support. Skip it if you need fully offline storage, real GitHub login without setting up your own OAuth app, or shared team editing, which the README does not describe.

Install options & downloads