Skip to content
Docs v0.6.0

Configuration

Global configuration can be set via YAML files or environment variables.

Global Configuration Sources (in order of precedence, highest first):

  1. Environment variables (DENVIG_PROJECT_PATHS, DENVIG_QUICK_ACTIONS)
  2. ~/.denvig/config.yml
  3. Default values

Project Configuration is loaded from ./.denvig.yml in the project root.

  • default: ['~/src/*/*', '~/.dotfiles']
  • env: DENVIG_PROJECT_PATHS (comma-separated list, e.g., ~/src/*/*,~/.dotfiles)

An array of paths or glob-like patterns where your projects live. Each * matches a single directory level (not recursive).

Development environments work best when there is a consistent location for all projects. Denvig works best on the concept of [group]/[project] so you can have a consistent structure for all your projects. Since most people use GitHub, this maps to [owner]/[repo]. You could subpath them based on hosting provider such as ~/src/github/[owner]/[repo] or ~/src/gitlab/[owner]/[repo] if you want to keep them separate.

Pattern Examples:

  • ~/src/*/* - Matches all directories two levels deep under ~/src
  • ~/.dotfiles - Matches a single specific directory

Project Slugs:

Projects are identified by slugs that indicate their source:

  • github:owner/repo - For projects with a GitHub remote (detected from git config)
  • local:/absolute/path - For projects without a GitHub remote

Example Configuration:

projectPaths:
- ~/src/*/*
- ~/work/*/*
- ~/.dotfiles
  • default: build, dev, check-types, install, lint, outdated, test
  • env: DENVIG_QUICK_ACTIONS (comma-separated list, e.g., build,dev,lint; empty string disables)

A list of actions that will be available by default for all projects. See local configuration for more details.

Setting an empty string via the environment variable disables quick actions entirely:

Terminal window
export DENVIG_QUICK_ACTIONS=""

The file location for project configuration is ./.denvig.yml in the root of your project.

optional

Unique identifier for the project. Slug will be used if not provided, then falling back to path.

optional

Actions that can be run against the project. Each action is defined with a command to execute.

Example:

actions:
build:
command: pnpm build
clean:
command: rm -rf dist
test-with-coverage:
command: pnpm test --coverage

optional

Actions that are available on the CLI root for quick access. This overrides the global quickActions setting for this specific project.

Example:

quickActions:
- build
- dev
- test

optional

Service definitions for the project. Each service can have its own configuration including command, HTTP settings, and environment variables.

Service names must start with a letter, contain only lowercase alphanumeric characters and hyphens, not end with a hyphen, and be 64 characters or less.

Service Options:

  • command (required): Shell command to execute
  • cwd (optional): Working directory for the service (relative to project root)
  • http (optional): HTTP configuration for the service
    • http.port (optional): Port number the service listens on
    • http.domain (optional): Domain to use for the service URL
    • http.secure (optional): Use HTTPS instead of HTTP
  • envFiles (optional): Array of paths to .env files (relative to service cwd)
  • env (optional): Environment variables as key-value pairs
  • keepAlive (optional): Restart service if it exits
  • startOnBoot (optional): Start service automatically when system boots

Example:

services:
api:
command: pnpm dev
cwd: apps/api
http:
port: 3000
domain: api.local
secure: true
envFiles:
- .env
- .env.local
env:
NODE_ENV: development
keepAlive: true
startOnBoot: true
web:
command: pnpm dev
cwd: apps/web
http:
port: 3001
domain: web.local

Denvig provides tab completions for ZSH. To install them to the default location:

Terminal window
denvig zsh completions --install

This installs the completion script to ~/.zsh/completions/_denvig. You will need to ensure this directory is in your fpath. Add the following to your ~/.zshrc if it isn’t already:

Terminal window
fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

To install completions to a custom directory, redirect the output directly:

Terminal window
denvig zsh completions > /custom/path/_denvig