Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/angelmadames/dems-cli
DEMS (Development Environment Management System) CLI Made with Bun and Commander.js.
https://github.com/angelmadames/dems-cli
bun cli commander dems tool
Last synced: 3 months ago
JSON representation
DEMS (Development Environment Management System) CLI Made with Bun and Commander.js.
- Host: GitHub
- URL: https://github.com/angelmadames/dems-cli
- Owner: angelmadames
- License: mit
- Created: 2024-01-23T00:39:05.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-13T05:40:55.000Z (6 months ago)
- Last Synced: 2024-05-13T22:34:26.269Z (6 months ago)
- Topics: bun, cli, commander, dems, tool
- Language: TypeScript
- Homepage:
- Size: 224 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Development Environment Management System (DEMS)
[![๐งช Tests](https://github.com/angelmadames/dems-cli/actions/workflows/tests.yml/badge.svg)](https://github.com/angelmadames/dems-cli/actions/workflows/tests.yml)
## Contents
- [๐๏ธ Overview](#๏ธ-overview)
- [๐ง Setup](#-setup)
- [๐๏ธ Style](#๏ธ-style)
- [๐๏ธ Structure](#๏ธ-structure)
- [๐ข Commands](#-commands)
- [๐ต Config](#-config)
- [๐ Utils](#-utils)## ๐๏ธ 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:
```shell
bun install
```To run:
```shell
./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](./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](./src//commands/)),
and those commands depend on **utilities** ([/src/utils](./src/utils/)) and **config
files** ([/src/config](./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](./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](./src/config//cli.ts) and [./src/config/dems.ts](./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](./src//utils/) directory.
[Bun]: https://bun.sh
[TypeScript]: https://www.typescriptlang.org
[Commander.js]: https://github.com/tj/commander.js
[Biome]: https://biomejs.dev
[gbh.tech]: https://gbh.tech