Complete reference for .mediagit/config.toml. All sections are optional — MediaGit uses sensible defaults for any missing values.
<repo-root>/.mediagit/config.toml
[author]
name = "Alice Smith"
email = "alice@example.com"
[author]
name = "Alice Smith"
email = "alice@example.com"
[storage]
backend = "s3"
bucket = "my-media-bucket"
region = "us-east-1"
prefix = "repos/my-project"
encryption = true
[compression]
enabled = true
algorithm = "zstd"
level = 3
min_size = 1024
[performance]
max_concurrency = 8
buffer_size = 65536
[performance.cache]
enabled = true
cache_type = "memory"
max_size = 536870912 # 512 MB
ttl = 3600
[performance.timeouts]
request = 60
read = 30
write = 30
connection = 30
[observability]
log_level = "info"
log_format = "json"
[remotes.origin]
url = "http://media-server.example.com/my-project"
[protected_branches.main]
prevent_force_push = true
prevent_deletion = true
require_reviews = true
min_approvals = 1
Used when creating commits. Override with MEDIAGIT_AUTHOR_NAME / MEDIAGIT_AUTHOR_EMAIL env vars or --author CLI flag.
Key Type Default Description
namestring $USERDisplay name on commits
emailstring ""Email address on commits
The storage backend is selected with the backend key. All backend-specific fields are placed directly in [storage] alongside backend — there are no nested [storage.s3] or [storage.filesystem] subsections.
[storage]
backend = "filesystem"
base_path = "./data"
create_dirs = true
sync = false
file_permissions = "0644"
Key Type Default Description
backendstring "filesystem"Must be "filesystem"
base_pathstring "./data"Storage root directory
create_dirsbool trueAuto-create directories
syncbool falseSync writes to disk (slower, safer)
file_permissionsstring "0644"Octal file permission string
[storage]
backend = "s3"
bucket = "my-bucket"
region = "us-east-1"
prefix = ""
encryption = false
encryption_algorithm = "AES256"
# access_key_id and secret_access_key from env vars or IAM role
Key Type Default Description
backendstring — Must be "s3"
bucketstring — Required. S3 bucket name
regionstring — Required. AWS region
access_key_idstring env AWS access key (prefer env var)
secret_access_keystring env AWS secret key (prefer env var)
endpointstring — Custom endpoint for S3-compatible services
prefixstring ""Object key prefix
encryptionbool falseEnable server-side encryption
encryption_algorithmstring "AES256"SSE algorithm: AES256 or aws:kms
[storage]
backend = "azure"
account_name = "mystorageaccount"
container = "media-container"
prefix = ""
# account_key from env AZURE_STORAGE_KEY or use connection_string
Key Type Default Description
backendstring — Must be "azure"
account_namestring — Required. Storage account name
containerstring — Required. Blob container name
account_keystring env Storage account key (prefer env var)
connection_stringstring env Full connection string (alternative to account_name/key)
prefixstring ""Blob path prefix
[storage]
backend = "gcs"
bucket = "my-gcs-bucket"
project_id = "my-gcp-project"
prefix = ""
# credentials_path from GOOGLE_APPLICATION_CREDENTIALS env var
Key Type Default Description
backendstring — Must be "gcs"
bucketstring — Required. GCS bucket name
project_idstring — Required. GCP project ID
credentials_pathstring env Path to service account JSON key
prefixstring ""Object prefix
Note : MediaGit uses SmartCompressor which automatically selects the optimal algorithm and level per file type. The values in this section are written to config.toml by mediagit init for reference but are not read at runtime — compression behavior is determined entirely by file type, not these settings.
Key Type Default Description
enabledbool true(Informational) SmartCompressor is always active
algorithmstring "zstd"(Informational) Actual algorithm selected per file type
levelinteger 3(Informational) Actual level selected per file type
min_sizeinteger 1024(Informational) Not currently enforced
Automatic algorithm selection by file type (always active, cannot be overridden via config):
Already-compressed formats (JPEG, MP4, ZIP, docx, AI, PDF): stored as-is (none)
PSD, raw formats, 3D models: zstd at Best level (level 22)
Text, JSON, TOML: zstd at Default level (level 3)
ML checkpoints: zstd at Fast level (level 1)
Key Type Default Description
max_concurrencyinteger CPU count (min 4) Max parallel operations
buffer_sizeinteger 65536I/O buffer size in bytes (64 KB)
Key Type Default Description
enabledbool trueEnable in-memory object cache
cache_typestring "memory"Cache type ("memory")
max_sizeinteger 536870912Max cache size in bytes (512 MB)
ttlinteger 3600Cache entry TTL in seconds
compressionbool falseCompress cached objects
Key Type Default Description
min_connectionsinteger 1Minimum pool connections
max_connectionsinteger 10Maximum pool connections
timeoutinteger 30Connection timeout in seconds
idle_timeoutinteger 600Idle connection timeout in seconds
Key Type Default Description
requestinteger 60Total request timeout in seconds
readinteger 30Read timeout in seconds
writeinteger 30Write timeout in seconds
connectioninteger 30Connection timeout in seconds
Key Type Default Description
log_levelstring "info"Log level: "error", "warn", "info", "debug", "trace"
log_formatstring "json"Log format: "json" or "text"
tracing_enabledbool trueEnable distributed tracing
sample_ratefloat 0.1Trace sampling rate (0.0–1.0)
Override log_level with the RUST_LOG environment variable.
Key Type Default Description
enabledbool trueEnable Prometheus metrics
portinteger 9090Metrics HTTP server port
endpointstring "/metrics"Metrics endpoint path
intervalinteger 60Collection interval in seconds
[remotes.origin]
url = "http://media-server.example.com/my-project"
[remotes.backup]
url = "http://backup-server.example.com/my-project"
Key Type Default Description
urlstring — Required. Remote server URL
fetchstring urlFetch URL if different from url
pushstring urlPush URL if different from url
[branches.main]
remote = "origin"
merge = "refs/heads/main"
Set automatically by mediagit push -u origin main. Rarely edited manually.
[protected_branches.main]
prevent_force_push = true
prevent_deletion = true
require_reviews = false
min_approvals = 1
Key Type Default Description
prevent_force_pushbool trueBlock force pushes
prevent_deletionbool trueBlock branch deletion
require_reviewsbool falseRequire PR review before merge
min_approvalsinteger 1Minimum approvals required