Skip to content

feat(cli): TurboDocx CLI wrapping Go SDK#22

Draft
nicolasiscoding wants to merge 5 commits intomainfrom
feat/cli-scaffold
Draft

feat(cli): TurboDocx CLI wrapping Go SDK#22
nicolasiscoding wants to merge 5 commits intomainfrom
feat/cli-scaffold

Conversation

@nicolasiscoding
Copy link
Copy Markdown
Member

Summary

  • New packages/cli/ — Go + Cobra CLI wrapping the existing Go SDK for TurboSign digital signatures
  • Single binary, zero runtime deps, 6-platform cross-compilation via GoReleaser
  • TDD: 35 tests with mock SDK client injection, all passing

What's included

  • Config: ~/.turbodocx/config.json with flag > env > file resolution priority
  • Sign commands: send, review, status, download, void, resend, audit
  • Login: Interactive + non-interactive credential setup
  • Output: Human (colored), JSON (--json), plain (--plain) modes
  • Shell completion: bash/zsh/fish/powershell
  • CI: test-cli job added to GitHub Actions
  • GoReleaser: linux/darwin/windows × amd64/arm64 + Homebrew tap

Architecture

packages/cli/
├── main.go                    # Entry point (ldflags: version/commit)
├── cmd/
│   ├── root.go                # Persistent flags, config resolution
│   ├── version.go / completion.go / config.go / login.go
│   ├── cmdutil/cmdutil.go     # Shared state (avoids circular imports)
│   └── sign/
│       ├── sign.go            # SignClient interface + factory
│       ├── status.go / download.go / audit.go
│       ├── send.go / review.go / void.go / resend.go
│       └── *_test.go          # Mock-based tests per command
├── internal/
│   ├── config/                # Load/Save config with 0600 perms
│   └── output/                # JSON, table, key-value formatters
└── .goreleaser.yaml

Test plan

  • go test -v ./... — 35 tests passing
  • go build -v . — binary builds successfully
  • ./turbodocx version — prints version info
  • Manual test: turbodocx login, turbodocx sign status <id>
  • CI: verify test-cli job passes

Follow-up PRs

  • PR 2: partner commands (org/user/apikey CRUD)
  • PR 3: npm wrapper package for npx turbodocx

🤖 Generated with Claude Code

nicolasiscoding and others added 5 commits March 12, 2026 22:51
Go + Cobra CLI for TurboSign digital signatures. Single binary, zero runtime deps.

Implements:
- Config management (load/save ~/.turbodocx/config.json, flag > env > file priority)
- All sign commands: send, review, status, download, void, resend, audit
- Login flow (interactive + non-interactive)
- JSON/plain output modes for scripting
- Shell completion (bash/zsh/fish/powershell)
- GoReleaser config for 6-platform cross-compilation
- CI job in GitHub Actions
- 35 tests with mock SDK client injection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Triggers on `cli-v*` release tags. Runs tests, then cross-compiles
6 binaries (linux/darwin/windows × amd64/arm64) via GoReleaser
and uploads to GitHub Releases + Homebrew tap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`brew install turbodocx/tap/cli` instead of `turbodocx/tap/turbodocx`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CLAUDE.md: add CLI to package listing and build commands
- README.md: add CLI section with install and usage examples
- docs/ARCHITECTURE.md: add CLI design, package layout, testing
- .claude/rules/cli.md: new CLI-specific development rules
- .claude/rules/cross-sdk-parity.md: add CLI column to parity matrix
- .claude/rules/testing.md: add CLI testing patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement all TurboPartner partner management commands mirroring the
cmd/sign/ patterns: PartnerClient interface, mock injection, TDD with
59 tests covering human/JSON output and error cases.

Commands: partner org {create,list,get,update,delete,entitlements},
partner org user {list,add,update,remove,resend-invite},
partner org apikey {list,create,update,revoke},
partner apikey {list,create,update,revoke},
partner user {list,add,update,remove,resend-invite},
partner audit list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant