Finder is a lightweight command-line tool written in Go to locate projects and files based on predefined folder/file structure templates. It ships with 370+ built-in templates covering a huge range of technologies, frameworks, and services — and you can add your own without recompiling.
Current version: 0.3.17
- Template-based search — find projects by folder/file structure using JSON5 templates (370+ built-in).
- Custom templates — drop
.json5files into~/.finder/templates/or./.finder/templates/and they are loaded automatically. User templates can override built-in ones. - Regex support — use regular expressions in template patterns for advanced matching.
- Async search — searches all drives (Windows) or root
/(Linux/macOS) in parallel for maximum speed. - Caching — create and reuse a cache for significantly faster repeat searches.
- JSON output — pipe results into other tools with
--json. - Tag search — browse templates by tag (
-t <tag>). - Binary search — find executables in your
$PATH(-b). - File size & checksum validation — templates can require minimum/maximum file sizes and SHA-256/SHA-512 checksums.
- Command validation — templates can run a shell command after matching and filter by exit code.
- Web UI (
findergen) — a built-in HTTP server for browsing, creating, and editing templates, viewing the cache, and more. - Cross-platform — works on Windows, Linux, and macOS.
- Go 1.18 or newer
The repository contains several binaries:
| Binary | Description |
|---|---|
finder |
Main CLI — search for projects and files using templates |
findergen |
HTTP server & web UI for template management, cache viewer, config editor |
csf |
Build helper — compile scripts, go install with CGO, git repo pack/restore |
tester |
Template test tool — validates template files |
go build ./cmd/finderOr install directly (Go 1.18+):
go install github.com/shadowdara/finder/cmd/finder@latestThe produced binary is finder (on Windows finder.exe).
# Windows
build.bat
# Linux / macOS
go build ./cmd/finder
go build ./cmd/findergen
go build ./cmd/testerOr using make:
make # debug build
make release # release build with stripped symbols
make install # build release + copy to /usr/local/binfinder <template-name>Find Git repositories:
finder git| Command | Aliases | Description |
|---|---|---|
finder <template> |
Search for projects matching a template | |
finder check |
Validate all built-in and custom templates | |
finder list |
ls |
List all available templates |
finder tags |
tag |
Show all tags in the console |
finder -t <tag> |
Search for templates by tag | |
finder -b |
Search for executables in your $PATH |
|
finder cp |
Print the path to the global config file | |
finder version |
-v, v |
Print the current version |
finder template <name> |
tpl |
Search using an explicit template name |
| Flag | Aliases | Description |
|---|---|---|
--json |
-j |
Output results as JSON |
--verbose |
-vv |
Enable verbose output |
| Flag | Aliases | Description |
|---|---|---|
--cache |
-c |
Use the existing cache instead of searching |
--create-cache |
-cc |
Create a new cache |
--create-cache-db |
-ccd |
Create a Git database from cache data |
# Find all React projects
finder react
# Find with JSON output
finder --json react
# Create a cache for faster repeat searches
finder --create-cache git
# Use the cache
finder --cache git
# Find templates tagged with "python"
finder -t python
# List all templates
finder list370+ templates are shipped in templates/ and compiled into
internal/templates/. They cover frameworks, languages, databases,
CI/CD systems, cloud services, AI/ML tools, and much more.
Templates are JSON5 files. A minimal template:
{
name: "*",
folders: [{ name: ".git" }],
}A full template with all supported fields:
{
min_version: "0.3.6",
description: "My Custom Project Type",
name: "*",
tags: ["node", "typescript"],
folders: [
{
name: "src",
folders: [],
files: ["index.ts"],
},
],
files: [
"package.json",
{
name: "*.ts",
existence: "required",
size: {
min: 1,
min_size_type: "KB",
},
},
],
command: "",
invert_command: false,
size: {
min: 10,
min_size_type: "KB",
},
}Place your own .json5 template files in:
| OS | Path |
|---|---|
| Windows | %USERPROFILE%\.finder\templates\ |
| Linux | ~/.finder/templates/ |
| macOS | ~/.finder/templates/ |
Or in the project-local directory:
./.finder/templates/
User templates take precedence over built-in templates with the
same name. See CUSTOM_TEMPLATES.md for the
full guide.
Since v0.3.17, every name pattern in a template — the top-level
name, every file name, and every folder name (including nested
folders) — is resolved by a 3-tier matching strategy:
| Priority | Method | Applies when |
|---|---|---|
| 1 | Exact string equality | pattern equals the name verbatim |
| 2 | Go regex (regexp.MatchString) |
pattern compiles as a valid regex (RE2) |
| 3 | Glob (path.Match) |
pattern is not a valid regex (e.g. *.ts) |
This means:
"src"→ exact match"^project-[0-9]+$"→ valid regex, matchesproject-123,project-42, …"*.ts"→ not a valid regex → glob fallback, matches any.tsfile"^(main|app|server)\.py$"→ valid regex, matches exactlymain.py,app.py, orserver.py
Regex patterns work in all name fields:
// top-level name: match folder names like project-42, project-99
{
name: "^project-[0-9]+$",
min_version: "0.3.17",
files: [
{
// file name: match exactly main.py, app.py, or server.py
name: "^(main|app|server)\\.py$",
existence: "required",
},
],
folders: [
{
// folder name: match src, lib, or pkg
name: "^(src|lib|pkg)$",
},
],
}Note: Go regex is RE2 — no backreferences and no lookahead/lookbehind. If your pattern uses unsupported syntax, it fails to compile and falls back to glob matching.
If your template relies on regex patterns, set "min_version": "0.3.17"
to indicate the minimum Finder version required.
Since v0.3.15, finder has a global config file at
~/.finder/config.json5. If the file does not exist, defaults are
used:
{
port: 8080,
cache: false,
create_cache_db: false,
finder_instances: 8,
}| Key | Type | Default | Description |
|---|---|---|---|
port |
int | 13420 |
HTTP server port for findergen |
cache |
bool | false |
Enable cache by default |
create_cache_db |
bool | false |
Create a Git database from cache data |
finder_instances |
int | 8 |
Max parallel instances when creating cache |
For a visual config editor, visit https://shadowdara.github.io/finder/configeditor.
findergen starts a local HTTP server with a web interface for:
- Template Creator — create and edit JSON5 templates visually
- Template Viewer — browse all built-in and custom templates
- Config Editor — edit
config.json5through the browser - Cache Viewer — inspect cached search results
- Regex Creator — build and test regular expressions for templates
- Minecraft World Dashboard — view Minecraft worlds from the cache
# Start the web UI on the default port
./findergen
# Use a custom port
./findergen --port 3000
# Collect Minecraft worlds from cache
./findergen worldsfinder/
├── cmd/
│ ├── finder/ # Main CLI binary
│ ├── findergen/ # Web UI server binary
│ ├── csf/ # Build helper binary
│ └── tester/ # Template test binary
├── internal/
│ ├── bt/ # Build tools (script compiler, git repo)
│ ├── cache/ # Cache system & Git DB
│ ├── cli/ # CLI command handling
│ ├── config/ # Configuration loading
│ ├── finderversion/ # Version constants
│ ├── history/ # Search history
│ ├── loader/ # File loading utilities
│ ├── mcapp/ # Minecraft world data
│ ├── search/ # Core search logic & binary check
│ ├── structure/ # Folder/template structure parsing
│ └── templates/ # Compiled templates + loader
├── pub/
│ ├── argparser/ # Argument parsing library
│ ├── color/ # Terminal color utilities
│ ├── fsd/ # Filesystem directory utilities
│ ├── goansi/ # ANSI escape codes
│ ├── json5/ # JSON5 parser
│ └── version/ # Semantic version comparison
├── templates/ # Source JSON5 templates (370+)
└── finder-template-generator-ssg/ # Static site generator for docs
go test ./...go test -coverprofile=coverage ./...
go tool cover -html=coveragego build ./cmd/findergo run ./cmd/finder checkgo run ./cmd/finder list- Found a missing or inaccurate template? Please open an issue.
- Add new templates via PR. Keep them in JSON5 and provide a short description of what the template matches.
- Feel free to contribute code improvements or new features.
- Temporary templates via command-line arguments
- Template schema validation
- Improved search history
- Extended web UI features
See LICENSE.
Project: https://github.com/shadowdara/finder Website: https://shadowdara.github.io/finder
The Project fs-tools was more or less the prototype for finder.
(a Youtube Video)
