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

OptionDescriptionDefault
sourcesTemplate sources to scrape[]
excludeFiles to exclude["*.test.*"]
concurrencyNumber of parallel operations2

Analysis Options

OptionDescriptionDefault
featuresFeatures to analyze["all"]
metricsQuality metrics to evaluate["all"]
cacheEnable result cachingtrue
timeoutAnalysis timeout (ms)30000

Search Options

OptionDescriptionDefault
maxResultsMaximum search results10
minScoreMinimum match score0.5
presetsSearch presets

Environment Variables

Some configuration can be overridden with environment variables:

VariableDescription
SLOT_CONFIG_PATHCustom config file path
SLOT_GITHUB_TOKENGitHub API token
SLOT_CACHE_DIRCustom cache directory
SLOT_LOG_LEVELLogging 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.