Skip to content

A collection of powerful CLI tools, scripts and templates for streamlined Git workflow, repository management, and shell productivity.

License

Notifications You must be signed in to change notification settings

xaoscience/dev-control

Dev-Control

GitHub repo GitHub release License

CI Status Issues Pull Requests Stars

Last Commit Shell Stability Maintenance


TL;DR

Dev-Control is a modular CLI toolkit that automates the tedious parts of your Git workflowβ€”so you can focus on code, not config.

# Install
git clone https://github.com/xaoscience/dev-control.git && cd dev-control && ./install.sh

# Use
dc init          # Set up a repo with templates, license, docs
dc repo          # Create a GitHub repo from your local project
dc pr            # Open a pull request in seconds
dc fix           # Rewrite/sign/clean commit history safely
dc modules       # Manage nested submodules automatically
dc licenses      # Audit license compliance across repos
dc mcp           # Configure AI coding assistants (MCP servers)
dc container     # Generate devcontainer.json for VS Code
dc package       # Build tarballs, Homebrew, Snap, Deb, Nix, Docker

If you've ever spent more time wrestling Git or setting up yet another repo than actually writing codeβ€”this is for you.


πŸ“‹ Table of Contents


πŸ’‘ Why Dev-Control?

Managing modern software projects involves a lot of repetitive housekeeping:

  • Initialising repos with consistent templates, licenses, and docs
  • Keeping submodules in sync across complex monorepos
  • Rewriting commit history to fix author dates or add GPG signatures
  • Auditing license compliance when you have dozens of dependencies
  • Spinning up devcontainers with the right mounts and settings
  • Packaging your tool for multiple platforms (Homebrew, Snap, Nix, Docker…)

Dev-Control bundles all of this into a single, modular CLI. Each command is designed to be:

Principle How
Safe Dry-run modes, automatic backup bundles, harness wrappers
Fast Batch processing, parallel operations, minimal dependencies
Extensible Plugin system, YAML config, themeable TUI
Portable Pure Bash 4+, no exotic runtime, runs anywhere Git runs

✨ Features at a Glance

Category What You Get
Repo Setup Template loading, license selection, README/CONTRIBUTING/SECURITY scaffolding, GitHub Actions workflows
Git Ops History rewriting with GPG signing, date preservation, conflict auto-resolution, worktree sync
Submodules Auto-generated .gitmodules, temp-folder consolidation, symlink pruning
Licensing SPDX detection, compatibility checking, bulk apply, JSON export
DevEx Devcontainer generation, MCP server setup (GitHub, StackOverflow, Firecrawl)
Packaging Tarball + SHA256, Homebrew formula, Snap YAML, Debian .deb, Nix flake, Docker + ttyd web terminal
TUI Themes Matrix, Hacker, Cyber aesthetics powered by Charmbracelet Gum

πŸš€ Quick Start

Prerequisites

  • Bash 4.0+ or Zsh
  • Git 2.0+
  • GitHub CLI (gh) for repo/PR commands
  • Optional: gum or fzf for interactive TUI; GPG for signing

Install

git clone https://github.com/xaoscience/dev-control.git
cd dev-control
./install.sh          # Adds `dc` to your PATH and installs aliases
source ~/.bashrc      # Or restart your shell

Verify

dc --version          # Should print v2.x.x
dc --help             # List all commands

πŸ”§ Core Commands

Below is a quick reference. Run dc <command> --help for full options.

dc init β€” Repository Initialisation

Populate a repo with docs, license, workflows, and GitHub templates.

