bootstrap-cli

command module
v0.0.0-...-424b5b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2025 License: MIT Imports: 4 Imported by: 0

README ยถ

๐Ÿ›๏ธ Bootstrap CLI

Bootstrap CLI is a modular, interactive command-line tool for setting up a fully personalized development environment across platforms (Linux, macOS, WSL).

Built for developers who value speed, reproducibility, and elegance โ€” without fluff.


โœจ Features (Phase 1 & 2)

  • ๐Ÿ” System Detection
    Detect OS, architecture, distro, and system resources
  • ๐Ÿ“ฆ Package Manager Abstraction
    Unified logic for apt, dnf, pacman, brew, etc.
  • ๐Ÿ› ๏ธ Core Tool Installer
    Modern CLI tools (e.g. bat, fzf, ripgrep, starship)
  • ๐Ÿ‘‹ Shell & Config Setup
    Zsh, Bash, Fish, dotfiles sync, and config templates
  • ๐Ÿ Language Version Managers
    nvm, pyenv, goenv, rustup with custom version support
  • ๐Ÿ”ง Dotfiles Management
    Local import, GitHub sync, backup & restore

Plugin system, remote config sync, i18n, and accessibility coming in later phases.


๐Ÿ“ Project Structure

bootstrap-cli/
โ”œโ”€โ”€ cmd/                # CLI entrypoints (Cobra commands)
โ”œโ”€โ”€ internal/           # Business logic: system, packages, install, etc.
โ”œโ”€โ”€ pkg/                # (Future) public plugins or modules
โ”œโ”€โ”€ test/               # Integration tests, fixtures
โ”œโ”€โ”€ docs/               # Specs, plans, architecture
โ”œโ”€โ”€ scripts/            # Build/test helpers
โ”œโ”€โ”€ main.go             # Entrypoint
โ””โ”€โ”€ cursor-prompt.md    # Prompt used for Cursor AI guidance

โš™๏ธ Getting Started

Prerequisites
  • Go 1.21+
  • Git
  • Linux/macOS/WSL (tested on Ubuntu 22.04+)
Install & Build
git clone https://github.com/YitzhakMizrahi/bootstrap-cli.git
cd bootstrap-cli
go mod tidy
make build
Run
./bootstrap-cli init

๐Ÿงช Testing (LXC Method)

lxc launch ubuntu:22.04 bootstrap-test
lxc snapshot bootstrap-test clean

# Push binary to test container
lxc file push build/bin/bootstrap-cli bootstrap-test/home/devuser/bootstrap-cli --mode=755
lxc exec bootstrap-test -- su - devuser -c '/home/devuser/bootstrap-cli'


๐Ÿ“š Documentation

Topic Link
๐Ÿ’ก Specification docs/SPEC.md
๐Ÿงฑ Implementation Plan docs/IMPLEMENTATION.md
๐Ÿฆฎ Project Structure docs/PROJECT_STRUCTURE.md
๐ŸŽจ Wireframes docs/WIREFRAMES.md
๐Ÿ““ Decisions docs/DECISIONS.md

๐Ÿ›  Dev Workflow

make build        # Compile CLI binary
make test         # Run all unit tests
go run main.go    # Run directly

To build for release, check scripts/release/ and Makefile targets.


๐Ÿšง Development Status

Status Version
Core Implementation In Progress
Latest Version v0.1.0-alpha

๐Ÿค Contributing

We're currently focusing on internal use, but feel free to open issues or forks.
A formal CONTRIBUTING guide will be added in Phase 3.


๐Ÿ“ License

MIT License โ€“ see LICENSE file.


Documentation ยถ

Overview ยถ

Package main is the entry point for the bootstrap-cli application, handling initial configuration extraction and command execution setup.

Directories ยถ

