Skip to content

feat(peek-cli): peek connect add --local for local connector builds#153

Merged
harry-harish merged 2 commits into
mainfrom
feat/connect-add-local
Jul 9, 2026
Merged

feat(peek-cli): peek connect add --local for local connector builds#153
harry-harish merged 2 commits into
mainfrom
feat/connect-add-local

Conversation

@harry-harish

Copy link
Copy Markdown
Member

Summary

  • Adds --local <path> flag to peek connect add as sugar for registering a locally-built connector without npm publish
  • --local <path> resolves the path to absolute (via resolve(process.cwd(), path)) and desugars to command: 'node', args: [absPath] — identical to the verbose --command node --args=/abs/dist/index.js form
  • Mutual exclusion: --local combined with --command or --args prints a clear conflict message to stderr and returns 1
  • USAGE string updated with a one-line description of the new flag
  • packages/connector-slack/README.md gains a "Run from a local build" section documenting the 3-step flow (buildconnect add slack --localconnect start) plus keychain/env inheritance notes
  • Changeset: @peekdev/cli minor

Local connector flow

# 1. Build the connector
pnpm --filter @peekdev/connector-slack build

# 2. Register it — --local resolves the path and sets command=node
peek connect add slack --local packages/connector-slack/dist/index.js

# 3. Start the daemon
peek connect start

This replaces the previous verbose form:

peek connect add slack --command node --args=/abs/path/to/dist/index.js

Test plan

  • TDD: new tests written failing first, then implementation made them green
  • --local resolves to absolute path, sets command=node, args=[absPath]
  • --local + --command → returns 1 + stderr conflict message
  • --local + --args → returns 1 + stderr conflict message
  • plain add slack (no --local) unchanged
  • Full peek-cli suite: 385 tests, 0 failures
  • Full repo: build, typecheck, lint, test all green

🤖 Generated with Claude Code

Sugar for registering a locally-built connector: --local <path> resolves to
an absolute path and desugars to --command node --args=<abs path>. Mutual
exclusion enforced: --local + --command or --local + --args prints a clear
error and returns 1. USAGE updated; connector-slack README gains a local-build
section. Changeset: @peekdev/cli minor.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: harry-harish <22562634+harry-harish@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@harry-harish, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7e74ffde-ed4c-4559-9d47-d1317debcf7d

📥 Commits

Reviewing files that changed from the base of the PR and between 0bc4cff and 4e57df4.

📒 Files selected for processing (4)
  • .changeset/peek-cli-connect-add-local.md
  • packages/connector-slack/README.md
  • packages/peek-cli/src/commands/connect.test.ts
  • packages/peek-cli/src/commands/connect.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/connect-add-local

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.

@harry-harish

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Replace POSIX-only startsWith('/') and endsWith(relPath) checks with
isAbsolute() and resolve(cwd, relPath) equality, which are correct on
both POSIX and Windows (drive-letter paths + backslash separators).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: harry-harish <22562634+harry-harish@users.noreply.github.com>
@harry-harish

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@harry-harish

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 10 minutes.

@harry-harish

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 9 minutes.

@harry-harish harry-harish merged commit 5260d54 into main Jul 9, 2026
7 checks passed
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