godev π

Less boilerplate, more building.
The all-in-one command center and project scaffolder for modern Go development.
π‘ Why godev?
As a Go novice, I was once overwhelmed by the 'preliminary chores'. From choosing between go fmt and gofumpt to configuring golangci-lint and better project structures, various CLI commands like gofumpt -w ., golangci-lint run ./..., go mod tidy, etc. Every new project felt like a tedious loop of 'copy-paste' from the last one. I thought I need a tool that just worked and I don't like to use Makefile, so I built godev. It's born to free you from these chores, so you can focus on what matters: writing your code.
It provides a unified CLI to:
- Manage: A single entry point for project init, testing, linting, building, and releasing.
- Diagnose: A "Doctor" that doesn't just find issues, but understands Go development environments.
- Scaffold: Initialize modern Go project with preset template and configuration.
β¨ Key Features
- π¦ One-Stop Scaffolding: Create Go projects following best practices (
.golangci.yml, go.mod, etc.).
- π©Ί Interactive Doctor: Comprehensive health checks for your Go version, modules, and toolchain.
- π οΈ Unified Workflow: Integrated commands for unit and integration tests, stop remembering complex flags.
- βοΈ Standardized Tooling: Automatically set up VS Code settings,
gofumpt, and golangci-lint.
π¦ Installation
Using Go Install (Recommended)
go install github.com/thought2code/godev@latest
Building from Source
git clone https://github.com/thought2code/godev.git
cd godev
go build -o godev main.go
Prerequisites
- Go 1.25 or later (latest stable recommended)
π Usage
1. Initialize a New Project
Don't waste time on folder structures.
# Initialize in current directory
godev init
# Initialize with project name
godev init myproject
# Initialize in specific directory
godev init /path/to/myproject
The init command creates a new Go project with:
- Pre-configured VS Code settings
.gitignore file
golangci-lint-v2 configuration
- Latest Go module setup
- Professional project structure
2. Check Environment Health
Is your GOPATH messed up? Are you missing tools?
godev doctor
The doctor command diagnoses your development environment:
- Validates Go module file (
go.mod)
- Checks Go version compatibility
- Verifies essential Go tools installation
- Provides actionable remediation advice
3. Smart Testing
No more long, messy go test ./... flags.
godev test unit # Run unit tests
godev test unit -v # Run unit tests with verbose output
godev test unit -c # Run unit tests with coverage and save the cover profile
godev test unit --html # Run unit tests with coverage and open report in your browser
godev test integ # Run integration tests
π Project Structure
When you initialize a new project, godev creates:
myproject/
βββ .vscode/
β βββ extensions.json # Recommended VS Code extensions
β βββ launch.json # Debug configuration
β βββ settings.json # Recommended VS Code settings
βββ .gitignore # Git ignore rules
βββ .golangci.yml # Linting configuration
βββ go.mod # Go module file
βββ README.md # Project documentation
π Commands Reference
| Command |
Description |
Example |
godev |
Show help information |
godev |
godev init [project] |
Initialize new Go project |
godev init myapp |
godev doctor |
Diagnose development environment |
godev doctor |
godev test unit |
Run unit tests |
godev test unit |
godev test integ |
Run integration tests |
godev test integ |
godev automatically set up and recommend these essential Go development tools:
βοΈ Configuration
VS Code Integration
The generated .vscode/settings.json includes:
- Go extension configuration
- Format on save with gofumpt
- Auto-import organization
- Linting integration
Linting Configuration
The .golangci.yml file provides:
- Comprehensive linter rules
- Performance optimizations
- Custom rule configurations
ποΈ Project Architecture
The project follows a clean architecture:
godev/
βββ cmd/ # CLI commands
β βββ root.go # Root command setup
β βββ init.go # Project initialization
β βββ doctor.go # Environment diagnostics
β βββ tools.go # Go tools management
β βββ test.go # Testing commands
βββ internal/ # Internal packages
β βββ osutil/ # OS utilities (filesystem, exec, etc.)
β βββ strconst/ # String constants
β βββ tui/ # Terminal UI utilities (colorized output, etc.)
βββ template/ # Preset project templates
βββ main.go # Application entry point
Contributing π€
We welcome and appreciate contributions β€οΈ
Development Setup
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/godev.git
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Run tests:
go test ./...
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
π¬ Support
π License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.