57af1512d1701d74bbc91055b02b0bb95ba46a68
- Add role commands: list, get, create, update, delete, set/add/remove-permissions - Add permission list command - Add project commands: list, get, create, update, delete, members, add/remove-member - Add milestone commands: list, get, create, update, delete, progress - Add task commands: list, get, create, update, transition, take, delete, search - Wire all new command groups into main.go dispatcher - All commands support --json output mode and --token manual auth - Passes go build and go vet cleanly
HarborForge.Cli
HarborForge.Cli is the Go-based hf binary for HarborForge.
Build
go build -o ./bin/hf ./cmd/hf
To set the version at build time:
go build -ldflags "-X git.hangman-lab.top/zhi/HarborForge.Cli/internal/commands.Version=1.0.0" -o ./bin/hf ./cmd/hf
Run
# Show help
./bin/hf --help
# Show only permitted commands
./bin/hf --help-brief
# Show version
./bin/hf version
# Check API health
./bin/hf health
# Configure API URL
./bin/hf config --url http://your-harborforge:8000
# View current config
./bin/hf config
# JSON output
./bin/hf version --json
Package Layout
cmd/hf/ CLI entrypoint
internal/
client/ HTTP client wrapper for HarborForge API
commands/ Command implementations (version, health, config, auth helpers)
config/ Config file resolution and management (.hf-config.json)
help/ Help and help-brief renderer
mode/ Runtime mode detection (padded-cell vs manual)
output/ Output formatting (human-readable, JSON, tables)
passmgr/ pass_mgr integration for secret resolution
Runtime Modes
- Padded-cell mode: When
pass_mgris available, auth tokens are resolved automatically. Manual--tokenflags are rejected. - Manual mode: When
pass_mgris not available,--tokenmust be provided explicitly to authenticated commands.
Current Status
Implemented:
- Go module and binary entrypoint
- Config file resolution relative to binary directory
- Runtime mode detection (
pass_mgrpresent/absent) - Top-level and group/leaf help rendering system (
--help/--help-brief/not permittedstubs) - Permission-aware command visibility via
/auth/me/permissionswhen a token is available - HTTP client wrapper
- Output formatting (human-readable +
--json) hf version,hf health,hf config- Auth token resolution (padded-cell + manual)
Planned:
- User, role, project, task, milestone, meeting, support, propose, monitor commands
- Rich per-command help/usage text beyond the current stub renderer
Description
Languages
Go
99.7%
Makefile
0.3%