contextfind

module
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2025 License: MIT

README

ContextFind

A CLI tool for selecting files with fzf and outputting their contents. Includes context management for saving and reusing file selections.

cf demo

Prerequisites

  • Go 1.24+ installed
  • fzf (install via brew install fzf on macOS)
  • markitdown for binary file conversion
  • bat (optional, for syntax highlighting in preview - install via brew install bat on macOS)

Installation

Install directly via Go:

go install github.com/nuuner/contextfind/cmd/cf@latest

Or clone and build locally:

git clone https://github.com/nuuner/contextfind.git
cd contextfind
go build -o cf ./cmd/cf

Usage

Basic File Selection
cf [directory]         # Select files from current or specified directory, automatically saves as last selection
cf | pbcopy            # Copy output to clipboard
Last Selection
cf last                # Output files from the last selection
cf save-last [name]    # Save the last selection as a named context (prompts if no name provided)
Context Management
cf save [name]         # Save current file selection as named context (prompts if no name provided)
cf from [name]         # Load files from saved context
cf update [name]       # Update existing context with new files
cf delete [name]       # Delete saved contexts

If no name is provided for commands like from, update, or delete, fzf will open for interactive selection. Context configurations are stored in .contextfind.toml files.

Directories

Path Synopsis
cmd
cf command
internal
fzf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL