recollect

Crates.iorecollect
lib.rsrecollect
version1.0.0
created_at2025-10-12 16:56:17.682764+00
updated_at2025-10-12 16:56:17.682764+00
descriptionStorage, Management and Retrieval of things you'd like to remember (recollect).
homepagehttps://github.com/tristanpoland/recollect
repositoryhttps://github.com/tristanpoland/recollect
max_upload_size
id1879451
size96,439
Tristan Poland (Trident_For_U) (tristanpoland)

documentation

README

Recollect

Crates.io CI License: MIT

A powerful, fast, and beautiful CLI tool for managing your code snippets, commands, and notes. Built with Rust for maximum performance and reliability.

Features

  • Lightning Fast: Built in Rust for blazing-fast performance
  • Fuzzy Matching: Intelligent name matching to find recollections quickly
  • Beautiful Output: Colored, well-formatted terminal output
  • Categories: Organize recollections in subdirectories
  • Powerful Search: Regex-based search across all recollections
  • Editor Integration: Uses your $EDITOR for creating and editing
  • Cross-Platform: Works on Linux, macOS, and Windows
  • Git-Friendly: Plain text files stored in ~/.recollections
  • No Database: Everything is just text files you can sync, version, and backup

Installation

From Crates.io

cargo install recollect

From Source

git clone https://github.com/tristanpoland/recollect
cd recollect
cargo install --path .

Pre-built Binaries

Download pre-built binaries from the releases page.

Quick Start

# Create your first recollection
recollect new git

# List all recollections
recollect list

# Display a recollection
recollect git

# Search for content
recollect search "docker"

# Edit an existing recollection
recollect edit git

# Remove a recollection
recollect remove git

Usage

Creating Recollections

# Create a simple recollection
recollect new mycommand

# Create a recollection in a category
recollect new docker/compose

This opens your $EDITOR (or $VISUAL) to write the content. Save and close to create the recollection.

Listing Recollections

# List all recollections
recollect list

# List recollections in a specific category
recollect list docker

# Aliases
recollect ls

Displaying Recollections

# Show a recollection
recollect git

# Also works with the show command
recollect show git

# Alias
recollect cat git

Fuzzy Matching

If you don't remember the exact name, recollect will help you find it:

recollect do
# Output: Did you mean: 'docker/compose'?

If multiple matches are found, recollect shows suggestions:

recollect ra
# Output:
# Unable to find a recollection matching 'ra'
# You might have meant:
#   raid
#   rails
#   unicorn/rack

Searching

Search through all recollections with regex support:

# Basic search
recollect search "postgres"

# Case-insensitive search
recollect search -i "POSTGRES"

# Regex search
recollect search "git (push|pull)"

Editing Recollections

# Edit a recollection
recollect edit git

# Works with fuzzy matching
recollect edit gi

Appending Content

Add content to a recollection without opening an editor:

recollect append git "git stash pop"

Removing Recollections

# Remove with confirmation prompt
recollect remove git

# Force remove without confirmation
recollect remove git --force

# Alias
recollect rm git

Configuration

Editor

Recollect uses your system's default editor. Set it with:

export EDITOR=vim        # or nano, emacs, code, etc.
export VISUAL=vim        # fallback if EDITOR is not set

Storage Location

All recollections are stored as plain text files in:

~/.recollections/

Each recollection is saved with a .txt extension (hidden from the CLI for convenience).

Categories

Categories are simply subdirectories:

~/.recollections/
├── git.txt
├── docker/
│   ├── compose.txt
│   └── networking.txt
└── kubernetes/
    ├── pods.txt
    └── deployments.txt

Examples

Store Git Commands

recollect new git
# In your editor, add:
# Show current branch
git branch --show-current

# Create and switch to new branch
git checkout -b feature/new-feature

# Interactive rebase last 5 commits
git rebase -i HEAD~5

Docker Compose Snippets

recollect new docker/compose
# Add common docker-compose commands

Complex Command Sequences

recollect new deployment
# Store your deployment procedures:
# 1. Run tests
# 2. Build containers
# 3. Push to registry
# 4. Deploy to production

Advanced Features

Syncing Across Machines

Since recollections are just text files, you can sync them with any tool:

# Using Git
cd ~/.recollections
git init
git add .
git commit -m "Initial commit"
git remote add origin <your-repo>
git push -u origin main

# Using Dropbox, Syncthing, etc.
ln -s ~/Dropbox/recollections ~/.recollections

Command Aliases

Recollect includes convenient aliases:

  • listls
  • newadd
  • editmodify
  • removerm
  • searchfind
  • showcat
  • appendadd-line

Integration with Shell

Add functions to your .bashrc or .zshrc:

# Quick recollection lookup
alias r='recollect'

# List all recollections
alias rl='recollect list'

# Search recollections
alias rs='recollect search'

Building from Source

# Clone the repository
git clone https://github.com/tristanpoland/recollect
cd recollect

# Build
cargo build --release

# Run tests
cargo test

# Install locally
cargo install --path .

Performance

Recollect is built in Rust and optimized for speed:

  • Instant startup: No runtime overhead
  • Fast search: Efficient regex matching across all files
  • Minimal memory: Only loads what's needed
  • Optimized binary: Release builds are stripped and optimized

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Original Ruby implementation by Tyler Poland
  • Rewritten in Rust with modern features and improvements

Support


Made with ❤️ and Rust

Commit count: 0

cargo fmt