Skip to content

Releases: Bilal140202/snip

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 27 Jul 22:23

🎉 snip v0.5.0 — snip setup full project bootstrap

One command to get a fresh clone running. Point a new teammate at a repo and they're productive immediately:

git clone https://github.com/yourorg/yourproject.git
cd yourproject
snip setup

Seven steps run in order, each preferring a snippet tagged ["setup"] whose key matches the step name (falling back to auto-detected commands):

Step What it does
check-tools Detect Node/Rust/Go/Python/Docker/etc. from project files. Reports found + missing.
install-deps pnpm install / npm install / cargo fetch / go mod download / pip install / bundle install / mix deps.get (auto-detected from lockfiles).
create-env Copy .env.example.env. If no example, generate a template from env vars referenced in snippets ($VAR, ${VAR}). Never overwrites an existing .env.
start-services docker compose up -d if docker-compose.yml exists and daemon is running. Skips gracefully if Docker isn't available.
build Run the project's build command (snippet tagged ["setup"] with key build, else build snippet, else detected).
test Run the project's test command. Failures don't abort setup.
dev Start the dev server in the foreground (last step, blocks until Ctrl+C).

Snippet-driven customization

Tag any snippet with ["setup"] and it will be used in preference to the auto-detected command — no config files needed:

[install-deps]
cmd = "pnpm install --frozen-lockfile"
desc = "Install dependencies"
tags = ["setup"]

[build]
cmd = "turbo build"
desc = "Build all packages"
tags = ["setup"]

Flags

# Skip specific steps:
snip setup --skip=build,test

# Run only specific steps:
snip setup --only=install-deps,create-env

# Non-interactive (CI mode — uses defaults, never prompts):
snip setup --non-interactive

# Dry-run (show what would happen without executing):
snip setup --dry-run

Safety

  • Interactive mode (default) prompts before any step that executes a command.
  • --non-interactive skips prompts (CI mode).
  • --dry-run prints what would run without executing anything.
  • The dev step is always last and runs in the foreground.
  • create-env never overwrites an existing .env.

📦 Install

Homebrew (macOS/Linux)

brew install Bilal140202/snip/snip

Cargo

cargo install snipit

Binary download

Pre-built binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached below.

# Linux (x86_64)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.5.0/snip-x86_64-linux -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

# macOS (Apple Silicon)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.5.0/snip-aarch64-macos -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

📚 Full changelog

See CHANGELOG.md.

Full Changelog: v0.4.0...v0.5.0

v0.4.0

v0.4.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 Jul 02:54

🎉 snip v0.4.0 — natural-language execution, enhanced doctor, picker preview pane

This release is about making snip feel less like a snippet store and more like a command palette for your terminal.

✨ What's new

1. Natural-language execution

Run a snippet by describing what you want, not by remembering its key:

$ snip "deploy staging"
→ kubectl --context=stg apply -f k8s/

$ snip "start frontend"
→ npm run dev

$ snip "release"
→ gh release create {{version}} --title {{version}} --notes-from-tag

The matcher scores every snippet against your phrase by combining signals from key, command, description, and tags. Stop-words (the, a, to, run, …) are filtered out so they don't dominate. When the top match isn't a clear winner (margin < 30 points), snip shows the top 5 candidates and asks you to be more specific.

2. Enhanced snip doctor

Doctor now checks the project environment, not just snippet binaries:

$ snip doctor
✓ deploy — kubectl apply -f k8s/
✓ db.up — docker compose up -d

Project environment:
  ⚠ Snippets reference env var(s) not set in your shell: $DEPLOY_TOKEN, $DATABASE_URL
  ℹ No .env file found — consider creating one with: DEPLOY_TOKEN=... DATABASE_URL=...
  ⚠ Snippets use Docker but docker — daemon not running (start with `dockerd` or open Docker Desktop)

Three new check categories:

  • Env vars referenced in snippets (via $VAR or ${VAR}) but not set in your shell. Filters out always-set vars like PATH, HOME, USER.
  • Missing .env file when env vars are referenced — suggests a template with the missing var names.
  • Docker daemon not running when any snippet uses docker compose or docker .... Distinguishes between binary-missing, daemon-not-running, and permission-denied.

