Skip to content

Glimpse is a blazing-fast interactive code search tool with a sleek TUI and smart filtering for efficient navigation.

License

Notifications You must be signed in to change notification settings

PixelKnightDev/Glimpse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Glimpse - Interactive Code Search

A lightning-fast, beautiful terminal-based code search tool with real-time results and instant editor integration.

Screenshot 2025-07-24 at 9 07 17β€―PM

✨ Features

  • πŸš€ Real-time Search - Results update as you type

  • 🎨 Beautiful TUI - Modern, colorful interface with split-pane layout

  • ⚑ Lightning Fast - Optimized search with smart file filtering

  • 🎯 Instant Editor Integration - Press Enter to open files in VS Code, Vim, or your preferred editor

  • πŸ“± Responsive Design - Clean, compact interface that works in any terminal size

  • πŸ”§ Smart Filtering - Automatically skips binary files and build directories

  • ⌨️ Vim-like Navigation - Use ctrl+j/ctrl+k or arrow keys for navigation

  • πŸ”€ Case Toggle - Ctrl+I to switch between case-sensitive and case-insensitive search

  • 🧹 Auto-cleanup - Clears terminal after use for a clean workspace

    heavily inspired by https://github.com/nvim-telescope/telescope.nvim

🎯 Why Glimpse?

Traditional tools like grep and find are powerful but:

  • ❌ Results are static and hard to navigate
  • ❌ No preview of file contents
  • ❌ Require complex command syntax
  • ❌ Don't integrate with modern editors

Glimpse solves this with:

  • βœ… Interactive, real-time search
  • βœ… File preview with syntax context
  • βœ… One-key editor opening
  • βœ… Beautiful, intuitive interface

πŸš€ Installation

Prerequisites

  • Go 1.21 or later

Install from source

git clone https://github.com/pixelknightdev/glimpse.git
cd glimpse
go build -o glimpse cmd/main.go
cp glimpse $(go env GOPATH)/bin/

Install directly

go install github.com/pixelknightdev/glimpse@latest

πŸ“– Usage

Interactive Mode (Default)

# Launch interactive search
glimpse

# Then:
# - Type to search in real-time
# - Use ↑/↓ or ctrl+j/ctrl+k to navigate results
# - Press Enter to open file in editor
# - Press ctrl+c to quit

CLI Mode

# Traditional grep-like output
glimpse --cli "search term"

# Case-insensitive search
glimpse --cli -i "search term"

⌨️ Keyboard Controls

Key Action
Type Search in real-time
↑/↓ or ctrl+j/ctrl+k Navigate through results
Enter Open selected file in editor
Ctrl+I Toggle case sensitivity
Ctrl+C Quit

🎨 Video demo

Screen.Recording.2025-07-25.at.2.42.34.PM.mp4

πŸ›  Technical Details

Architecture

glimpse/
β”œβ”€β”€ cmd/main.go              # CLI interface and mode routing
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ search/             # Core search engine
β”‚   β”‚   └── search.go      # File traversal and pattern matching
β”‚   └── tui/               # Terminal user interface
β”‚       β”œβ”€β”€ model.go       # Bubbletea TUI implementation
β”‚       └── editor.go      # Cross-platform editor integration
β”œβ”€β”€ go.mod                 # Dependencies
└── README.md

Performance Optimizations

  • Concurrent file processing with goroutines
  • Smart binary file detection by extension and content
  • Result limiting to prevent memory issues
  • Directory exclusion for common build/cache folders
  • Early termination when sufficient results found

Supported Editors

  • VS Code (code command)
  • Vim/Neovim
  • System default editor
  • Cross-platform support (macOS, Linux, Windows)

🎯 Use Cases

  • πŸ” Code exploration - Quickly find function definitions, imports, or patterns
  • πŸ› Debugging - Locate error messages, variable usages, or specific logic
  • πŸ“š Learning codebases - Navigate unfamiliar projects with ease
  • πŸ”§ Refactoring - Find all instances of code that needs updating
  • πŸ“– Documentation - Search for comments, TODOs, or documentation strings

🀝 Contributing

We welcome contributions! Here are some ways to help:

  1. πŸ› Bug Reports - Found an issue? Open a GitHub issue
  2. πŸ’‘ Feature Requests - Have an idea? Let's discuss it
  3. πŸ›  Code Contributions - Submit a pull request
  4. πŸ“– Documentation - Help improve our docs
  5. 🌟 Spread the word - Star the repo and share with others

Development Setup

git clone https://github.com/pixelknightdev/glimpse.git
cd glimpse
go mod tidy
go run cmd/main.go

πŸ“‹ Roadmap

  • πŸ“¦ Package managers - Homebrew, apt, chocolatey
  • 🎨 Themes - Customizable color schemes
  • πŸ”§ Config files - User preferences and settings
  • πŸ“Š Regex support - Advanced pattern matching
  • πŸ“ File filtering - Include/exclude by file type
  • πŸ”— Git integration - Search only modified files
  • πŸ’Ύ Search history - Remember recent searches
  • πŸš€ Fuzzy search - More flexible matching

πŸ“Š Comparison

Tool Real-time Interactive Editor Integration Preview Performance
Glimpse βœ… βœ… βœ… βœ… ⚑
grep ❌ ❌ ❌ ❌ ⚑
ripgrep ❌ ❌ ❌ ❌ ⚑⚑
fzf ❌ βœ… ⚠️ ❌ ⚑
VS Code Search ❌ βœ… βœ… βœ… 🐌

πŸ™ Acknowledgments

Built with these amazing tools:

πŸ“„ License

MIT License - see LICENSE file for details.

🌟 Star History

Star History Chart


⭐ Star us on GitHub β€’ πŸ› Report Issues β€’ πŸ’‘ Request Features

Made with ❀️ by developers, for developers

About

Glimpse is a blazing-fast interactive code search tool with a sleek TUI and smart filtering for efficient navigation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages