Config

Wrgl configuration is written in YAML format and stored in the following locations:

  • Repository folder .wrgl/config.yaml: By default, all write commands alter this file. For read commands, the default behavior is to aggregate all files. If flag --local is set then this file is read exclusively.
  • Global folder $XDG_CONFIG_HOME/wrgl/config.yaml: This file is read/write to if flag --global is set. If XDG_CONFIG_HOME isn't defined then the location $HOME/.config/wrgl/config.yaml is used instead.
  • System folder /usr/local/etc/wrgl/config.yaml: This file is read/write to if flag --system is set.

Configuration options

  • user.email: current user's email. Just like with Git, most operations that alter data record the user's email. Unlike Git however, email is always required.
  • user.name: current user's name.
  • remote.<remote>.url: the URL of a remote.
  • remote.<remote>.fetch: list of refspecs to fetch from this remote when user run wrgl fetch <remote> without specifying refspecs.
  • remote.<remote>.push: list of refspecs to push to this remote when user run wrgl push <remote> without specifying refspecs.
  • remote.<remote>.mirror: when set to true, wrgl push <remote> behaves as if flag --mirror is set. This remote will then act as a mirror of the local repository.
  • receive.denyNonFastForwards: when set to true, during push, Wrgld denies all updates that are not fast-forwards.
  • receive.denyDeletes: when set to true, during push, Wrgld denies all reference deletes.
  • branch.<branch>.remote: upstream remote of this branch. When both this setting and branch.<branch>merge is set, user can run wrgl pull <branch> without specifying remote and refspec.
  • branch.<branch>.merge: upstream destination of this branch. When both this setting and branch.<branch>remote is set, user can run wrgl pull <branch> without specifying remote and refspec.
  • auth.tokenDuration: how long before a JWT token given by the `/authenticate/` endpoint of Wrgld expire. This is a string in the format "72h3m0.5s". Tokens last for 90 days by default.
  • pack.maxFileSize: the maximum packfile size in bytes. Note that unlike in Git, pack format is only used as a transport format during fetch and push. This size is pre-compression.

wrgl config add

Add to a multi-valued field without altering any existing values.

wrgl config add NAME VALUE [flags]

Flags

-h, --help

help for add

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global $XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global $XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# Add new value to remote.origin.push
wrgl config add remote.origin.push refs/heads/main

wrgl config set

Set value for a field.

wrgl config set NAME VALUE [flags]

This command only work with single-valued fields. For multi-valued fields, use wrgl config add or wrgl config replace-all instead. For boolean fields, only "true" or "false" value can be set.

Flags

-h, --help

help for set

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# alter setting in the local config
wrgl config set receive.denyNonFastForwards true

# alter system-wide config
wrgl config set pack.maxFileSize 1048576 --system

# alter global config
wrgl config set user.name "Jane Lane" --global

wrgl config get

Get value of a field.

wrgl config get NAME [VALUE_PATTERN] [flags]

This command returns the last value if there are multiple values in this field. If VALUE_PATTERN is given, only returns the value if it matches pattern (a regular expression if --fixed-value is not set). Returns error code 1 if the key was not found.

Flags

-h, --help

help for get

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global $XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global $XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# get current user email
wrgl config get user.email

# get the last branch reference in field remote.origin.push
wrgl config get remote.origin.push ^refs/heads/

wrgl config get-all

Get all values for a multi-valued field.

wrgl config get-all NAME [VALUE_PATTERN] [flags]

If VALUE_PATTERN is given, only return the values that match the pattern (a regular expression if --fixed-value is not set).

Flags

-h, --help

help for get-all

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global $XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global $XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# get all values in field remote.origin.push
wrgl config get-all remote.origin.push

# get all values in field remote.origin.push that is a branch
wrgl config get-all remote.origin.push ^refs/heads/

wrgl config rename-section

Rename a config section.

wrgl config rename-section OLD_NAME NEW_NAME [flags]

This is equivalent to moving a config section to a different location. Note that the new destination's type must match that of the old location.

Flags

-h, --help

help for rename-section

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global $XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# rename a remote
wrgl config rename-section remote.origin remote.old_origin

wrgl config replace-all

Replace all values with a single value.

wrgl config replace-all NAME VALUE [VALUE_PATTERN] [flags]

If VALUE_PATTERN is given, only replace the values matching it.

Flags

-h, --help

help for replace-all

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# replace all values under remote.origin.push with refs/heads/main
wrgl config replace-all remote.origin.push refs/heads/main

# replace all branches under remote.origin.push with refs/heads/main
wrgl config replace-all remote.origin.push refs/heads/main ^refs/heads/

wrgl config unset

Remove a single value.

wrgl config unset NAME [VALUE_PATTERN] [flags]

If VALUE_PATTERN is not given, the matching field must be single-valued. If VALUE_PATTERN is given and the field is multi-valued, there must be only one matching value.

Flags

-h, --help

help for unset

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# remove an option
wrgl config unset receive.denyNonFastForwards

# remove the main branch from remote.origin.push
wrgl config unset remote.origin.push refs/heads/main --fixed-value

wrgl config unset-all

Remove all values from a field.

wrgl config unset-all NAME [VALUE_PATTERN] [flags]

If VALUE_PATTERN is given, only remove values that match the pattern.

Flags

-h, --help

help for unset-all

Inherited flags

--badger-log

set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")

--cpuprofile

write cpu profile to file

--debug-file

output debug logs to a file

-f, --file

use the given config file instead of .wrgl/config.yaml

--fixed-value

when used with the VALUE_PATTERN argument, treat VALUE_PATTERN as an exact string instead of a regular expression.

--global

for writing commands: write to global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global \$XDG_CONFIG_HOME/wrgl/config.yaml rather than from all available files.

--heapprofile

write heap profile to file

--local

for writing commands: write to file .wrgl/config.yaml. This is the default behavior. For reading commands: read only from the repository .wrgl/config.yaml rather than from all available files.

-z, --null

for all options that output values and/or keys, always end values with the null character (instead of a newline). Use newline instead as a delimiter between key and value. This allows for secure parsing of the output without getting confused e.g. by values that contain line breaks.

--system

for writing commands: write to system-wide /usr/local/etc/wrgl/config.yaml rather than the repository .wrgl/config.yaml. For reading commands: read only from global file /usr/local/etc/wrgl/config.yaml rather than from all available files.

--wrgl-dir

parent directory of repo, default to current working directory.

Examples

# remove all values under remote.origin.push
wrgl config unset-all remote.origin.push

# remove all tags under remote.origin.push
wrgl config unset-all remote.origin.push ^refs/tags/