WorkForge v3.0 uses a centralized configuration system stored at ~/.workforge/config.json. This guide explains all available configuration options and how to customize WorkForge for your workflow.
~/.workforge/config.json
The configuration file is created automatically on first use with sensible defaults. You can edit it manually or use the configuration commands (coming in future versions).
{
"version": "3.0.0",
"preferences": {
"defaultBaseBranch": "main",
"autoDetectBaseBranch": true,
"autoDeleteBranch": false,
"skipConfirmations": false,
"packageManager": "auto",
"showExistingWorktrees": true
},
"backup": {
"enabled": true,
"maxBackupsPerProject": 10,
"autoCleanup": true
},
"sync": {
"createBackupBeforeSync": true,
"defaultSyncDirection": "ask"
},
"audit": {
"enabled": true,
"includeVariableValues": true,
"retentionDays": 90
},
"display": {
"colorEnabled": true,
"verboseOutput": false,
"showProgressIndicators": true
}
}Controls general WorkForge behavior.
- Type:
string - Default:
"main" - Description: Base branch used when
autoDetectBaseBranchisfalse. When auto-detection is on (the default), this is only a last-resort fallback for repositories where no primary branch can be determined at all.
Example:
"defaultBaseBranch": "develop"- Type:
boolean - Default:
true - Description: Detect the repository's primary branch from the remote when
-b/--baseis not passed. Set tofalseto always usedefaultBaseBranchinstead. An explicit-b/--basealways wins over both.
Example:
"autoDetectBaseBranch": false- Type:
boolean - Default:
false - Description: Automatically delete branch when closing a worktree
Example:
"autoDeleteBranch": true- Type:
boolean - Default:
false - Description: Skip all confirmation prompts (equivalent to always using
--yes)
Example:
"skipConfirmations": true- Type:
"auto" | "npm" | "pnpm" | "yarn" - Default:
"auto" - Description: Package manager to use for installing dependencies
Options:
"auto": Auto-detect from lock files"npm": Always use npm"pnpm": Always use pnpm"yarn": Always use yarn
Example:
"packageManager": "pnpm"- Type:
boolean - Default:
true - Description: Show existing worktrees when creating a new one
Example:
"showExistingWorktrees": falseControls backup creation and retention.
- Type:
boolean - Default:
true - Description: Enable/disable backup system entirely
Example:
"enabled": false- Type:
number - Default:
10 - Description: Maximum number of backups to keep per project
Example:
"maxBackupsPerProject": 5Behavior: When the limit is reached, oldest backups are automatically deleted.
- Type:
boolean - Default:
true - Description: Automatically delete old backups when limit is exceeded
Example:
"autoCleanup": falseNote: If disabled, backups will accumulate indefinitely.
Controls environment variable synchronization behavior.
- Type:
boolean - Default:
true - Description: Create backup before syncing .env files
Example:
"createBackupBeforeSync": false- Type:
"ask" | "to-main" | "to-worktree" - Default:
"ask" - Description: Default direction for bidirectional sync
Options:
"ask": Always prompt user to choose direction"to-main": Default to syncing worktree → main"to-worktree": Default to syncing main → worktree
Example:
"defaultSyncDirection": "to-main"Controls audit logging and history tracking.
- Type:
boolean - Default:
true - Description: Enable/disable audit logging
Example:
"enabled": falseLocation: Audit logs are stored at ~/.workforge/projects/<project-id>/
- Type:
boolean - Default:
true - Description: Include actual variable values in audit logs
Example:
"includeVariableValues": falseSecurity Note: Disable if your .env contains sensitive data and you want minimal audit logs.
- Type:
number - Default:
90 - Description: Number of days to retain audit logs
Example:
"retentionDays": 30Behavior: Logs older than this will be automatically cleaned up.
Controls visual output and user interface.
- Type:
boolean - Default:
true - Description: Enable colored terminal output
Example:
"colorEnabled": falseUse Case: Disable for CI/CD environments or terminals without color support.
- Type:
boolean - Default:
false - Description: Show detailed debug information
Example:
"verboseOutput": trueUse Case: Enable for troubleshooting or understanding internal operations.
- Type:
boolean - Default:
true - Description: Show animated progress spinners
Example:
"showProgressIndicators": falseUse Case: Disable for CI/CD or when output is logged to files.
{
"version": "3.0.0",
"preferences": {
"skipConfirmations": true,
"showExistingWorktrees": false
},
"backup": {
"enabled": false
},
"display": {
"colorEnabled": false,
"verboseOutput": true,
"showProgressIndicators": false
}
}{
"version": "3.0.0",
"preferences": {
"autoDeleteBranch": false,
"skipConfirmations": false
},
"backup": {
"enabled": true,
"maxBackupsPerProject": 20,
"autoCleanup": true
},
"sync": {
"createBackupBeforeSync": true
},
"audit": {
"enabled": true,
"includeVariableValues": true,
"retentionDays": 180
}
}{
"version": "3.0.0",
"preferences": {
"autoDeleteBranch": true,
"skipConfirmations": true,
"showExistingWorktrees": false
},
"backup": {
"enabled": true,
"maxBackupsPerProject": 3
},
"audit": {
"enabled": true,
"includeVariableValues": false,
"retentionDays": 30
}
}~/.workforge/config.json
~/.workforge/projects/<project-id>/.meta.json
~/.workforge/projects/<project-id>/audit.log
~/.workforge/projects/<project-id>/sync-history.json
~/.workforge/backups/<project-id>/.env.backup.YYYY-MM-DD_HH-mm-ss
Projects are identified by an 8-character SHA-256 hash of their Git remote URL:
Remote URL: git@github.com:user/repo.git
Project ID: a1b2c3d4
This ensures:
- Unique identification across all repositories
- Consistent ID regardless of local path
- Separation of metadata and backups per project
Always keep backup.enabled: true for safety. Backups have saved countless developers from accidental data loss.
- Solo developers: 10 backups, 90 days retention
- Small teams: 15 backups, 120 days retention
- Large teams: 20 backups, 180 days retention
If your .env files contain sensitive secrets:
"audit": {
"includeVariableValues": false
}For automated environments:
"preferences": {
"skipConfirmations": true
},
"display": {
"colorEnabled": false,
"showProgressIndicators": false
}- Check file exists:
ls -la ~/.workforge/config.json - Check JSON syntax:
cat ~/.workforge/config.json | python -m json.tool - Check permissions:
chmod 644 ~/.workforge/config.json
Delete the configuration file and it will be recreated:
rm ~/.workforge/config.json
workforge create -t test -n config-testThe configuration is validated on every command. Invalid values will show an error message.