snip – command-line snippet manager for Bash

snip is a command-line utility for saving and recalling Bash commands directly from the shell prompt. It is particularly useful for commands that are difficult to remember, contain numerous arguments or are needed only occasionally. Instead of maintaining a separate text file of commands, users can capture a working command and retrieve it later through keyboard shortcuts.

The application integrates with Bash’s command-line editing facilities and uses fzf to provide interactive searching. When a snippet is selected, the stored command is inserted into the current input line, allowing it to be reviewed or modified before execution. Saved commands are stored in a straightforward text database with descriptions and timestamps. snip also supports synchronising collections between computers through Git, making it possible to maintain a reusable command library across multiple systems.

This is free and open source software.

Key Features

  • Save frequently used Bash commands directly from the command prompt.
  • Recall snippets using configurable keyboard shortcuts.
  • Uses fzf for interactive fuzzy searching.
  • Inserts recalled commands into the current input line for editing or execution.
  • Stores snippets in a plain text database.
  • Records descriptions and timestamps alongside saved commands.
  • Provides commands for listing and searching stored snippets.
  • Supports displaying detailed snippet information, including hostnames and creation dates.
  • Allows commands to be imported from existing text files.
  • Supports editing the snippet database using an external text editor.
  • Provides optional syntax highlighting through bat in the snippet preview window.
  • Supports synchronisation of snippet databases through Git repositories.
  • Allows collections from multiple hosts to be searched and listed together.
  • Provides configurable keyboard bindings, editor selection and preview themes.
  • Offers command-line help describing available operations and options.

Website: github.com/marcopaganini/snip
Support:
Developer: Marco Paganini
License: MIT License

snip demo

snip is written in Bash. Learn Bash with our recommended free books and free tutorials.

Return to Snippet Tools


Related Software

Snippet Tools
petSimple command-line snippet manager
YASnippetTemplate system for Emacs
LuaSnipHighly configurable completion engine for Neovim editing workflows
napCode snippets in your terminal
GistoCode snippet manager
massCodeLocal-first developer workspace
The WayCode snippets manager written in Rust
SnipKitFast command-line tool for saving and recalling reusable commands
ScriptHausOrganize scripts and bash one-liners
snipSimple snippet manager for bash
SnipSimple snippet manager for your predefined Ultisnips Snippet Directory
SafeScriptSecurely store and organise reusable shell commands and scripts
boomManages your text snippets on the command line

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted