DevTools is a lightweight, zero-dependency local infrastructure manager written in Go. It automatically downloads, configures, and manages portable instances of PostgreSQL and Redis directly inside your project directory—no Docker, manual downloads, or system-wide service installations required.
- 🚀 100% Automated Setup: Automatically downloads and provisions portable PostgreSQL and Redis binaries into
dev-services/. - 💬 Interactive CLI: Menu-driven interface when launched without flags to easily choose services.
- ⚡ Direct CLI Flags: Fast startup flags (
--all,--postgres,--redis). - 🌐 Cross-Platform: Full automated support for Windows, macOS (Apple Silicon & Intel), and Linux.
- ⚙️ Configurable Ports & URLs: Customize ports or binary download URLs via
.envor CLI flags. - 🛑 Clean Shutdown: Graceful Ctrl+C process handling to stop background services cleanly.
- 🪟 Windows: Fully tested and verified! Automatically downloads and provisions portable PostgreSQL and Redis zip packages into
dev-services/. - 🍏 macOS: Automatically downloads portable binaries into
dev-services/or integrates with existing system/Homebrew binaries. - 🐧 Linux: Automatically provisions portable binaries or integrates with system package binaries into
dev-services/.
Note
DevTools has been fully tested and verified on Windows.
If you encounter any issues, bugs, or have ideas for improvements across any operating system, contributions are warmly welcome!
- 🐛 Found a bug or issue? Please feel free to open an Issue.
- 🛠️ Want to contribute or submit a fix? Feel free to submit a Pull Request!
- Go 1.22+ (for building from source)
- Windows, macOS, or Linux environment
git clone https://github.com/Ra-Wo/dev-tools.git
cd dev-tools
go build -o dev-tools main.goRun dev-tools without flags to open the interactive selection menu:
./dev-tools
# On Windows: .\dev-tools.exe==================================================
DevTools - Local Infrastructure Launcher
==================================================
Select services to run:
[1] All Services (PostgreSQL + Redis)
[2] PostgreSQL only
[3] Redis only
[4] Exit
Enter option (1-4) [default: 1]:
Bypass the interactive menu by supplying command-line flags:
# Start all services (PostgreSQL + Redis)
./dev-tools --all
# Start PostgreSQL only
./dev-tools --postgres # Or: ./dev-tools -pg
# Start Redis only
./dev-tools --redis # Or: ./dev-tools -r
# Specify custom ports
./dev-tools --all -db-port 5433 -redis-port 6380
# View help menu
./dev-tools -hConfiguration can be set via .env file (copied from .env.example) or overridden via CLI flags:
| Environment Variable | Default | CLI Flag Override | Description |
|---|---|---|---|
DB_PORT |
5432 |
-db-port <port> |
PostgreSQL server port |
REDIS_PORT |
6379 |
-redis-port <port> |
Redis server port |
If specified in .env, dev-tools uses your custom download URLs; otherwise, it automatically falls back to default portable release URLs:
| Environment Variable | Description |
|---|---|
PG_URL |
Universal PostgreSQL binary download URL |
PG_WIN_URL |
Windows PostgreSQL binary download URL |
PG_MAC_URL |
macOS PostgreSQL binary download URL |
PG_LINUX_URL |
Linux PostgreSQL binary download URL |
REDIS_DOWNLOAD_URL |
Universal Redis binary download URL |
REDIS_WIN_URL |
Windows Redis binary download URL |
REDIS_MAC_URL |
macOS Redis binary download URL |
REDIS_LINUX_URL |
Linux Redis binary download URL |
Example .env file:
# Service Ports
DB_PORT=5432
REDIS_PORT=6379
# Optional Custom Binary Download URLs
# PG_URL=https://custom-domain.com/postgres.zip
# REDIS_DOWNLOAD_URL=https://custom-domain.com/redis-serverdev-tools/
├── main.go # Application entrypoint & CLI orchestrator
├── go.mod # Go module definition
├── go.sum # Go dependencies checksums
├── .env.example # Template environment configuration
├── .gitignore # Git ignore rules
├── README.md # Project documentation
├── src/ # Source code packages
│ ├── config/ # Environment parsing & download URL configuration
│ ├── downloader/ # HTTP file downloading, Zip/Tar extraction & permissions
│ ├── menu/ # Interactive CLI menu & help documentation
│ └── services/ # PostgreSQL & Redis provisioning, binary discovery & process managers
└── dev-services/ # Portable binaries & database storage (created automatically)
├── postgres/ # PostgreSQL binaries & data cluster
└── redis/ # Redis binaries
MIT License