Configuration
ReArch uses a configuration file at the root of your project to control behavior, integrations, and deployment settings.
Configuration File
Section titled “Configuration File”The main configuration file is rearch.config.mjs located in your project root.
import { defineConfig } from '@rearch/core';
export default defineConfig({ project: { name: 'my-project', version: '1.0.0', }, agents: { maxConcurrency: 5, timeout: 30000, retries: 3, }, pipelines: { batchSize: 100, parallelism: 4, }, integrations: { github: { enabled: true, autoSync: true, }, },});Configuration Options
Section titled “Configuration Options”Project Settings
Section titled “Project Settings”| Option | Type | Default | Description |
|---|---|---|---|
project.name | string | package.json name | The project name |
project.version | string | "0.0.1" | Project version |
project.description | string | "" | Brief project description |
Agent Settings
Section titled “Agent Settings”| Option | Type | Default | Description |
|---|---|---|---|
agents.maxConcurrency | number | 5 | Max concurrent agent executions |
agents.timeout | number | 30000 | Timeout in ms for agent operations |
agents.retries | number | 3 | Number of retry attempts on failure |
agents.logLevel | string | "info" | Logging level: debug, info, warn, error |
Pipeline Settings
Section titled “Pipeline Settings”| Option | Type | Default | Description |
|---|---|---|---|
pipelines.batchSize | number | 100 | Items per batch |
pipelines.parallelism | number | 4 | Parallel pipeline workers |
pipelines.retryPolicy | string | "exponential" | Retry policy: fixed, exponential, none |
pipelines.deadLetterQueue | boolean | true | Enable dead letter queue for failed items |
Integration Settings
Section titled “Integration Settings”| Option | Type | Default | Description |
|---|---|---|---|
integrations.github.enabled | boolean | false | Enable GitHub integration |
integrations.github.autoSync | boolean | false | Auto-sync changes to GitHub |
integrations.slack.enabled | boolean | false | Enable Slack notifications |
integrations.slack.webhook | string | "" | Slack webhook URL |
Environment-Specific Configuration
Section titled “Environment-Specific Configuration”You can create environment-specific overrides:
rearch.config.mjs # Base configurationrearch.config.dev.mjs # Development overridesrearch.config.staging.mjs # Staging overridesrearch.config.prod.mjs # Production overridesReArch automatically merges the environment config with the base config:
# Uses rearch.config.mjs + rearch.config.staging.mjsREARCH_ENV=staging bun run startTypeScript Support
Section titled “TypeScript Support”For full type checking in your configuration file, use the defineConfig helper:
import { defineConfig } from '@rearch/core';import type { ReArchConfig } from '@rearch/core';
const config: ReArchConfig = defineConfig({ // Full IntelliSense support here});
export default config;Further Reading
Section titled “Further Reading”- Environment Variables Reference for runtime configuration
- CLI Reference for command-line options
- API Reference for programmatic configuration