Glimpse

module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT

README ΒΆ

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

✨ 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/cmd/gimpse@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

https://github.com/user-attachments/assets/48c9256d-5faf-45b8-b541-4ab7fbe473a3

πŸ›  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

Directories ΒΆ

Path Synopsis
* Glimpse - Interactive Code Search Tool * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: Main entry point and CLI interface for Glimpse interactive code search * License: MIT License
* Glimpse - Interactive Code Search Tool * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: Main entry point and CLI interface for Glimpse interactive code search * License: MIT License
internal
search
* Glimpse - Index Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: In-memory indexing system for fast code search * License: MIT License
* Glimpse - Index Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: In-memory indexing system for fast code search * License: MIT License
tui
* Glimpse - Editor Integration Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: Cross-platform editor integration for opening files at specific lines * License: MIT License
* Glimpse - Editor Integration Module * Author: Pratyush Yadav <pratyushyadav0106@gmail.com> * Description: Cross-platform editor integration for opening files at specific lines * License: MIT License

Jump to

Keyboard shortcuts

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