Configuration
Overview
Pipelex uses a TOML-based configuration system. The main configuration file pipelex.toml
must be located at the root of your project. You can create this file by running:
pipelex init-config
💡 Important Notes:
pipelex init-config
creates a template configuration file with sample settings. It does not include all possible configuration options - it's meant as a starting point.- Using
pipelex init-config --reset
will overwrite your existingpipelex.toml
file without warning. Make sure to backup your configuration before using this flag.
For a complete list of all possible configuration options, refer to the configuration group documentation below.
Configuration Structure
The configuration is organized into three main sections:
[pipelex]
- Core Pipelex settings[cogt]
- Cognitive tools and LLM settings[plugins]
- Plugin-specific configurations
Each section contains multiple subsections for specific features and functionalities.
Configuration Override System
Pipelex uses a sophisticated configuration override system that loads and merges configurations in a specific order. This allows for fine-grained control over settings in different environments and scenarios.
The exact loading sequence is:
- Base configuration from the installed Pipelex package (
pipelex.toml
) - Your project's base configuration (
pipelex.toml
in your project root) - Local overrides (
pipelex_local.toml
) - Environment-specific overrides (
pipelex_{environment}.toml
) - Example environments: dev, staging, prod -> based on the environment variable
ENV
in your .env file - Run mode overrides (
pipelex_{run_mode}.toml
) - Example run modes: normal, unit_test
- Super user overrides (
pipelex_super.toml
) (recommended to put in .gitignore)
Each subsequent configuration file in this sequence can override settings from the previous ones. This means:
- Settings in pipelex_local.toml
override the base configuration
- Environment-specific settings override local settings
- Run mode settings override environment settings
- Super user settings override all previous settings
Override File Naming
- Base config:
pipelex.toml
- Local overrides:
pipelex_local.toml
- Environment overrides:
pipelex_dev.toml
,pipelex_staging.toml
,pipelex_prod.toml
, etc. - Run mode overrides:
pipelex_normal.toml
,pipelex_unit_test.toml
, etc. - Super user overrides:
pipelex_super.toml
NB: The run_mode unit_test is used for testing purposes.
Best Practices for Overrides
- Use the base
pipelex.toml
for default settings - Use
pipelex_local.toml
for machine-specific settings - Use environment files for environment-specific settings (dev, staging, prod)
- Use run mode files for normal or unit_test configurations
- Use
pipelex_super.toml
sparingly, only for temporary overrides (add to .gitignore)
Best Practices
- Version Control: Include your base
pipelex.toml
in version control - Environment Overrides: Use environment-specific files for sensitive or environment-dependent settings
- Documentation: Comment any custom settings for team reference
- Validation: Run
pipelex validate
after making configuration changes - Gitignore: Add local and sensitive override files to
.gitignore