Skip to content

CLI: adopt ubt as the canonical command - #38

Merged
sraodev merged 1 commit into
masterfrom
feature/ubt-command
Sep 5, 2026
Merged

sraodev merged 1 commit into
masterfrom
feature/ubt-command

Conversation

@sraodev

@sraodev sraodev commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Why

ubtctl is longer than the rest of the project vocabulary and reads like an administrative-only control command. ubt is the shorter canonical command for new users while the existing ubtctl name remains compatible through all 0.x releases.

Closes #36.

What changed

  • derives the presentation name from the executable basename: ubtctl preserves the legacy name and every other basename presents as ubt
  • builds both bin/ubt and bin/ubtctl from the existing ./cli/ubtctl source package
  • preserves the invoked name in help, errors, version output, AI prompt context, logs, and MCP serverInfo
  • adds the migration note only to legacy root help; normal commands emit no migration warning
  • updates CI, smoke coverage, examples, MCP configuration, and current documentation to use ubt
  • preserves historical verification records and keeps the Go source path unchanged

Execution 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 diagnostic
Loading

Code-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]
Loading

Review boundaries

  • no source-directory rename
  • no per-command package split
  • no new dependency
  • no warning on ordinary ubtctl commands
  • no rewrite of docs/VERIFICATION.md historical command captures

Validation

  • gofmt -l .
  • go vet ./...
  • go test -race ./...
  • go build ./...
  • explicit builds of bin/ubt, bin/ubtctl, and bin/ubtd
  • GOOS=windows GOARCH=amd64 go build -o /tmp/ubt.exe ./cli/ubtctl
  • python3 scripts/smoke.py
  • python3 -m unittest discover -s examples/chat -p 'test_*.py' -v
  • git diff --check

@sraodev
sraodev merged commit c8effda into master Sep 5, 2026
2 checks passed
@sraodev
sraodev deleted the feature/ubt-command branch September 5, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: adopt ubt as the canonical command with ubtctl compatibility

1 participant