Configuration Reference
Devconcurrent is configured by a simple toml file.
You can override the default path by setting the DEVCONCURRENT_CONFIG environment
variable; this should be the path to the directory containing config.toml.
primaryProject— The project to use when none is given and none can be inferred from the current directory.projects.<name>— Configured projects by name.projects.<name>.path— The project location on your host.projects.<name>.worktreeFolder— The directory where devconcurrent will place worktrees.projects.<name>.branch— Template for the default branch name forupon a new workspace, overridingworktree.branchprojects.<name>.devcontainer— Any of the options fromdevcontainer.json(https://containers.dev/implementors/json_reference/), as per-user overrides.
proxy— Global proxy settings.proxy.enable— Enable the devconcurrent DNS and HTTP proxy.proxy.port— The DNS port the proxy listens on.proxy.caRoot— Directory holding the root CA used to terminate TLS.proxy.tlds— TLDs that the proxy may mint certificates for and serve TLS on.
shell— Shell-integration settings.shell.exportEnv— Register a prompt hook to auto-set the variables fromcustomizations.devconcurrent.envbased on your current working directory.
worktree— Worktree settings.worktree.branch— Template for the default branch name forupon a new workspace
hooks— Commands run on the host aroundupanddestroy, for every project, whether or not it has a devcontainer.hooks.beforeUp— Runs at the start ofup, before the worktree is created, from the project root.hooks.beforeUp.<name>— A command: a string run with/bin/sh -c, or a program and its arguments.
hooks.afterUp— Runs onceuphas brought the workspace up, after every lifecycle command and before--forwardor--exec, from the workspace.hooks.afterUp.<name>— A command: a string run with/bin/sh -c, or a program and its arguments.
hooks.beforeDestroy— Runs beforedestroyremoves anything, from the workspace.hooks.beforeDestroy.<name>— A command: a string run with/bin/sh -c, or a program and its arguments.
hooks.afterDestroy— Runs oncedestroyhas finished, from the project root.hooks.afterDestroy.<name>— A command: a string run with/bin/sh -c, or a program and its arguments.
primaryProject
The project to use when none is given and none can be inferred from the current directory. Defaults to the first project listed.
Type: string
projects.<name>
Configured projects by name.
Type: table
projects.<name>.path
The project location on your host.
Type: string
Required: yes
projects.<name>.worktreeFolder
The directory where devconcurrent will place worktrees. Defaults to
workspaces/<project> under the platform data directory. This is also settable in the
devcontainer, but it’s available here for projects that don’t use devcontainers.
Type: string
projects.<name>.branch
Template for the default branch name for up on a new workspace, overriding worktree.branch
Type: string
projects.<name>.devcontainer
Any of the options from devcontainer.json (https://containers.dev/implementors/json_reference/),
as per-user overrides. These are merged with the project’s devcontainer.json, with arrays
concatenated and this file winning conflicts.
Type: table
Example:
If a project uses devcontainers, but not devconcurrent, you might configure it here like this:
[projects.my-app]
path = "~/src/my-app"
# Per-user devcontainer overrides, merged into the repo's devcontainer.json:
devcontainer.customizations.devconcurrent = {
env = {
APP_URL = "https://{{ hostname 'app' }}",
DATABASE_HOST = "{{ hostname 'mysql' }}"
},
proxy = {
enable = true,
services.app.httpProxyPort = 8080,
},
}
proxy
Global proxy settings.
Type: table
proxy.enable
Enable the devconcurrent DNS and HTTP proxy.
When false, up never starts the proxy and no root CA is minted,
regardless of per-project customizations.devconcurrent.proxy.enable.
Type: boolean
Default: true
proxy.port
The DNS port the proxy listens on.
Type: integer
Default: 43770
proxy.caRoot
Directory holding the root CA used to terminate TLS.
Defaults to devconcurrent/ca in your platform’s data directory.
Type: string
proxy.tlds
TLDs that the proxy may mint certificates for and serve TLS on.
Changing this list regenerates the root CA, which will need to be trusted again.
Type: array<string>
Default: ["test"]
shell
Shell-integration settings.
Type: table
shell.exportEnv
Register a prompt hook to auto-set the variables from customizations.devconcurrent.env
based on your current working directory.
Type: boolean
Default: true
worktree
Worktree settings.
Type: table
worktree.branch
Template for the default branch name for up on a new workspace
Type: string
Default: '“{{ workspace }}”'
Example:
[worktree]
# `dc up foo` checks out `plg/foo`.
branch = "plg/{{ workspace }}"
hooks
Commands run on the host around up and destroy, for every project, whether
or not it has a devcontainer.
Each takes the same forms as a devcontainer lifecycle command: a string run
with /bin/sh -c, an array run directly, or a map of named commands run in
parallel. No ${...} substitution applies. Instead, these environment
variables are set:
DEVCONCURRENT_PROJECT: the project nameDEVCONCURRENT_PROJECT_PATH: the project’s root directoryDEVCONCURRENT_WORKSPACE: the workspace nameDEVCONCURRENT_WORKSPACE_PATH: the workspace directoryDEVCONCURRENT_ROOT:truefor the root workspace,falseotherwise
If a before hook fails, the operation does not happen.
Type: table
hooks.beforeUp
Runs at the start of up, before the worktree is created, from the project root.
Type: string | array<string> | table
hooks.beforeUp.<name>
A command: a string run with /bin/sh -c, or a program and its arguments.
Type: string | array<string>
hooks.afterUp
Runs once up has brought the workspace up, after every lifecycle command and
before --forward or --exec, from the workspace.
Type: string | array<string> | table
hooks.afterUp.<name>
A command: a string run with /bin/sh -c, or a program and its arguments.
Type: string | array<string>
hooks.beforeDestroy
Runs before destroy removes anything, from the workspace.
Type: string | array<string> | table
hooks.beforeDestroy.<name>
A command: a string run with /bin/sh -c, or a program and its arguments.
Type: string | array<string>
hooks.afterDestroy
Runs once destroy has finished, from the project root.
Type: string | array<string> | table
hooks.afterDestroy.<name>
A command: a string run with /bin/sh -c, or a program and its arguments.
Type: string | array<string>