Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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. 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 name
  • DEVCONCURRENT_PROJECT_PATH: the project’s root directory
  • DEVCONCURRENT_WORKSPACE: the workspace name
  • DEVCONCURRENT_WORKSPACE_PATH: the workspace directory
  • DEVCONCURRENT_ROOT: true for the root workspace, false otherwise

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>