Scripty – Share Scripts via GitHub Gists
A tool to share small scripts between teams without the overhead of a dedicated git repo. GitHub Gists as the storage backend gives you versioning, web UI, and collaboration for free.
The Problem
Sometimes you have a useful script—a one-off data migration, a build helper, a debugging tool. It’s too small for its own repo, but copy-pasting it around is messy. Email attachments rot. Slack snippets get lost.
Gists are perfect for this, but the workflow is clunky: create gist in browser, copy URL, clone locally, edit, push. Scripty wraps this into simple commands.
Commands
scripty share <file> – Upload a local file to a new gist. Returns a shareable URL. Tracks the file→gist mapping in ~/.config/scripty/config.toml.
scripty import <gist-url> – Clone someone else’s gist to your local machine. The gist becomes a local file you can run and edit.
scripty update – Push local changes back to the gist. If you imported someone else’s script, this forks it to your own gist (you can’t push to theirs).
scripty sync – Pull the latest remote changes and merge with your local edits. Git merge semantics—conflicts are possible if both sides changed.
Why Gists
- Versioned – full git history for every script
- Web UI – view, comment, fork in browser
- API – GitHub’s gist API is simple and well-documented
- Free – unlimited public gists, private gists with GitHub account
- Familiar – developers already know gists exist
Implementation
Rust CLI using:
clapfor argument parsingreqwestfor GitHub API calls- Config stored in TOML at
~/.config/scripty/config.toml
Each tracked script maps a local filepath to a gist ID. Import clones the gist repo locally. Update/sync use git operations under the hood.
Open Questions
- Multi-file gists? Gists support multiple files, could be useful for script + config pairs
- Private gists by default? Public is more shareable, private is safer for internal tools
- Conflict resolution UX? Git conflicts in a single-file context might need special handling