Full-text, typo-tolerant local file indexer and search engine for developers
Features • Demo • Installation • Usage • Contributing • License
- 🔍 Full-text search across all your local files
- 🐞 Typo-tolerant search for forgiving queries
- 🚀 Fast indexing and searching powered by TypeSense
- 💻 Web-based user interface for easy access
- 🔢 Code syntax highlighting for various languages
- 📁 Support for multiple directory indexing
- 🔒 Local-only indexing for data privacy
- Node.js (v14 or later)
- Docker (for running TypeSense)
- hyperpolyglot : (Used to detect programming languages) Install with
cargo install hyperpolyglot
.
-
Clone the repository:
git clone https://github.com/mugendi/x-files-search.git cd x-files-search
-
Install dependencies:
npm install
-
Set up the environment:
cp .env.example .env
Edit the
.env
file and adjust the settings as needed. -
Set up TypeSense:
npm run setup
-
Build the project:
npm run build
-
Start the server:
npm run prod
-
Open your browser and navigate to
http://localhost:9877
(or the port you specified in.env
). -
Go to the 'Settings' page to add directories for indexing.
-
Click "Index Files" to start the indexing process.
-
Use the search bar on the home page to find your files!
The .env
file contains important configuration options:
# App configs
PORT=9877
ORIGIN=http://localhost:9877
# TypeSense configs
API_PORT=9876
API_KEY=myAmazingKey
BULK_DOC_COUNT=50
MAX_FILE_SIZE="1MB"
IGNORE_PATTERNS=**/node_modules/**,**/env/**,**/.env/**,**/venv**,**/.venv/**,**/yarn.*,**/npm.*,**/python*/site-packages/**
Adjust these settings to fit your needs and environment.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Commit your changes (
git commit -am 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- TypeSense for providing the powerful search engine
- hyperpolyglot for language detection
If you find this project useful, please consider giving it a ⭐️ on GitHub!