#version-control #snippets #pocket #search #workflow #save #command

bin+lib pocket-cli

A CLI tool for saving, organizing, and retrieving code snippets with integrated version control

10 releases (4 breaking)

new 0.6.3 Mar 12, 2025
0.6.2 Mar 12, 2025
0.5.2 Mar 12, 2025
0.4.0 Mar 10, 2025
0.1.2 Mar 10, 2025

#822 in Command line utilities

Download history 206/week @ 2025-03-05

206 downloads per month

MIT license

400KB
7K SLoC

Pocket

Where your code snippets go to thrive, not disappear into the digital void

Hits-of-Code Crates.io License: MIT PRs Welcome

A CLI tool for saving, organizing, and retrieving code snippets with integrated version control. Because your brilliant solutions deserve better than being lost in a sea of Stack Overflow tabs.

Overview

Pocket helps developers save and find code snippets, manage version control, and automate workflows. It's designed to reduce the time spent searching for code you've already written—because let's face it, you've solved this problem before, you just can't remember where you put the solution.

Features

  • Snippet Management: Save, search, and reuse code snippets that would otherwise be destined for digital oblivion
  • Semantic Search: Find snippets using natural language queries, because remembering exact variable names from six months ago is unrealistic
  • Backpacks: Organize snippets into collections, like folders but with a more adventurous name
  • Version Control: Built-in Git-like version control system that won't make you question your career choices
  • Workflows: Chain commands together for automation, because typing the same sequence repeatedly is soul-crushing
  • Cards: Extend functionality with plugins, for when the base features aren't quite enough

Quick Start

# Install (the beginning of a beautiful friendship)
cargo install pocket-cli

# Save a snippet (future you will thank present you)
pocket add file.js

# Find a snippet (with eerily human-like understanding)
pocket search "that thing with the loop"

# Use a snippet (the payoff moment)
pocket insert ID file.js

Documentation

For more detailed information, check out the documentation, which we've actually taken the time to write properly:

Issues and Support

If you encounter any issues or have questions, please create an issue on GitHub. Be sure to include details about your environment and the steps to reproduce the problem. The more specific you are, the faster we can help—vague bug reports are the digital equivalent of "it hurts when I do something."

Version

Current version: v-pocket-R3B1-nCR2

I use a versioning system with letter-based releases, because apparently semver was too mainstream. For more information, see my versioning philosophy.

GitHub stars Crates.io Downloads GitHub issues

License

MIT - Which means you can do pretty much whatever you want with this code, as long as you keep the copyright notice. Freedom comes with surprisingly little fine print sometimes.

Dependencies

~15–44MB
~675K SLoC