Skip to content

Commit 13a9ffb

Browse files
chuongld20claude
andcommitted
chore: bump version to v1.0.0, add CHANGELOG and CONTRIBUTING
Phase 4 release preparation: - Version 1.0.0 in main.go - CHANGELOG.md covering all phases (v0.1.0 through v1.0.0) - CONTRIBUTING.md with dev setup, code style, and PR process - CLAUDE.md updated with Phase 4 packages (plugin, registry, ci) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f3e54ca commit 13a9ffb

4 files changed

Lines changed: 160 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Changelog
2+
3+
All notable changes to devbox are documented in this file.
4+
5+
Format follows [Keep a Changelog](https://keepachangelog.com/).
6+
7+
## [1.0.0] - 2026-04-13
8+
9+
### Added
10+
- **Plugin system** (`internal/plugin/`): Provider and Hook interfaces for extending devbox with custom backends (Docker, Podman, LXC) and lifecycle hooks
11+
- **Built-in Docker provider** (`internal/plugin/docker/`): Default provider plugin shipping with devbox
12+
- **External plugin support**: Discover, install, and remove third-party plugins from local directories with manifest validation
13+
- **Community template registry** (`internal/registry/`): Search, pull, and push workspace templates to remote registries
14+
- **CI/CD integration** (`internal/ci/`): GitHub Actions support for PR preview workspaces with commit status checks
15+
- **GitHub Action** (`action.yml`): Reusable `devbox-preview` action for automated PR preview workflows
16+
- **Preview workflow** (`.github/workflows/preview.yml`): Example workflow for PR preview lifecycle
17+
- Plugin CLI commands: `devbox plugin list|install|remove`
18+
- Template registry CLI commands: `devbox template search|pull|push`
19+
- CI/CD CLI commands: `devbox ci preview-up|preview-down`
20+
- Plugin API documentation (`docs/PLUGIN_API.md`)
21+
- New built-in templates: Django, Rust
22+
23+
## [0.3.0] - 2026-04-12
24+
25+
### Added
26+
- **TUI dashboard** (`internal/tui/`): Interactive terminal UI with Bubble Tea — workspace list, real-time logs viewer, keyboard navigation
27+
- **Workspace templates** (`internal/template/`): Built-in and user-defined YAML templates (Go, Python, Node.js, Rails, Laravel, Next.js)
28+
- **Snapshot & restore** (`internal/snapshot/`): Save and restore workspace state via Docker volume tar archives
29+
- **Resource metrics** (`internal/metrics/`): CPU, memory, disk, and network I/O collection per workspace and server
30+
- CLI commands: `devbox tui`, `devbox template list|create`, `devbox snapshot|restore`, `devbox stats`
31+
32+
## [0.2.0] - 2026-04-11
33+
34+
### Added
35+
- **User isolation** (`internal/identity/`): Tailscale login-based identity resolution, user-scoped workspace naming
36+
- **Port auto-allocation** (`internal/port/`): Registry with conflict detection and range-based allocation
37+
- **Docker resource limits** (`internal/workspace/`): CPU and memory constraints per workspace
38+
- **Server pool management** (`internal/server/`): Add/remove/list servers, health checks, least-loaded selection
39+
- **Multi-server distribution**: Automatic workspace placement across server pools
40+
- **Multi-user integration tests** (`internal/integration/`): E2E test suite with build tag isolation
41+
- CLI commands: `devbox server add|remove|list`
42+
43+
## [0.1.0] - 2026-04-10
44+
45+
### Added
46+
- **CLI skeleton** (`cmd/devbox/`): Cobra-based CLI with `up`, `stop`, `list`, `destroy`, `ssh` commands
47+
- **Config parsing** (`internal/config/`): `devbox.yaml` with validation, services, ports, environment variables
48+
- **SSH executor** (`internal/ssh/`): Remote command execution via native SSH
49+
- **Docker Compose manager** (`internal/docker/`): Workspace lifecycle via `docker compose` over SSH
50+
- **Tailscale integration** (`internal/tailscale/`): Serve/unserve workspaces, status queries
51+
- **Workspace manager** (`internal/workspace/`): Orchestration layer wiring SSH, Docker, and Tailscale
52+
- **Devcontainer support**: `.devcontainer/devcontainer.json` fallback config loading
53+
- **`devbox init`**: Interactive project setup with compose file conversion
54+
- **`devbox doctor`**: Health checks for Docker, Tailscale, SSH connectivity
55+
- **Structured error handling** (`internal/errors/`): Typed errors with suggestions
56+
- **CLI UX polish** (`internal/ui/`): Spinners, colored output, `--no-color` flag
57+
- **Cross-compilation**: Makefile and GitHub Actions release workflow for linux/darwin amd64/arm64

CLAUDE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ Go CLI tool that turns any Linux machine into a ready-to-use dev environment in
1313
- `internal/template/` — Workspace templates system (built-in + user-defined, YAML-based)
1414
- `internal/snapshot/` — Snapshot & restore workspace state (Docker volumes, compressed tar archives)
1515
- `internal/metrics/` — Resource metrics collector (CPU, memory, disk, network I/O per workspace/server)
16+
- `internal/plugin/` — Plugin system with Provider/Hook interfaces, registry, external plugin discovery
17+
- `internal/plugin/docker/` — Built-in Docker provider plugin
18+
- `internal/registry/` — Community template registry (search/pull/push to remote registries)
19+
- `internal/ci/` — CI/CD integration (GitHub Actions PR preview workspaces)
1620
- `internal/integration/` — Multi-user integration tests (build tag: integration)
1721
- `internal/testutil/` — Shared test helpers for SSH, Docker, assertions
1822
- `.claude/specs/` — Product vision and design documents
1923

2024
## Key Patterns
2125
- **Cobra CLI**: All commands defined as funcs returning `*cobra.Command`, wired in `main()`
22-
- **Interface-driven**: `workspace.Manager`, `tailscale.Manager`, `identity.Resolver`, `port.Registry`, `server.Pool`, `metrics.Collector`, `snapshot.Manager` define contracts
26+
- **Interface-driven**: `workspace.Manager`, `tailscale.Manager`, `identity.Resolver`, `port.Registry`, `server.Pool`, `metrics.Collector`, `snapshot.Manager`, `plugin.Provider`, `plugin.Hook` define contracts
2327
- **Config**: Per-project `devbox.yaml` parsed into `DevboxConfig` struct with yaml tags; `name` and `server` are required fields
2428
- **Error wrapping**: `fmt.Errorf("context: %w", err)` for all error propagation
2529
- **Single binary**: No runtime dependencies, cross-compile with `GOOS`/`GOARCH`
@@ -39,6 +43,9 @@ go vet ./... # Lint
3943
./devbox server add|remove|list # Server pool management
4044
./devbox tui # Interactive TUI dashboard
4145
./devbox template list|create # Workspace templates
46+
./devbox template search|pull|push # Community template registry
4247
./devbox snapshot|restore # Snapshot & restore workspace state
4348
./devbox stats [workspace] # Resource metrics
49+
./devbox plugin list|install|remove # Plugin management
50+
./devbox ci preview-up|preview-down # CI/CD PR preview workspaces
4451
```

CONTRIBUTING.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Contributing to devbox
2+
3+
Thanks for your interest in contributing to devbox! This guide covers everything you need to get started.
4+
5+
## Development Setup
6+
7+
**Requirements:** Go 1.24+
8+
9+
```bash
10+
git clone https://github.com/junixlabs/devbox.git
11+
cd devbox
12+
go build -o devbox ./cmd/devbox/
13+
go test ./...
14+
```
15+
16+
## Project Structure
17+
18+
```
19+
cmd/devbox/ CLI entry point — all commands in main.go
20+
internal/
21+
config/ devbox.yaml parsing and validation
22+
workspace/ Workspace model, Manager interface, resource limits
23+
ssh/ SSH remote command executor
24+
docker/ Docker Compose management via SSH
25+
tailscale/ Tailscale serve/unserve/status
26+
identity/ User identity resolution (Tailscale login)
27+
server/ Server pool management
28+
port/ Port auto-allocation registry
29+
metrics/ Resource metrics collector
30+
snapshot/ Snapshot & restore workspace state
31+
template/ Workspace templates (built-in + user-defined)
32+
tui/ Interactive TUI dashboard (Bubble Tea)
33+
plugin/ Plugin system (Provider/Hook interfaces)
34+
registry/ Community template registry
35+
ci/ CI/CD integration (GitHub Actions)
36+
errors/ Typed errors with suggestions
37+
ui/ CLI output helpers (spinners, colors)
38+
testutil/ Shared test helpers
39+
integration/ Multi-user E2E tests
40+
```
41+
42+
## Adding a New Command
43+
44+
1. Create a function `yourCmd() *cobra.Command` in `cmd/devbox/main.go`
45+
2. Wire it: `rootCmd.AddCommand(yourCmd())`
46+
3. Follow existing patterns — use `RunE` (not `Run`), wrap errors with `fmt.Errorf("devbox your-cmd: %w", err)`
47+
48+
## Adding a New Package
49+
50+
1. Create `internal/yourpkg/yourpkg.go`
51+
2. Define an interface for the contract
52+
3. Implement the interface
53+
4. Import from CLI in `main.go`
54+
55+
## Adding a Config Field
56+
57+
1. Add to `DevboxConfig` struct in `internal/config/config.go` with a `yaml` tag
58+
2. Add validation in `Load()` if needed
59+
3. Update `devbox.yaml.example`
60+
61+
## Writing Plugins
62+
63+
See [docs/PLUGIN_API.md](docs/PLUGIN_API.md) for the full plugin development guide.
64+
65+
Plugins implement `plugin.Provider` (custom workspace backends) or `plugin.Hook` (lifecycle callbacks). Create a directory with a `plugin.yaml` manifest and a Go binary, then install with `devbox plugin install <path>`.
66+
67+
## Contributing Templates
68+
69+
Templates are YAML files in `internal/template/builtin/`. To add a new built-in template:
70+
71+
1. Create `internal/template/builtin/yourtemplate.yaml`
72+
2. Follow the schema from existing templates (name, image, services, ports)
73+
3. Register it in the built-in embed
74+
75+
To share templates via the community registry, use `devbox template push`.
76+
77+
## Code Style
78+
79+
- **Error wrapping**: Always use `fmt.Errorf("context: %w", err)`
80+
- **Naming**: Go conventions — CamelCase exports, lowercase packages
81+
- **Interfaces**: Define contracts before implementations
82+
- **Tests**: Every package should have `_test.go` files
83+
- **No runtime dependencies**: Single binary, cross-compile friendly
84+
85+
## Pull Request Process
86+
87+
1. Fork and create a feature branch
88+
2. Make your changes with tests
89+
3. Run `go test ./...` and `go vet ./...`
90+
4. Submit a PR with a clear description of what and why
91+
92+
## License
93+
94+
By contributing, you agree that your contributions will be licensed under the project's license.

cmd/devbox/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
)
3434

3535
var (
36-
version = "0.3.0"
36+
version = "1.0.0"
3737
verbose bool
3838
noColor bool
3939
)

0 commit comments

Comments
 (0)