feat(services): Add comprehensive development services management (v1.17.0)
- Implemented gitzone services command for managing MongoDB and MinIO containers - Added smart port assignment (20000-30000 range) to avoid conflicts - Project-specific container names for complete isolation - Data persistence in .nogit/ directories - MongoDB Compass connection string generation with network IP detection - Auto-configuration via .nogit/env.json with secure defaults - Commands: start, stop, restart, status, config, compass, logs, remove, clean - Interactive confirmations for destructive operations - Comprehensive documentation and Task Venture Capital GmbH legal update
This commit is contained in:
139
readme.md
139
readme.md
@@ -7,7 +7,7 @@
|
||||
|
||||
## 🎯 What is gitzone?
|
||||
|
||||
gitzone is a powerful command-line interface that supercharges your development workflow with automated project management, intelligent code formatting, and seamless version control. Whether you're bootstrapping a new TypeScript project, maintaining code quality, or managing complex multi-repository setups, gitzone has got you covered.
|
||||
gitzone is a powerful command-line interface that supercharges your development workflow with automated project management, intelligent code formatting, seamless version control, and development service orchestration. Whether you're bootstrapping a new TypeScript project, maintaining code quality, managing complex multi-repository setups, or spinning up local development databases, gitzone has got you covered.
|
||||
|
||||
## 🏃♂️ Quick Start
|
||||
|
||||
@@ -23,7 +23,7 @@ pnpm add -g @git.zone/cli
|
||||
|
||||
Once installed, you can use either `gitzone` or the shorter `gzone` command from anywhere in your terminal.
|
||||
|
||||
### Your First Command
|
||||
### Your First Commands
|
||||
|
||||
```bash
|
||||
# Create a new TypeScript npm package
|
||||
@@ -32,12 +32,66 @@ gitzone template npm
|
||||
# Format your entire codebase
|
||||
gitzone format
|
||||
|
||||
# Start local MongoDB and MinIO services
|
||||
gitzone services start
|
||||
|
||||
# Create a semantic commit
|
||||
gitzone commit
|
||||
```
|
||||
|
||||
## 🛠️ Core Features
|
||||
|
||||
### 🐳 Development Services Management (NEW!)
|
||||
|
||||
Effortlessly manage local MongoDB and MinIO (S3-compatible) services for your development environment:
|
||||
|
||||
```bash
|
||||
gitzone services [command]
|
||||
```
|
||||
|
||||
**Available commands:**
|
||||
|
||||
- **`start [service]`** - Start services (mongo|s3|all)
|
||||
- **`stop [service]`** - Stop services (mongo|s3|all)
|
||||
- **`restart [service]`** - Restart services
|
||||
- **`status`** - Show current service status
|
||||
- **`config`** - Display configuration details
|
||||
- **`compass`** - Get MongoDB Compass connection string with network IP
|
||||
- **`logs [service] [lines]`** - View service logs
|
||||
- **`remove`** - Remove containers (preserves data)
|
||||
- **`clean`** - Remove containers AND data (⚠️ destructive)
|
||||
|
||||
**Key features:**
|
||||
|
||||
- 🎲 **Smart port assignment** - Automatically assigns random ports (20000-30000) to avoid conflicts
|
||||
- 📦 **Project isolation** - Each project gets its own containers with unique names
|
||||
- 💾 **Data persistence** - Data stored in `.nogit/` directories survives container restarts
|
||||
- 🔗 **MongoDB Compass support** - Instantly get connection strings for GUI access
|
||||
- 🌐 **Network IP detection** - Automatically detects your local network IP for remote connections
|
||||
- ⚙️ **Auto-configuration** - Creates `.nogit/env.json` with smart defaults
|
||||
|
||||
**Example workflow:**
|
||||
|
||||
```bash
|
||||
# Start all services for your project
|
||||
gitzone services start
|
||||
|
||||
# Check what's running
|
||||
gitzone services status
|
||||
|
||||
# Get MongoDB Compass connection string
|
||||
gitzone services compass
|
||||
# Output: mongodb://defaultadmin:defaultpass@192.168.1.100:27018/myproject?authSource=admin
|
||||
|
||||
# View MongoDB logs
|
||||
gitzone services logs mongo 50
|
||||
|
||||
# Stop services when done
|
||||
gitzone services stop
|
||||
```
|
||||
|
||||
The services are configured via `.nogit/env.json` which is automatically created with secure defaults and random ports for each project.
|
||||
|
||||
### 📦 Project Templates
|
||||
|
||||
Instantly scaffold production-ready projects with best practices built-in:
|
||||
@@ -279,43 +333,52 @@ Customize gitzone behavior through `npmextra.json`:
|
||||
### For New Projects
|
||||
|
||||
1. Start with a template: `gitzone template npm`
|
||||
2. Customize the generated structure
|
||||
3. Run initial format: `gitzone format`
|
||||
4. Set up CI/CD: `gitzone open ci`
|
||||
2. Set up local services: `gitzone services start`
|
||||
3. Customize the generated structure
|
||||
4. Run initial format: `gitzone format`
|
||||
5. Set up CI/CD: `gitzone open ci`
|
||||
|
||||
### For Existing Projects
|
||||
|
||||
1. Initialize: `gitzone start`
|
||||
2. Format codebase: `gitzone format --dry-run` (preview first!)
|
||||
3. Apply formatting: `gitzone format --yes`
|
||||
4. Commit changes: `gitzone commit`
|
||||
4. Set up services: `gitzone services start`
|
||||
5. Commit changes: `gitzone commit`
|
||||
|
||||
### For Teams
|
||||
|
||||
1. Document format preferences in `npmextra.json`
|
||||
2. Use `--save-plan` for reviewable format changes
|
||||
3. Enable rollback for safety
|
||||
4. Standardize commit conventions
|
||||
2. Share `.nogit/env.json` template for consistent service setup
|
||||
3. Use `--save-plan` for reviewable format changes
|
||||
4. Enable rollback for safety
|
||||
5. Standardize commit conventions
|
||||
|
||||
## 🎯 Common Workflows
|
||||
|
||||
### Clean Development Cycle
|
||||
### Full-Stack Development Cycle
|
||||
|
||||
```bash
|
||||
# 1. Start fresh
|
||||
gitzone start
|
||||
|
||||
# 2. Make changes
|
||||
# 2. Spin up databases and services
|
||||
gitzone services start
|
||||
|
||||
# 3. Make changes
|
||||
# ... your development work ...
|
||||
|
||||
# 3. Format code
|
||||
# 4. Check service logs if needed
|
||||
gitzone services logs mongo
|
||||
|
||||
# 5. Format code
|
||||
gitzone format
|
||||
|
||||
# 4. Commit with semantic versioning
|
||||
# 6. Commit with semantic versioning
|
||||
gitzone commit
|
||||
|
||||
# 5. Deploy (if CI/CD configured)
|
||||
# Automatic via git push
|
||||
# 7. Stop services when done
|
||||
gitzone services stop
|
||||
```
|
||||
|
||||
### Multi-Repository Management
|
||||
@@ -349,6 +412,25 @@ gitzone format --from-plan format-changes.json
|
||||
gitzone format --rollback
|
||||
```
|
||||
|
||||
### Database-Driven Development
|
||||
|
||||
```bash
|
||||
# 1. Start MongoDB and MinIO
|
||||
gitzone services start
|
||||
|
||||
# 2. Get connection string for your app
|
||||
gitzone services config
|
||||
|
||||
# 3. Connect with MongoDB Compass
|
||||
gitzone services compass
|
||||
|
||||
# 4. Monitor services
|
||||
gitzone services status
|
||||
|
||||
# 5. Clean everything when done
|
||||
gitzone services clean # ⚠️ Warning: deletes data
|
||||
```
|
||||
|
||||
## 🔌 Integrations
|
||||
|
||||
### CI/CD Platforms
|
||||
@@ -363,6 +445,9 @@ gitzone format --rollback
|
||||
- **Prettier** - Code formatting
|
||||
- **ESLint** - Linting (via format modules)
|
||||
- **npm/pnpm** - Package management
|
||||
- **MongoDB** - Local database service
|
||||
- **MinIO** - S3-compatible object storage
|
||||
- **MongoDB Compass** - Database GUI integration
|
||||
|
||||
### Version Control
|
||||
|
||||
@@ -377,6 +462,8 @@ gitzone format --rollback
|
||||
3. **Leverage templates**: Start projects right with proven structures
|
||||
4. **Enable caching**: Dramatically speeds up formatting operations
|
||||
5. **Save format plans**: Review changes before applying in production
|
||||
6. **Port management**: Let services auto-assign ports to avoid conflicts
|
||||
7. **Use MongoDB Compass**: `gitzone services compass` for visual DB management
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
@@ -396,6 +483,18 @@ Ensure Docker daemon is running:
|
||||
docker info
|
||||
```
|
||||
|
||||
### Services Won't Start
|
||||
|
||||
Check for port conflicts:
|
||||
|
||||
```bash
|
||||
# Services auto-assign ports, but you can check the config
|
||||
cat .nogit/env.json
|
||||
|
||||
# Verify Docker is running
|
||||
docker ps
|
||||
```
|
||||
|
||||
### Template Creation Issues
|
||||
|
||||
Verify npm/pnpm is properly configured:
|
||||
@@ -404,6 +503,12 @@ Verify npm/pnpm is properly configured:
|
||||
npm config get registry
|
||||
```
|
||||
|
||||
### MongoDB Connection Issues
|
||||
|
||||
- Ensure services are running: `gitzone services status`
|
||||
- Check firewall settings for the assigned ports
|
||||
- Use `gitzone services compass` for the correct connection string
|
||||
|
||||
## 📈 Performance
|
||||
|
||||
gitzone is optimized for speed:
|
||||
@@ -412,6 +517,8 @@ gitzone is optimized for speed:
|
||||
- **Smart caching** to avoid redundant work
|
||||
- **Incremental updates** for meta repositories
|
||||
- **Minimal dependencies** for fast installation
|
||||
- **Isolated services** prevent resource conflicts
|
||||
- **Auto port assignment** eliminates manual configuration
|
||||
|
||||
## License and Legal Information
|
||||
|
||||
@@ -430,4 +537,4 @@ Registered at District court Bremen HRB 35230 HB, Germany
|
||||
|
||||
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
|
||||
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
||||
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
|
Reference in New Issue
Block a user