Path Synopsis
cmd
Package cmd provides the root command and command registration for the bootstrap-cli, coordinating all subcommands and managing global flags and configuration.
Package cmd provides the root command and command registration for the bootstrap-cli, coordinating all subcommands and managing global flags and configuration.
init
Package init provides initialization functionality for the bootstrap-cli, handling initial system setup and configuration extraction.
Package init provides initialization functionality for the bootstrap-cli, handling initial system setup and configuration extraction.
package
Package packagecmd provides command-line functionality for managing system packages, including installation, removal, listing, updating, and upgrading packages through the system's native package manager.
Package packagecmd provides command-line functionality for managing system packages, including installation, removal, listing, updating, and upgrading packages through the system's native package manager.
tools
Package tools provides command-line tools for managing package installations, verifications, and system configurations through the bootstrap-cli interface.
Package tools provides command-line tools for managing package installations, verifications, and system configurations through the bootstrap-cli interface.
up
Package up provides the up command for running the bootstrap-cli TUI
Package up provides the up command for running the bootstrap-cli TUI
internal
cmdexec
Package cmdexec provides command execution utilities for the bootstrap-cli, including command execution with retries and error handling.
Package cmdexec provides command execution utilities for the bootstrap-cli, including command execution with retries and error handling.
config
Package config provides configuration management functionality for the bootstrap-cli, including loading, parsing, and managing configuration files, as well as handling embedded default configurations.
Package config provides configuration management functionality for the bootstrap-cli, including loading, parsing, and managing configuration files, as well as handling embedded default configurations.
dotfiles
Package dotfiles provides functionality for managing dotfiles in the bootstrap-cli, including initialization, cloning repositories, applying configurations, and managing shell-specific settings.
Package dotfiles provides functionality for managing dotfiles in the bootstrap-cli, including initialization, cloning repositories, applying configurations, and managing shell-specific settings.
install
Package install provides functionality for installing and managing various components in the bootstrap-cli, including tools, fonts, and system packages.
Package install provides functionality for installing and managing various components in the bootstrap-cli, including tools, fonts, and system packages.
interfaces
Package interfaces defines common interfaces and types used throughout the bootstrap-cli, providing abstractions for package management, command execution, and system configuration.
Package interfaces defines common interfaces and types used throughout the bootstrap-cli, providing abstractions for package management, command execution, and system configuration.
log
Package log provides logging functionality for the bootstrap-cli, including adapters for different logging implementations and interfaces.
Package log provides logging functionality for the bootstrap-cli, including adapters for different logging implementations and interfaces.
packages
Package packages provides error types and utilities for package management operations, including installation, removal, and version management across different package managers.
Package packages provides error types and utilities for package management operations, including installation, removal, and version management across different package managers.
packages/detector
Package detector provides functionality for detecting and identifying the system's package manager type by checking for the presence of common package management tools.
Package detector provides functionality for detecting and identifying the system's package manager type by checking for the presence of common package management tools.
packages/factory
Package factory provides factory methods for creating package managers and related mock implementations for testing purposes.
Package factory provides factory methods for creating package managers and related mock implementations for testing purposes.
packages/implementations
Package implementations provides concrete implementations of various interfaces used throughout the bootstrap-cli, including package managers for different operating systems and package management systems.
Package implementations provides concrete implementations of various interfaces used throughout the bootstrap-cli, including package managers for different operating systems and package management systems.
pipeline
Package pipeline provides a flexible and extensible installation pipeline system for the bootstrap-cli, managing the installation process, dependencies, and post-installation tasks.
Package pipeline provides a flexible and extensible installation pipeline system for the bootstrap-cli, managing the installation process, dependencies, and post-installation tasks.
system
Package system provides system detection and configuration functionality for the bootstrap-cli, including OS detection, package manager detection, and system-level operations.
Package system provides system detection and configuration functionality for the bootstrap-cli, including OS detection, package manager detection, and system-level operations.
testing
Package testing provides testing utilities and helpers for the bootstrap-cli, including test environment setup, temporary file and directory management, and environment variable handling.
Package testing provides testing utilities and helpers for the bootstrap-cli, including test environment setup, temporary file and directory management, and environment variable handling.
ui
Package ui provides user interface components and prompts for the bootstrap-cli application.
Package ui provides user interface components and prompts for the bootstrap-cli application.
ui/app
Package app provides the main application model for the bootstrap-cli UI.
Package app provides the main application model for the bootstrap-cli UI.
ui/components
Package components provides UI components for the bootstrap-cli application.
Package components provides UI components for the bootstrap-cli application.
ui/screens
Package screens provides the UI screens for the bootstrap-cli TUI
Package screens provides the UI screens for the bootstrap-cli TUI
ui/styles
Package styles provides styling for UI components in the bootstrap-cli application.
Package styles provides styling for UI components in the bootstrap-cli application.
ui/utils
Package utils provides utility functions for common operations across the bootstrap-cli.
Package utils provides utility functions for common operations across the bootstrap-cli.
utils
Package utils provides utility functions and types for common operations throughout the bootstrap-cli, including command execution with retries and error handling.
Package utils provides utility functions and types for common operations throughout the bootstrap-cli, including command execution with retries and error handling.
validation
Package validation provides validation utilities for configuration files
Package validation provides validation utilities for configuration files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL