Skip to content

πŸ“¦ Source Directory Overview (src)ΒΆ

Welcome to the technical heart of the project! This document provides a clear and concise overview of the structure and purpose of each file and folder within the src directory. Whether you're a new contributor or just curious, this guide will help you navigate the codebase with ease.


πŸ“‘ Table of ContentsΒΆ


πŸš€ Main Entry PointΒΆ

index.tsΒΆ

The main entry script for the CLI tool. It detects the operating system (macOS or Windows) and launches the appropriate CLI logic for package management (Homebrew or Chocolatey). This file contains the main menu and delegates to the relevant platform-specific functions.


βš™οΈ Configuration ModulesΒΆ

config/cli.tsΒΆ

Defines the PackageManagerCLI class, which manages the interactive main menu, package installation, updates, SSH connections, and the execution of commands from YAML files. The menu adapts to the detected platform.

config/localStorage.tsΒΆ

Provides the YamlDataService class for loading and saving data (such as command lists) from YAML files in the assets directory. Relies on helpers from utils/isStorage.ts.


πŸ› οΈ Utility ModulesΒΆ

utils/yamlTerminalAutomator.tsΒΆ

The TerminalAutomator class reads commands from a YAML file and executes them sequentially. Errors are logged, and execution halts on failure.

utils/section.tsΒΆ

The Section class provides an interactive menu for selecting and running Docker Compose files. It supports keyboard navigation and loading environment variables from .env files.

utils/isStorage.tsΒΆ

The isStorageService class offers helper methods for creating directories and file paths for YAML files in the assets directory.

utils/docker.tsΒΆ

The DockerComposeUtil class #encapsulates Docker Compose operations, including error handling and loading environment variables from .env files.

utils/bash.tsΒΆ

The BashHelper class provides methods for establishing SSH connections and exiting the CLI program. It works seamlessly across Windows and Unix systems.


πŸ“ Type DefinitionsΒΆ

types/types.tsΒΆ

Defines the PackageManagerOptions interface, which specifies configuration options for the CLI (such as platform, commands, labels, and messages).

Share on Social Media