Warning
This file could be not updated, but there json shema files in
.finder/shema available which will always be updated!
Finder now supports loading custom templates from the filesystem without requiring recompilation. You can add your own project detection templates easily!
Finder looks for custom templates in these directories (in order):
- User home directory:
~/.finder/templates/ - Local project directory:
./.finder/templates/
~/.finder/templates/
├── myproject.json5
├── custom_framework.json5
└── proprietary_tech.json5
# OR
./.finder/templates/
├── myproject.json5
└── company_standards.json5
Templates are JSON5 files that describe the folder structure and file patterns of a project type.
{
"min_version": "0.3.6",
"description": "My Custom Project Type",
"name": "*",
"folders": [
{
"name": "src",
"folders": [],
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"]
},
{
"name": "tests",
"folders": [],
"files": ["*.test.ts", "*.test.js"]
}
],
"files": [
"package.json",
"tsconfig.json",
"README.md"
]
}description(string) - Short description of the project typename(string) - Usually set to"*"(matches any name)folders(array) - Nested folder structure patternsfolders[].name- Folder name to look forfolders[].folders- Nested subfolders (recursive)folders[].files- File patterns to match (supports glob patterns like*.ts)
files(array) - Top-level files to match (glob patterns supported)
{
"description": "Our Company Monorepo Standard",
"name": "*",
"folders": [
{
"name": "packages",
"folders": [
{
"name": "*",
"folders": [],
"files": ["package.json"]
}
],
"files": []
},
{
"name": "scripts",
"folders": [],
"files": ["*.sh", "*.ps1"]
}
],
"files": [
"pnpm-workspace.yaml",
"root-package.json",
"turbo.json"
]
}Once you've created a template file, finder will automatically detect it!
finder listYou'll see output like:
Built-in Templates (370):
react
next
vue
...
Custom Templates (2):
myproject (from ~/.finder/templates/ or ./.finder/templates/)
monorepo (from ~/.finder/templates/ or ./.finder/templates/)
finder myprojectFinder will scan the current directory using your custom template!
finder checkThis validates both built-in and custom templates.
If you place a custom template with the same name as a built-in template, your custom version will take precedence.
For example, if you create ~/.finder/templates/react.json5, it will override the built-in React template.
-
Use glob patterns for flexible file matching:
*.ts- matches all TypeScript files*.{json,yaml}- matches JSON or YAML files*.test.{ts,js}- matches test files in TypeScript or JavaScript
-
Keep descriptions clear - They appear when running
finder check -
Test your template - Run
finder checkto validate the JSON5 syntax -
Name it meaningfully - The filename (without
.json5) becomes the template name -
Don't need nested folders? - Leave the
foldersarray empty:"folders": []
Check the built-in templates in /internal/templates/ for more examples:
- Simple project:
python.json5,go.json5 - Complex:
next.json5,spring-boot.json5 - Monorepo:
monorepo.json5,turborepo.json5(would be custom)
- Ensure the file ends with
.json5 - Check the file is in the right directory:
~/.finder/templates/or./.finder/templates/ - Verify JSON5 syntax with
finder check
- Review your folder and file patterns
- Make sure glob patterns are correct
- Test with
finder checkto see the description
Run finder help for more command options.
(new in 0.3.6)
Single Size Block
"size": {
"min": 1,
"min_size_type": "KB",
"max": 10,
"max_size_type": "GB",
}Template with the new Size Block
{
"description": "Go project with go.mod and minimum total size 10KB",
"name": "*",
"folders": [],
"files": [
{
"name": "go.mod",
"existence": "required"
},
{
"name": "*.go",
"existence": "required",
"size": {
"min": 1,
"min_size_type": "KB"
}
}
],
"command": "",
"invert_command": false,
"tags": ["go", "project"],
"size": {
"min": 10,
"min_size_type": "KB"
}
}