Project

ddenv

0.0
No release in over a year
Creates and maintains an environment for local development, including Ruby and Node versions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 2.15
 Project Readme

ddenv

ddenv (Denis’ Developer Environment) is a tool for setting up a local development environment.

Watch the 75-second introduction:

YouTube video: “An introduction to ddenv”

Requirements

First, ensure you have Homebrew installed, and are using a supported shell (zsh, bash, or fish).

Then, run brew install denisdefreyne/tap/ddenv.

Quick start

Create a .config/ddenv.yaml or ddenv.yaml file which contains the list of dependencies to manage. For example:1

up:
  - homebrew: overmind
  - postgresql:
      version: 17
      env:
        DB_URL: "postgres://{{ .User }}:{{ .Password }}@{{ .Host }}:{{ .Port }}/mydb"
  - redis:
      env:
        REDIS_URL: "redis://{{ .Host }}:{{ .Port }}/0"
  - ruby
  - bundle
  - node
  - npm

Then, run ddenv:

% ddenv
Installing Homebrew package ‘overmind’       skipped
Installing Homebrew package ‘ruby-install’   skipped
Installing Ruby 3.3.6                        skipped
Adding Shadowenv to shell                    skipped
Creating Shadowenv dir                       done
Adding Shadowenv dir to .gitignore           done
Adding Ruby 3.3.6 to Shadowenv               done
Installing Ruby gem bundler                  done
Installing bundle                            done
Installing Homebrew package ‘node-build’     checking...
Installing Node 20.12.2                      pending
Adding Node 20.12.2 to Shadowenv             pending
Installing npm packages                      pending

Now your local developer environment is ready to be used.

Goals

  • homebrew: PACKAGENAME installs the Homebrew package with the given name. Example:

    up:
      - homebrew: overmind
  • ruby installs Ruby (with the version specified in the .ruby-version file). Example:

    up:
      - ruby
  • bundle runs bundle install. Example:

    up:
      - ruby
      - bundle
  • node installs Node.js (with the version specified in the .node-version file). Example:

    up:
      - node
  • npm installs packages from package.json using npm. Example:

    up:
      - node
      - npm
  • pnpm installs packages from package.json using pnpm. Example:

    up:
      - node
      - pnpm
  • yarn installs packages from package.json using yarn. Example:

    up:
      - node
      - yarn
  • postgresql: installs the given version of PostgreSQL (the version key), starts it, and sets up environment variables based on the env key (User, Password, Host and Port are available as keys). Example:

    up:
      - postgresql:
          version: 17
          env:
            DB_URL: "postgres://{{ .User }}:{{ .Password }}@{{ .Host }}:{{ .Port }}/mydb"
  • redis: installs Redis, starts it, and sets up environment variables based on the env key (Host and Port are available as keys). Example:

    up:
      - redis:
          env:
            REDIS_URL: "redis://{{ .Host }}:{{ .Port }}/0"

Footnotes

  1. This example relies on a .ruby-version file being present, e.g. with the file contents 3.3.6, and a .node-version file, e.g. with the file contents 20.12.2. ↩