CMDR Documentation¶
CMDR is a simple command version management tool that helps you quickly switch between multiple command versions.
What is CMDR?¶
CMDR (Command Manager) solves a common developer problem: managing multiple versions of CLI tools. Whether you need different versions of node, python, go, or any other command-line tool, CMDR provides a unified interface to:
- Install commands from URLs or local paths
- Switch between different versions seamlessly
- List all installed versions of a command
- Activate/Deactivate specific versions
Quick Example¶
# Install a command version
cmdr command install -n kubectl -v 1.28.0 -l https://dl.k8s.io/release/v1.28.0/bin/linux/amd64/kubectl
# List installed versions
cmdr command list -n kubectl
# Switch to a specific version
cmdr command use -n kubectl -v 1.28.0
Key Features¶
- Version Management: Install and switch between multiple versions of any command
- URL Replacement: Speed up downloads by configuring proxy URLs1
- Self-Upgrade: Update CMDR itself with a single command
- Cross-Platform: Works on Linux and macOS
Documentation Structure¶
| Section | Description |
|---|---|
| Getting Started | Installation and first steps |
| Architecture | System design and internals |
| Components | Detailed component documentation |
| API | Interface and configuration reference |
| Operations | Build, test, and release processes |
Technology Stack¶
CMDR is built with Go 1.25 and uses:
- Cobra - CLI framework2
- Viper - Configuration management2
- Storm - BoltDB wrapper for data persistence3
- go-getter - URL-based file fetching4
-
See URL replacement feature in
cmd/root.goL166-L179 ↩ -
CLI setup in
cmd/root.goL20-L56 ↩↩ -
Database initialization in
cmd/root.goL147-L164 ↩ -
Fetcher implementation in
core/fetcher/go_getter.go↩