Code Monkey home page Code Monkey logo

dems-cli's Introduction

Development Environment Management System (DEMS)

๐Ÿงช Tests

Contents

๐Ÿ—’๏ธ Overview

DEMS is a generic CLI tool meant to assist teams to quickly get from onboarding to coding by automating the initialization process of an application (git clone, deps install, provisioning of required services like databases or mail servers) using Docker.

DEMS is made with Bun, TypeScript and Commander.js.

๐Ÿ”ง Setup

To install dependencies:

bun install

To run:

./cli.ts --help

๐Ÿ–๏ธ Style

Our chosen format and lint tool is Biome. For more information about our preset and custom rules configuration, see the biome.json file.

๐Ÿ—๏ธ Structure

The current version of DEMS in this repository is a modern adaptation of an internal tool with the same name that I made for gbh.tech. The original version was made purely with Bash scripts, which is the main motivation for this newer version, to extend its capabilities with a rich ecosystem and make it more accesible to developers.

The structure of DEMS is simple: it has commands (/src/commands), and those commands depend on utilities (/src/utils) and config files (/src/config).

๐ŸŸข Commands

As you'd expect, commands are the protagonists of DEMS. They assist the software engineer in the various tasks needed to setup a local project and start working on it.

Commands are instances of the Command class provided by Commander.js, which are then added to the main cli Command object in the ./cli.ts file with addCommand().

๐Ÿ’ก Execute dems --help to check all available commands.

๐Ÿ”ต Config

The DEMS Config is split into three (3) different contexts found in two different files: ./src/config/cli.ts and ./src/config/dems.ts.

  • CLI: modifies the behavior of the CLI tool, without affecting any specific project.
  • DEMS: defines the configuration directives of DEMS for every project, in the form of a config.json file.
  • Environment: defines the blogal environment variables of DEMS that can affect all other configurations (all env vars start with a prefix DEMS_ to avoid conflicts).

๐ŸŸ  Utils

The Utils are simply re-usable functions that assist commands, they can go from simple things like normalizing a string, to more complex tags like generating a .env file from the config.json of the project or generating parameter for Docker Compose.

For more information, check the ./src/utils directory.

dems-cli's People

Contributors

angelmadames avatar renovate[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.