dvc-config
Configure DVC projects
TLDR
Get the name of the default remote
Set the project's default remote
Unset the project's default remote
Get the configuration value for a specified key for the current project
Set the configuration value for a key on a project level
Unset a project level configuration value for a given key
Set a local, global, or system level configuration value
SYNOPSIS
dvc config [name[=value]] [options...]
PARAMETERS
--cd
Change to directory before action
--del, --remove, -d, --unset
Remove config option
--edit
Edit config file with $EDITOR
--global, -G
Use global config (~/.dvc/config)
--help, -h
Show help message
--import
Import config from URL
--list, -L
List all config keys/values
--local, -l
Use local config (.dvc/config)
--output
Write config to file
--quiet, -q
Suppress non-error messages
--show-origin
Show origin file for each value
--system, -S
Use system config (/etc/xdg/dvc/config)
--verbose, -V
Enable verbose output
--workspace, -W
Use workspace config (.dvc/workspace/config)
DESCRIPTION
The dvc config command manages configuration settings for DVC (Data Version Control) projects, similar to git config. It allows reading, writing, listing, editing, importing, and removing config values across hierarchical scopes: workspace (.dvc/workspace/config), local (.dvc/config), global (~/.dvc/config), and system (/etc/xdg/dvc/config).
Priorities follow workspace > local > global > system, enabling project-specific overrides. Common uses include setting cache dirs (core.cache_dir), remotes (remote.NAME.url), experiment tracking (experiments.max_enter), and cache protection (core.protected).
For example, dvc config core.no_commit true disables cache commits, or dvc config --global cache.protected true protects global cache. Listing with --list shows all keys, while --show-origin reveals value sources. Editing opens the relevant file in $EDITOR, and --import pulls configs from URLs for reproducibility.
This command is essential for DVC pipelines, remotes, metrics, and ML workflows, ensuring reproducible data management without storing large files in Git.
CAVEATS
Config scopes have fixed read priorities: workspace > local > global > system. Setting values only affects the specified scope; higher priorities override lower ones.
CONFIG LOCATIONS
System: /etc/xdg/dvc/config
Global: ~/.dvc/config
Local: .dvc/config
Workspace: .dvc/workspace/config
EXAMPLES
dvc config core.cache_dir ../.dvc_cache
dvc config --list core
dvc config --global --remove remote.origin
HISTORY
Introduced in DVC 0.21 (2018) mimicking git config. Evolved with workspace support in v2.0 (2021) and import features for team reproducibility.
SEE ALSO
dvc(1), git-config(1)


