Configurable File Collection in AI CLI v1.5.0 - A New Way to Customize Your Experience
We're excited to announce AI CLI v1.5.0 with a powerful new feature: configurable file collection! This enhancement allows you to customize how files are collected for AI processing, making the tool more versatile for different programming languages and project types.
What's New?
The new collection configuration system lets you:
- Create custom configurations for different languages and project types
- Specify which file extensions to collect
- Define patterns for files to ignore
- Set a default configuration
- Switch between configurations via command line
Default Configuration
We've included a default "TypeScript" configuration that matches the original behavior:
- Extensions:
.ts
,.tsx
- Ignore patterns:
**/node_modules/**
,**/dist/**
,**/*.test.ts
,**/*.config.ts
,**/*.spec.ts
How to Use
Managing Configurations
Use the new config-collect
command to manage your collection configurations:
# List all configurations
ai config-collect list
# Create a new configuration
ai config-collect create
# Edit an existing configuration
ai config-collect edit <name>
# Delete a configuration
ai config-collect delete <name>
# Set a configuration as default
ai config-collect set-default <name>
Using Configurations
When collecting files, you can specify which configuration to use:
# Use default configuration
ai collect ./src
# Use a specific configuration
ai collect ./src -c python
Example: Python Configuration
Here's how you might set up a Python configuration:
# Create a new configuration
ai config-collect create
# Follow the prompts to set:
# - Name: Python
# - Extensions: .py, .pyx
# - Ignore patterns: **/venv/**, **/__pycache__/**, **/*.test.py
Configuration Structure
Each configuration includes:
name
: A descriptive name for the configurationextensions
: Array of file extensions to collectignorePatterns
: Array of glob patterns to ignoreisDefault
: Boolean indicating if this is the default configuration
Example configuration:
{
"collectionConfigs": {
"typescript": {
"name": "TypeScript",
"extensions": [".ts", ".tsx"],
"ignorePatterns": ["**/node_modules/**", "**/dist/**", "**/*.test.ts"],
"isDefault": true
},
"python": {
"name": "Python",
"extensions": [".py", ".pyx"],
"ignorePatterns": ["**/venv/**", "**/__pycache__/**", "**/*.test.py"],
"isDefault": false
}
}
}
Benefits
This new feature brings several benefits:
- Language Support: Easily add support for any programming language
- Project Customization: Create configurations specific to your project's needs
- Flexibility: Switch between configurations as needed
- Consistency: Maintain consistent file collection rules across your team
Getting Started
To get started with the new collection configuration feature:
- Check your current configurations:
ai config-collect list
- Create a new configuration:
ai config-collect create
- Try it out:
ai collect ./src -c <your-config-name>
Documentation
For more detailed information about collection configurations, check out our updated documentation:
We're excited to see how you use this new feature to customize your AI CLI experience! Let us know what configurations you create and how they help your workflow.