DevSafe / Docs
Docs CLI devsafe config

devsafe config

View or change settings stored in ~/.devsafe/config.json. Every setting has a sensible default, so you only need this command when you want to customize behavior.

Usage

terminal
$ devsafe config [get|set|list]

The config command has three subcommands:

All settings are stored locally in ~/.devsafe/config.json. Nothing is sent to any server. If you delete this file, DevSafe recreates it with defaults on the next run.

Config keys

Key Description Default
storage.endpoint The S3-compatible endpoint URL for your user-owned storage. This is where encrypted git bundles are uploaded. "" (must be set)
storage.bucket The bucket name within your storage endpoint. devsafe-backups
scan.root The root directory DevSafe scans to discover git repositories. DevSafe walks this directory tree and finds every .git folder automatically. ~/projects
backup.schedule How often DevSafe creates a full backup (in addition to change-triggered incremental backups). Accepts values like 1h, 6h, 24h. 6h
notifications.enabled Whether DevSafe sends notifications on backup events (failures, warnings, successful restores). true
notifications.channel Where to send notifications. Options: slack, discord, email, stdout. stdout

Getting a value

Use devsafe config get followed by the key name to read a single setting.

terminal
$ devsafe config get storage.endpoint
https://abc123.r2.cloudflarestorage.com

If the key has not been set, DevSafe prints the default value and labels it accordingly.

terminal
$ devsafe config get backup.schedule
6h (default)

Setting a value

Use devsafe config set followed by the key and the new value.

terminal
$ devsafe config set storage.endpoint https://abc123.r2.cloudflarestorage.com
 storage.endpoint set
terminal
$ devsafe config set scan.root ~/code
 scan.root set to ~/code
terminal
$ devsafe config set backup.schedule 1h
 backup.schedule set to 1h
Changes take effect immediately.

You do not need to restart the DevSafe watcher. The next backup cycle picks up the new configuration automatically.

Listing all settings

Use devsafe config list to see every config key, its current value, and whether it was explicitly set or is using the default.

terminal
$ devsafe config list
Key                      Value                                      Source
───────────────────────────────────────────────────────────────────────────
storage.endpoint         https://abc123.r2.cloudflarestorage.com     set
storage.bucket           devsafe-backups                            default
scan.root                ~/code                                     set
backup.schedule          1h                                         set
notifications.enabled    true                                       default
notifications.channel    stdout                                     default

Config file location

The config file lives at ~/.devsafe/config.json. You can edit it directly if you prefer, but using devsafe config set is safer because it validates values before writing.

~/.devsafe/config.json
{
  "storage": {
    "endpoint": "https://abc123.r2.cloudflarestorage.com",
    "bucket": "devsafe-backups"
  },
  "scan": {
    "root": "~/code"
  },
  "backup": {
    "schedule": "1h"
  },
  "notifications": {
    "enabled": true,
    "channel": "stdout"
  }
}
Your encryption keys are not stored here.

Config holds operational settings only. Encryption keys live in a separate keychain and are never written to plain JSON files. See Key custody for details.

Common examples

Point DevSafe at a different projects folder

terminal
$ devsafe config set scan.root /var/repos
 scan.root set to /var/repos
$ devsafe scan
 discovered 23 repositories in /var/repos

Switch to hourly full backups

terminal
$ devsafe config set backup.schedule 1h
 backup.schedule set to 1h

Send failure notifications to Slack

terminal
$ devsafe config set notifications.channel slack
 notifications.channel set to slack
# configure your Slack webhook URL with:
$ devsafe config set notifications.slack_webhook https://hooks.slack.com/services/T.../B.../xxx
 notifications.slack_webhook set