Skip to content

Comments

refactor: split commands.go into per-command files#40

Merged
ourines merged 1 commit intomainfrom
refactor/issue-18-split-commands
Feb 18, 2026
Merged

refactor: split commands.go into per-command files#40
ourines merged 1 commit intomainfrom
refactor/issue-18-split-commands

Conversation

@ourines
Copy link
Owner

@ourines ourines commented Feb 18, 2026

Summary

Files

File Contents
version.go Version vars, RunVersion, RunClaudeUpdate, RunSelfUpdate, checkForUpdates
select.go RunSelect, RunClaudeWithConfig, runClaudeInDirectory
install.go InstallClaude, installBinary, installShellCompletion, appendCompletionLine
add.go RunAdd
init_cmd.go RunInit
start.go RunStart
project_cmd.go RunProject* functions
profile.go RunTest, testSingleConfiguration, RunProfileList, RunProfileRemove
config_cmd.go RunConfig*, RunDefaultBehavior*, RunSkipPermissions*, RunTerminal*
remote_cmd.go parseSSHAddress, RunRemote* functions
serve.go RunServe, RunHTTPServer

Test plan

  • go vet ./internal/commands/... — clean
  • go build -o /dev/null ./cmd/codes — success
  • go test ./internal/commands/... -v -count=1 — all tests pass

Split the 2354-line monolithic commands.go into 11 focused files:
- version.go: Version vars, RunVersion, RunClaudeUpdate, RunSelfUpdate, checkForUpdates
- select.go: RunSelect, RunClaudeWithConfig, runClaudeInDirectory
- install.go: InstallClaude, installBinary, installShellCompletion, appendCompletionLine
- add.go: RunAdd
- init_cmd.go: RunInit
- start.go: RunStart
- project_cmd.go: RunProject* functions
- profile.go: RunTest, testSingleConfiguration, testAllConfigurations, RunProfileList/Remove
- config_cmd.go: RunConfig*, RunDefaultBehavior*, RunSkipPermissions*, RunTerminal*
- remote_cmd.go: parseSSHAddress, RunRemote* functions
- serve.go: RunServe, RunHTTPServer

No behavior changes. Build and all tests pass.
@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Warning

Rate limit exceeded

@ourines has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/issue-18-split-commands

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ourines ourines merged commit 44d104e into main Feb 18, 2026
3 checks passed
@ourines ourines deleted the refactor/issue-18-split-commands branch February 18, 2026 08:10
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.

refactor: split commands.go into per-command files

1 participant