dc init                     # Interactive mode
dc init -f docs/SECURITY.md # Update a specific file
dc init --batch /projects/* # Initialise multiple repos

dc repo β€” Create GitHub Repository

Push your local project to a new GitHub repo in one step.

dc repo                     # Interactive prompts
dc repo --private --topics cli,bash

dc pr β€” Pull Request Creator

Open a PR from your current branch with auto-detected metadata.

dc pr                       # Interactive
dc pr --draft --label bug

dc fix β€” History Rewriting

Safely rewrite commitsβ€”edit messages, sign, fix dates, drop commits.

dc fix                              # Interactive (last 10 commits)
dc fix --sign --range HEAD=all      # GPG-sign entire branch
dc fix --dry-run --range main..HEAD # Preview changes
dc fix --restore                    # Recover from backup bundle

dc modules β€” Submodule Management

Auto-generate .gitmodules for nested repos; consolidate temp folders.

dc modules /path/to/monorepo
dc modules --aggressive --dry-run   # Preview symlink + .gitignore changes

dc licenses β€” License Auditor

Detect, check compatibility, and apply licenses across repos.

dc licenses                         # Scan current repo
dc licenses --deep                  # Include submodules
dc licenses --check GPL-3.0         # Verify compatibility
dc licenses --apply MIT             # Apply license template

dc mcp β€” MCP Server Setup

Configure Model Context Protocol servers for AI coding assistants.

dc mcp                              # Interactive server selection
dc mcp --test                       # Verify GitHub MCP connection

dc container β€” Devcontainer Generator

Generate a complete .devcontainer/ setup for VS Code.

dc container                        # Interactive
dc container --image mcr.microsoft.com/devcontainers/base:ubuntu

dc package β€” Multi-Platform Packaging

Build distribution packages with a single command.

dc package --init                   # Create .dc-package.yaml
dc package --all                    # Build everything
dc package --docker --theme cyber   # Docker image with ttyd + theme

dc aliases β€” Shell Alias Installer

Add productivity aliases for Git, Docker, system monitoring, and more.

dc aliases                          # Interactive category selection
source ~/.bashrc

πŸ”Œ Plugin System

Extend Dev-Control with custom commands.

plugins/
└── my-plugin/
    β”œβ”€β”€ plugin.yaml       # name, version, description, commands
    └── commands/
        └── greet.sh      # becomes `dc greet`
dc plugin list                      # Show installed plugins
dc plugin install gh:user/repo      # Install from GitHub
dc plugin remove my-plugin

βš™οΈ Configuration

Dev-Control uses a layered config system (highest priority first):

  1. Environment variables (DC_*)
  2. Project config (.dc-init.yaml in repo root)
  3. Global config (~/.config/dev-control/config.yaml)
  4. Built-in defaults

Example .dc-init.yaml:

project-name: my-project
default-license: MIT
default-branch: main
auto-sign-commits: true
github-org: my-org

See config/example.dc-init.yaml for all options.


πŸ“š Documentation

Document Description
Installation Guide Detailed install & upgrade instructions
Contributing How to contribute
Code of Conduct Community guidelines
Security Policy Reporting vulnerabilities
Testing Guide Running and writing tests

Script Reference

Script Purpose
dev-control.sh Interactive main menu
template-loading.sh Template init logic
fix-history.sh History rewriting engine
module-nesting.sh Submodule management
licenses.sh License auditing
containerise.sh Devcontainer generator
packaging.sh Multi-platform packaging
mcp-setup.sh MCP server configuration

Shared Libraries

Located in scripts/lib/:

Library Purpose
colors.sh ANSI terminal colours
print.sh Formatted output (headers, boxes, spinners)
config.sh YAML config parsing
tui.sh Gum/fzf interactive prompts
validation.sh Input validation
git/*.sh Git utilities (dates, topology, worktrees, etc.)

🀝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md first.

# Fork β†’ Clone β†’ Branch β†’ Commit β†’ PR
git checkout -b feature/amazing-feature
git commit -m "Add amazing feature"
git push origin feature/amazing-feature

πŸ—ΊοΈ Roadmap

  • Unified dc CLI with command registry
  • Plugin system with GitHub install support
  • Multi-platform packaging (tarball, Homebrew, Snap, Deb, Nix, Docker)
  • MCP server configuration for AI assistants
  • License auditing with SPDX detection
  • Devcontainer generator
  • Zsh compatibility layer
  • Fish shell support
  • GUI wrapper (Bubble Tea / Tauri)
  • Remote plugin registry

See open issues for more.


πŸ“„ License

GPL-3.0. See LICENSE.


⬆️ Back to Top

About

A collection of powerful CLI tools, scripts and templates for streamlined Git workflow, repository management, and shell productivity.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages