CLI Configuration
Slot's CLI tools can be configured to match your template management needs. This guide covers the available configuration options and how to customize the CLI behavior.
Note: The CLI tools are optional. You only need them if you want to customize your template index. The MCP server works out of the box with our curated template collection.
Configuration File
The CLI tools are configured through a slot.config.json
file in your project root. Here's a complete example:
{
"cli": {
"scraping": {
"sources": [
{
"type": "github",
"owner": "your-org",
"repo": "templates"
}
],
"exclude": [
"**/*.test.*",
"**/*.spec.*"
],
"concurrency": 4
},
"analysis": {
"features": ["all"],
"metrics": ["all"],
"cache": true,
"timeout": 30000
},
"search": {
"maxResults": 10,
"minScore": 0.5,
"presets": {
"react-prod": {
"tech": ["react", "typescript"],
"features": ["authentication", "testing"],
"min_quality": 4
}
}
}
}
}
Scraping Options
Option | Description | Default |
---|---|---|
sources | Template sources to scrape | [] |
exclude | Files to exclude | ["*.test.*"] |
concurrency | Number of parallel operations | 2 |
Analysis Options
Option | Description | Default |
---|---|---|
features | Features to analyze | ["all"] |
metrics | Quality metrics to evaluate | ["all"] |
cache | Enable result caching | true |
timeout | Analysis timeout (ms) | 30000 |
Search Options
Option | Description | Default |
---|---|---|
maxResults | Maximum search results | 10 |
minScore | Minimum match score | 0.5 |
presets | Search presets |
Environment Variables
Some configuration can be overridden with environment variables:
Variable | Description |
---|---|
SLOT_CONFIG_PATH | Custom config file path |
SLOT_GITHUB_TOKEN | GitHub API token |
SLOT_CACHE_DIR | Custom cache directory |
SLOT_LOG_LEVEL | Logging verbosity |
Configuration Tips
Performance
- Adjust concurrency based on system
- Enable caching for faster analysis
- Use specific feature/metric lists
- Exclude unnecessary files
Organization
- Group related templates in sources
- Create search presets for teams
- Document custom configurations
- Version control your config
Next Steps
Now that you've configured the CLI tools, learn how to scrape templates and add them to your index.