@imhardik16/quickopen-cli
v1.0.4
Published
Open any file by typing its name. Smart, fast, cross-platform CLI tool - 270K+ files in <100ms
Maintainers
Readme
QuickOpen
QuickOpen is a fast command-line utility that allows you to open any file on your computer in seconds directly from your terminal, without navigating through folder structures.
Quick Start • Features • Usage • Configuration • Troubleshooting • Contributing • License
Overview
The Problem
Locating and opening files requires navigating through multiple directory levels:
C:\Users\[YourName]\Documents\2024\Projects\Finance\Reports\report.pdfTraditional Approach: Click → Folder → Folder → Folder → File → Open
With QuickOpen:
qopen report.pdfThe file opens instantly from anywhere in your terminal.
Why QuickOpen?
- Faster than OS search - Optimized indexing for rapid file discovery
- Terminal integration - Works directly from your command line
- Fuzzy search - Handles typos intelligently (
reprt→report.pdf) - Instant search - No repeated indexing after initial scan
- Smart file opening - Automatically selects the appropriate application (code files open in VS Code, media files in default apps)
Features
- Lightning Fast Search - Scan once, then search results appear in milliseconds
- Universal File Support - Works with documents, media, code, archives, and any file type
- Fuzzy Search - Finds files even with typos in the filename
- Smart File Opening - Automatically selects the best application (code files open in a new VS Code window with folder context)
- Cross-Platform - Fully supported on Windows, macOS, and Linux
- Persistent Cache - No repeated file system scanning required
- Interactive CLI - Clean and intuitive command-line interface
- Minimal Dependencies - Fast performance with lightweight dependencies
- Custom Ignore Lists - Exclude specific folders from scanning
- Configurable Root Path - Set a default directory for scanning operations
Quick Start
Installation
From npm (Recommended):
npm install @imhardik16/quickopen-cliUsage from any terminal:
qopen report.pdf
qopen app.js
qopen photo.jpgFrom Source:
git clone https://github.com/imHardik1606/QuickOpen.git
cd QuickOpen
npm install
chmod +x bin/open.js # Linux and macOS only
npm run scanExample Workflow:
qopen report
Found 3 matches:
1. report.pdf
2. report_final.pdf
3. report_2024.pdf
Select file: 1
Opening report.pdf...Performance Metrics
| Metric | Value | | --------------- | -------------- | | Setup Time | ~2 minutes | | Initial Scan | 1 to 3 minutes | | Search Speed | <100ms | | Supported Types | 50+ | | Dependencies | 3 |
Usage Guide
File Search Commands
qopen report.pdf # Open a specific file
qopen app.js # Search for a file
qopen financial report 2024 # Multi-word searchFolder Operations
Open folders directly in VS Code or get their absolute paths:
qopen folder <folderName> # Open folder by name in VS Code
qopen cd <folderName> # Get absolute folder pathExamples:
qopen folder myproject # Opens myproject folder in VS Code
qopen cd src # Returns the full path to 'src'Notes:
- Searches for folders within the configured root directory
- If multiple folders match, displays an interactive menu for selection
qopen folderopens the selected folder directly in VS Codeqopen cdprints the path, which can be used in shell wrappers for navigation
Pro Tip: Shell Navigation with qopen cd
Add these functions to your shell profile to navigate instantly:
PowerShell ($PROFILE):
function qcd($name) {
$path = qopen cd $name
if (Test-Path $path) { cd $path }
}Bash/Zsh (.bashrc / .zshrc):
qcd() {
path=$(qopen cd "$1")
if [ -d "$path" ]; then cd "$path"; fi
}Cache and Scanning Commands
qopen scan # Initial file system scan
qopen rescan # Update the cache with new files
qopen cache-info # View cache statistics
qopen clear-cache # Reset the cache
qopen help # Show help menu
qopen -v # Show versionConfiguration
Root Path Configuration
Set a default scanning root directory:
qopen set-root <path> # Set default scanning root path
qopen get-root # Display current root pathExamples:
qopen set-root C:\Users\YourName\Projects # Windows
qopen set-root /home/username/projects # Linux/macOS
qopen get-root # View current setting
qopen scan # Scan from configured rootNotes:
- Configuration is persistent (stored in
~/.smart-file-opener/root-config.json) - Default scanning directory is your home directory
- Use
set-rootto customize the scanning directory - Explicit scan path takes precedence:
qopen scan /other/path - Root path must exist and be a valid directory
Ignore Folder Management
Exclude specific folders from scanning:
qopen ignore add <folderPath> # Add folder to ignore list
qopen ignore remove <folderPath> # Remove folder from ignore list
qopen ignore list # Display all ignored foldersExamples:
qopen ignore add Downloads # Ignore Downloads folder
qopen ignore add temp # Ignore temp folder
qopen ignore add .git # Ignore .git folder
qopen ignore list # View ignored folders
qopen ignore remove temp # Stop ignoring temp folderNotes:
- Configuration is persistent (stored in
~/.smart-file-opener/ignore-config.json) - Changes take effect on the next scan/rescan
- Duplicate entries are automatically prevented
- Built-in system folders (node_modules, .git, etc.) are always ignored
Default Settings
Default configuration is defined in src/utils/config.js:
const config = {
ignoreFolders: [
'**/node_modules/**', // NPM packages
'**/venv/**', // Python virtual environments
'**/AppData/**', // Windows application data
// ... and more
],
fuzzyThreshold: 0.3, // Search sensitivity threshold
maxResults: 15 // Maximum search results
};Platform Support
Cross-platform compatibility with automatic platform detection:
- Windows - Uses
startcommand - macOS - Uses
opencommand - Linux - Uses
xdg-opencommand
No additional configuration required.
Examples
qopen budget.xlsx # Opens in Excel
qopen photo.jpg # Opens in image viewer
qopen video.mp4 # Opens in media player
qopen app.js # Opens in VS Code with folder context
qopen reprt # Fuzzy search finds report.pdfTroubleshooting
Cache Not Found
Run the initial scan:
npm run scanNo Results Returned
Update the cache:
npm run rescanPermission Denied
Grant execution permissions (Linux/macOS):
chmod +x bin/open.jsTesting
Run the test suite using Jest:
npm testContributing
Contributions are welcome! Please follow these steps:
git clone https://github.com/imHardik1606/QuickOpen.git
cd QuickOpen
npm install
git checkout -b feature/your-feature
npm test
git push origin feature/your-featureRoadmap
- File preview before opening
- GUI application version
- VS Code extension
- Advanced search filters (by date, file type, size)
Support
If you find this project useful, please consider:
- Starring the repository
- Sharing it with others
- Contributing improvements or bug fixes
License
MIT License - See LICENSE file for details
Credits
This project utilizes the following libraries:
