CLI: adopt ubt as the canonical command - #38
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ubtctlis longer than the rest of the project vocabulary and reads like an administrative-only control command.ubtis the shorter canonical command for new users while the existingubtctlname remains compatible through all0.xreleases.Closes #36.
What changed
ubtctlpreserves the legacy name and every other basename presents asubtbin/ubtandbin/ubtctlfrom the existing./cli/ubtctlsource packageserverInfoubtExecution sequence
sequenceDiagram actor User participant Binary as ubt or ubtctl participant Main as main.go participant App as App and command registry participant Command as Selected command participant Daemon as ubtd User->>Binary: invoke command Binary->>Main: os.Args[0] and arguments Main->>Main: normalize basename Note over Main: ubtctl stays ubtctl<br/>all other names become ubt Main->>App: Run(context, arguments) App->>Command: execute with Invocation Command->>Daemon: typed request when needed Daemon-->>Command: typed response Command-->>User: stdout result App-->>User: invoked-name help or stderr diagnosticCode-review impact
flowchart LR A[main.go basename policy] --> B[App Invocation.ProgramName] B --> C[Help errors and version] B --> D[AI system prompt] B --> E[MCP serverInfo and logs] F[One cli/ubtctl implementation] --> A F --> G[Build bin/ubt] F --> H[Build bin/ubtctl] G --> I[Canonical docs and smoke tests] H --> J[0.x compatibility tests]Review boundaries
ubtctlcommandsdocs/VERIFICATION.mdhistorical command capturesValidation
gofmt -l .go vet ./...go test -race ./...go build ./...bin/ubt,bin/ubtctl, andbin/ubtdGOOS=windows GOARCH=amd64 go build -o /tmp/ubt.exe ./cli/ubtctlpython3 scripts/smoke.pypython3 -m unittest discover -s examples/chat -p 'test_*.py' -vgit diff --check