Configuration
Configure the GitScrum CLI with global settings, project-specific .gitscrum.yml files, and environment variables for CI/CD.
Open Source — GitScrum CLI is open source under the MIT license. Available on GitHub and all major package managers. Built for developers — Tasks, timers, sprints, and analytics in your terminal. Git-aware. CI/CD ready.
The CLI uses a layered configuration system. Each layer overrides the previous:
- Global config (
~/.gitscrum/config.yml) — User-wide defaults - Project config (
.gitscrum.yml) — Repository-specific settings - Environment variables — CI/CD overrides
- Command-line flags — Per-command overrides
Global Configuration
Set user-wide defaults with gitscrum config set:
gitscrum config set workspace my-company
gitscrum config set project backend-apiView current configuration:
gitscrum configWorkspace: my-company
Project: backend-api
API URL: https://api.gitscrum.comConfiguration is stored in ~/.gitscrum/config.yml:
workspace: my-company
project: backend-apiProject Configuration (.gitscrum.yml)
Create a .gitscrum.yml in your repository root to share settings with your team:
gitscrum init -w my-company -p backend-apiFull Configuration Reference
# GitScrum CLI Project Configuration
# Commit this file to share settings with your team
version: "1"
# Required: Workspace and project association
workspace: my-company
project: backend-api
# Branch naming conventions
branch:
# Prefix for new branches: feature, bugfix, hotfix, release
default_prefix: feature
# Include task title in branch name
include_title: true
# Maximum branch name length
max_length: 60
# Custom format: {prefix}, {code}, {title}
format: "{prefix}/{code}-{title}"
# Timer configuration
timer:
# Auto-start timer when switching to task branch
auto_start: false
# Auto-stop timer when switching away from task branch
auto_stop: false
# Round time entries to nearest interval (minutes)
round_to: 15
# Minimum duration to log (minutes)
min_duration: 5
# Remind to stop timer after inactivity (minutes)
reminder_after: 120
# Git hooks integration
hooks:
# Prepend task code to commit messages
prepend_task_code: true
# Commit message format (first %s = code, second %s = message)
commit_format: "[%s] %s"
# Validate task code exists before commit
validate_task: false
# Block commits without task code in branch name
require_task_branch: false
# CI/CD automation rules
automation:
# Update task status when PR is opened
on_pr_open: in review
# Update task status when PR is merged
on_pr_merge: done
# Link PRs to tasks based on branch name
link_pr_to_task: true
# Default values for new tasks
defaults:
type: task
effort: 0
priority: mediumMinimal Configuration
Only workspace and project are required:
version: "1"
workspace: my-company
project: backend-apiEnvironment Variables
Override configuration with environment variables:
| Variable | Description |
|---|---|
GITSCRUMACCESSTOKEN | OAuth access token (for CI/CD) |
GITSCRUM_WORKSPACE | Override default workspace |
GITSCRUM_PROJECT | Override default project |
GITSCRUMAPIURL | Custom API URL (enterprise) |
Example: CI/CD Pipeline
export GITSCRUM_ACCESS_TOKEN="your-oauth-access-token"
export GITSCRUM_WORKSPACE="my-company"
export GITSCRUM_PROJECT="backend-api"
gitscrum tasks update GS-1234 --status "deployed"Priority Order
- Command-line flags (highest)
- Environment variables
- Project configuration (
.gitscrum.yml) - Global configuration (
~/.gitscrum/config.yml) - Built-in defaults (lowest)
Branch Naming
Configure how gitscrum tasks branch creates branch names:
branch:
default_prefix: feature
include_title: true
max_length: 60
format: "{prefix}/{code}-{title}"Examples
| Task | Config | Branch Name |
|---|---|---|
| GS-1234 "Implement OAuth" | include_title: true | feature/GS-1234-implement-oauth |
| GS-1234 "Implement OAuth" | include_title: false | feature/GS-1234 |
| GS-1234 "Implement OAuth" | prefix: bugfix | bugfix/GS-1234-implement-oauth |
Timer Configuration
Fine-tune time tracking behavior:
timer:
auto_start: true # Start timer on task branch checkout
auto_stop: true # Stop timer on branch switch
round_to: 15 # Round to nearest 15 minutes
min_duration: 5 # Ignore entries under 5 minutes
reminder_after: 120 # Notify after 2 hours of inactivityRounding
When round_to: 15:
- 7 minutes → 15 minutes
- 23 minutes → 30 minutes
- 38 minutes → 45 minutes
Git Hooks
Enable automatic task code prepending to commit messages:
hooks:
prepend_task_code: true
commit_format: "[%s] %s"Before:
git commit -m "Fix null pointer exception"After:
[GS-1234] Fix null pointer exceptionSetup
Install hooks in your repo:
gitscrum hooks installThis creates hooks in .git/hooks/ that integrate with your configuration.
Validation
Validate your configuration:
gitscrum config validateChecks:
- YAML syntax
- Required fields present
- Valid workspace/project references
- Hook configuration
Configuration Files Location
| Platform | Global Config | Token Storage |
|---|---|---|
| Linux/macOS | ~/.gitscrum/config.yml | ~/.gitscrum/token.json |
| Windows | %USERPROFILE%\.gitscrum\config.yml | %USERPROFILE%\.gitscrum\token.json |
File permissions are set to 0600 (owner read/write only) for security.