1.0.9 • Published 10 months ago

deb-tool v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

DevEnvBootstrap (DEB)

GitHub license npm version Build Status semantic-release Test Coverage

🚀 A comprehensive CLI tool for automatically bootstrapping Docker-based development environments for Node.js/Express projects. Analyzes project structure, detects required services, and generates optimized configurations for both development and production environments.

Features

  • 🔍 Smart Project Analysis: Auto-detect project structure, dependencies, and required services
  • 🐳 Docker Configuration: Generate optimized Dockerfiles and docker-compose configurations
  • 🛠️ Service Integration: Automatically configure MongoDB, Redis, RabbitMQ and other services
  • TypeScript Support: First-class support for TypeScript projects
  • 🔄 Environment Management: Intelligent environment variable detection and configuration
  • 🔒 Production Ready: Generate secure configurations for production deployment

Installation

# Install globally
npm install -g deb-tool

# Or use it directly with npx
npx deb-tool

Quick Start

# Scan your project
deb scan

# Analyze your project structure
deb analyze

# For Express.js projects
deb express analyze
deb express generate -i  # Interactive mode

Commands

Project Analysis

  • deb scan [dir] - Scan project directory for Express.js setup
  • deb analyze [dir] - Analyze project structure and dependencies

Express.js Commands

  • deb express analyze [dir] - Analyze Express.js project

    • Options:
      • --json - Output results as JSON
  • deb express generate [dir] - Generate Docker configuration

    • Options:
      • -d, --dev - Generate development configuration
      • -p, --port <number> - Override port number
      • --node-version <version> - Specify Node.js version
      • -i, --interactive - Use interactive configuration

Example Usage

Basic Express.js Project

# Create a new project
mkdir my-express-app && cd my-express-app
npm init -y

# Install Express.js
npm install express

# Generate Docker configuration
deb express generate -i

# Start development environment
docker compose up -d

With TypeScript and Services

# Analyze project
deb express analyze

# Generate Docker configuration with custom settings
deb express generate \
  --dev \
  --port 3000 \
  --node-version 20-alpine

Configuration

DEB supports various configuration options through:

  • Interactive prompts (-i flag)
  • Command line arguments
  • Configuration file (.devenvrc.json)

Example configuration:

{
  "docker": {
    "mode": "development",
    "port": 3000,
    "nodeVersion": "20-alpine",
    "volumes": ["./src:/app/src"]
  }
}

Documentation

API References

Guides

Examples

Project Status

Current Version: npm version

FeatureStatus
Project Analysis
Docker Generation
Service Detection
TypeScript Support
Interactive Config
Environment Handling
Test Coverage (82%)
Multi-service Support
Binaries (Win/Mac/Linux)
Documentation
Error Handling

Contributing

We welcome contributions! Please see our Contributing Guide for details.

# Clone the repository
git clone https://github.com/SpongeBUG/DEB.git
cd DEB

# Install dependencies
npm install

# Run tests
npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Acknowledgments

Special thanks to all contributors and these amazing open-source projects:


Built with ❤️ by the SpongeBUG team

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

1.0.0-beta.15

10 months ago

1.0.0-beta.14

10 months ago

1.0.0-beta.13

10 months ago