3. Picker preview pane

Both the fzf and built-in pickers now show a live preview of the highlighted snippet's full command, tags, and variables:

snip> deploy
❯ deploy.staging   Deploy to staging environment         #deploy #release
  deploy.production Deploy to production                    #deploy
────────────────────────────────────────────────────────────────────────────
  cmd:  kubectl --context=stg apply -f k8s/
  tags: #deploy #release

↓/↑ navigate · enter select · q quit · 2/2 · type to filter
  • fzf mode: uses --preview with a side-channel TSV file so the preview updates as you move the cursor. Window is down:3:wrap.
  • Built-in mode (no fzf installed): list pane is followed by a ───── separator and a preview block showing cmd:, tags:, vars: rows.
  • List rows now also show inline #tag chips in purple.

📦 Install

Homebrew (macOS/Linux)

brew install Bilal140202/snip/snip

Cargo

cargo install snipit

Binary download

Pre-built binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached below.

# Linux (x86_64)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.4.0/snip-x86_64-linux -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

# macOS (Apple Silicon)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.4.0/snip-aarch64-macos -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

📚 Full changelog

See CHANGELOG.md.

Full Changelog: v0.3.5...v0.4.0

v0.3.5

v0.3.5 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 22:19

🎉 snip v0.3.5 — crate renamed to snipit

This is a packaging-only release. The crate has been renamed from snipcmd to snipit on crates.io — shorter and more memorable. The binary is still installed as snip; no usage changes.

The previous snipcmd crate (v0.3.2 and v0.3.4) has been yanked from crates.io.

📦 Install

Homebrew (macOS/Linux)

brew install Bilal140202/snip/snip

Cargo

cargo install snipit

ℹ️ Previously cargo install snipcmd. If you installed that version, switch with:

cargo uninstall snipcmd
cargo install snipit

Binary download

Pre-built binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached below.

# Linux (x86_64)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.5/snip-x86_64-linux -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

# macOS (Apple Silicon)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.5/snip-aarch64-macos -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

📚 Full changelog

See CHANGELOG.md.

Full Changelog: v0.3.4...v0.3.5

v0.3.4

v0.3.4 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 18:29

🎉 snip v0.3.4 — CI fully green

This is the first release where all 13 CI jobs pass on every supported platform (Linux, macOS, Windows) and toolchain (stable + MSRV 1.88).

✨ What's new since v0.2.0

6 new commands

  • snip search <query> — full-text search across snippet key, command, description, and tags. Supports --json.
  • snip tag <tag> [--run <name>] — list snippets by tag, optionally execute one.
  • snip rename <old> <new> — rename a snippet while preserving all metadata.
  • snip mv <name> <section> — move a snippet to a different section.
  • snip export <name> — copy a snippet to the clipboard (TOML or --format cmd).
  • snip run --dry-run / --print — preview the resolved command without executing it.
  • snip import <gist-url> — import snippets from a GitHub gist URL.

6 new auto-detectors (5 → 11 file types)

File What it detects
go.mod Common go commands (build, test, run, fmt, vet, mod)
deno.json / deno.jsonc Deno tasks (with comment-stripping for JSONC)
Taskfile.yml / Taskfile.yaml Top-level tasks
justfile / Justfile Recipes with # doc comments
Rakefile Tasks with desc "..." or # doc comments
mix.exs Common mix commands (compile, test, fmt, deps, phx, ecto, release)

Global snippets

~/.config/snip/global.toml (XDG) or ~/.snips (legacy) is automatically merged into every project at the lowest priority.

Packaging

  • Published on crates.io as snipcmd (the crate name snip was already taken). Binary is still installed as snip.
  • Homebrew tap: brew install Bilal140202/snip/snip
  • MSRV: Rust 1.88 (required by transitive dep home v0.5.12)

Quality

  • 375 tests (up from 165 in v0.2.0)
  • Clippy passes with -D warnings on --all-targets --all-features
  • Fixed pre-existing bug where docker.rs called serde_yaml even with the feature off
  • Fixed pre-existing macOS test bug (path canonicalization)
  • Fixed release workflow bug that produced snip-x86_64-windows.exe.exe
  • Binary size 1.6 MiB (well under the 4 MiB CI gate)

📦 Install

Homebrew (macOS/Linux)

brew install Bilal140202/snip/snip

Cargo

cargo install snipcmd

Binary download

Pre-built binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached below.

# Linux (x86_64)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.4/snip-x86_64-linux -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

# macOS (Apple Silicon)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.4/snip-aarch64-macos -o snip
chmod +x snip && sudo mv snip /usr/local/bin/

📚 Full changelog

See CHANGELOG.md.

Full Changelog: v0.2.0...v0.3.4

v0.3.3

v0.3.3 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 18:24

Full Changelog: v0.3.2...v0.3.3

v0.3.2

v0.3.2 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 18:21

Full Changelog: v0.3.1...v0.3.2

v0.3.1

v0.3.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 18:17

Full Changelog: v0.3.0...v0.3.1

v0.3.0

v0.3.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 26 Jul 14:02

🎉 snip v0.3.0

The biggest release yet — 6 new commands, 6 new auto-detectors, global snippets, and 375 tests.

✨ Highlights

New commands

  • snip search <query> — full-text search across snippet key, command, description, and tags. Supports --json for piping to other tools.
  • snip tag <tag> [--run <name>] — list snippets by tag, optionally execute one. Suggests existing tags on no-match.
  • snip rename <old> <new> — rename a snippet while preserving all metadata (vars, tags, shell, dir).
  • snip mv <name> <section> — move a snippet to a different section while preserving its leaf name. Use _ or - as section to move to top-level.
  • snip export <name> — copy a snippet to the clipboard as TOML or just the command (--format cmd). Falls back to --stdout when no clipboard tool is available. Supports wl-copy / xclip / xsel / pbcopy / clip.
  • snip run --dry-run / --print — print the resolved command without executing it. Useful for verifying variable substitution.
  • snip import <url> — import snippets from a GitHub gist URL (https://gist.github.com/<user>/<id>). Auto-picks the first .toml or .snips file in the gist; override with --file <name>.

New auto-detectors (5 → 11 file types)

File What it detects
go.mod Common go commands (build, test, run, fmt, vet, mod)
deno.json / deno.jsonc Deno tasks (with comment-stripping for JSONC)
Taskfile.yml / Taskfile.yaml Top-level tasks
justfile / Justfile Recipes with # doc comments
Rakefile Tasks with desc "..." or # doc comments
mix.exs Common mix commands (compile, test, fmt, deps, phx, ecto, release)

Global snippets

~/.config/snip/global.toml (XDG) or ~/.snips (legacy) is automatically merged into every project at the lowest priority. Personal cross-project commands without copy-paste.

Quality

  • Cleaned 49 dead-code warnings; added #![allow(dead_code)] at the bin crate root for the lib's public API surface.
  • Fixed pre-existing bug where docker.rs called serde_yaml even when the detect-docker feature was disabled.
  • Moved rust-version from [profile.release] (where it was a warning) to [package] where it belongs.
  • Clippy now passes with -D warnings on --all-targets --all-features.
  • 375 tests (up from 165) — every new feature has unit tests covering happy path, edge cases, and error paths.

📦 Install

From crates.io

cargo install snip

From source

git clone https://github.com/Bilal140202/snip.git
cd snip
cargo install --path .

Binary download

Pre-built binaries for Linux, macOS, and Windows are attached below.

# Linux (x86_64)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.0/snip-x86_64-linux | install -m755 /dev/stdin ~/.local/bin/snip

# macOS (Apple Silicon)
curl -sL https://github.com/Bilal140202/snip/releases/download/v0.3.0/snip-aarch64-macos | install -m755 /dev/stdin /usr/local/bin/snip

📚 Full changelog

See CHANGELOG.md.

Full Changelog: https://github.com/Bilal140202/snip/commits/v0.3.0