Skip to main content

Natural language file finder for the terminal

Project description

askfind hero banner

Find files using plain English. Stop fighting with complex find syntax.

Python Version License: MIT Tests & Linting

askfind demo

The fastest way to search your codebase without breaking your flow.


Why askfind?

We've all been there. You just want to find a specific file, but instead, you end up Googling "how to find files modified in the last 7 days excluding test directories."

The old way:

find . -type f -name "*.py" -mtime -7 -not -path "*/vendor/*" -exec grep -l "TODO" {} +

The askfind way:

askfind "python files modified this week containing TODO excluding vendor"

Under the hood, askfind uses an LLM to instantly translate your natural language query into an optimized, highly efficient file system traversal plan. It's smart, fast, and incredibly intuitive.

How it works

✨ Core Benefits

  • 🗣️ Zero Learning Curve: If you can type it in English, you can find it. No more regex cheat sheets.
  • Lightning Fast Execution: askfind intelligently applies cheap filters (like file extensions and paths) before expensive I/O operations (like reading file contents), minimizing search time.
  • 🎯 Semantic Re-ranking: Results aren't just listed; they're optionally re-ranked by the LLM so the most relevant files appear exactly where you look first.
  • 🔒 Privacy & Security First: Your API keys are locked securely in your OS keychain. Only file paths and your query are sent to the LLM—your file contents stay local.
  • 🔌 100% Offline Capable: Working on a plane? No problem. Use --offline to instantly skip the LLM and rely on our fast local heuristic parser.
  • 💻 Interactive REPL: Use askfind -i for an interactive terminal session where you can preview, open, and copy files directly.
Interactive Mode Demo

🚀 Quick Start

1. Install

Make sure you have Python 3.12+ installed.

Recommended for end users: install from PyPI with pipx

Once askfind is published to PyPI, install it in an isolated tool environment:

pipx install askfind
askfind --help

If pipx is installed but askfind is not found on your PATH, run:

pipx ensurepath

Alternative: install from PyPI with uv tool

If you use uv, you can install the CLI without manually activating a virtual environment:

uv tool install askfind
askfind --help

If uv warns that its tool bin directory is not on your PATH, run:

uv tool update-shell

Development or unreleased source install

If you are working directly from this repository before a PyPI release is available:

git clone https://github.com/wgsim/natural_language_base_file_finder_in_terminal.git
cd natural_language_base_file_finder_in_terminal
pip install -e ".[dev]"

2. Configure (One-time setup)

Store your preferred LLM provider's API key (e.g., OpenRouter, OpenAI) securely in your system keychain:

askfind config set-key
# Paste your API key when prompted

3. Find!

# Basic searches
askfind "large javascript files"
askfind "config files in src excluding tests"

# Combine multiple constraints naturally
askfind "small python files in src modified today containing async"

🛠️ Advanced Usage

askfind is packed with power-user features:

# Get detailed file info (size, date)
askfind "python files" --verbose

# Output JSON for use in other scripts
askfind "python files" --json

# Limit results and parallelize traversal
askfind "python files" --max 10 --workers 8

# Create a permanent index for massive repositories to speed up future queries
askfind index build --root .

Check out our Documentation for more details on caching, index management, and configuration.

⚙️ Configuration

askfind is highly customizable via ~/.config/askfind/config.toml:

askfind config set model "gpt-4o-mini"
askfind config set max_results 100
askfind config set parallel_workers 4

Want to use a local LLM? Point it to your Ollama server:

askfind config set base_url "http://localhost:11434/v1"
askfind config set model "llama3"

📦 Packaging Notes

  • End-user installation should target PyPI via pipx install askfind as the primary path.
  • uv tool install askfind is a supported alternative for users already on uv.
  • The source install flow (pip install -e ".[dev]") is intended for contributors and local development, not for general end users.

🤝 Contributing

We welcome contributions! Please see our Contributing Guide to get started.

  1. Fork the repository
  2. Create a feature branch
  3. Run tests with pytest
  4. Submit a Pull Request

📄 License

MIT License - see the LICENSE file for details.


Suggested GitHub Topics: cli, terminal, search, file-search, llm, ai-tools, productivity, python, developer-tools

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

askfind-0.1.21.tar.gz (98.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

askfind-0.1.21-py3-none-any.whl (58.5 kB view details)

Uploaded Python 3

File details

Details for the file askfind-0.1.21.tar.gz.

File metadata

  • Download URL: askfind-0.1.21.tar.gz
  • Upload date:
  • Size: 98.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for askfind-0.1.21.tar.gz
Algorithm Hash digest
SHA256 c7ec64ba07ba9f23820f23c500fc526554019023a704a620bf404998fb9d5096
MD5 531bce03c341a29e374085817e8a4e99
BLAKE2b-256 76aba10bf9f006e961124d638a0f1e27b1c192c2d07f93e2fb12f91822583d09

See more details on using hashes here.

File details

Details for the file askfind-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: askfind-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 58.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for askfind-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 80bd4a6aa38be486c9cf413ba54145066d72be71c73ac6b25cd9e70898b82964
MD5 1771992fc000583a49ec0e6af48cf264
BLAKE2b-256 c920d4bdade01fccbabe66cc765e9a8bbf4b7ebc183702de8e0da539e9a6c60e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page