feat(segkit): add Rust CLI skeleton with testing and CI#50
Merged
Conversation
Scaffold the segkit CLI tool — a Rust-based toolkit for Segment SDK project generation and bug reproduction workflows. This is the structural skeleton with command parsing, SDK registry, and utility modules, ready for implementation. Skeleton structure: - commands/: init and repro subcommands with clap argument parsing - sdks/: SDK registry with metadata for Swift, Kotlin, React Native - utils/: external CLI detection, git ref resolution (ls-remote) Testing: - 10 unit tests (registry validation, version sorting, CLI detection) - 9 integration tests (CLI argument parsing, help output, error cases) Infrastructure: - Rust toolchain (cargo, rustfmt, clippy) added to root devbox.json - treefmt.toml: rustfmt and clippy formatters for segkit/src/**/*.rs - CI: new "Segkit CLI" job in pr-checks.yml (fmt + clippy + test) - devbox scripts: segkit:build, segkit:test, segkit:clippy, segkit:fmt, segkit:check - .gitignore: **/target/ for Rust build artifacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Ubuntu CI runners have a pre-installed ~/.rustup toolchain that conflicts with the Nix-managed Rust from devbox. When devbox's cargo invokes clippy/rustfmt, the system rustup intercepts and tries to sync components, causing file rename errors. Fixes: - Remove system rustup in the Segkit CI job before running devbox - Remove rustfmt/clippy from treefmt.toml — they are project-level tools that don't fit treefmt's per-file model and were triggering the same rustup conflict in the Lint job. Rust checks now run exclusively in the dedicated Segkit CLI CI job. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove all command implementations (init, repro), SDK registry, and utility modules. Keep only a minimal clap CLI that prints the version — clean foundation for incremental implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cd3298e to
6c3865d
Compare
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.
Summary
pr-checks.ymlsegkit:build,segkit:test,segkit:clippy,segkit:fmt,segkit:check)cargo,rustfmt,clippy) to root devbox packagesWhat's in the skeleton
CI changes
pr-checks.yml(fmt check + clippy + cargo test)Test plan
devbox run segkit:checkpasses locally (fmt + clippy + 3 tests)devbox run lintpasses (treefmt unchanged)🤖 Generated with Claude Code