Anonymous - 2026-06-12

Originally posted by: coderabbitai[bot]

Review Change Stack

[!NOTE]

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:
- @coderabbitai resume to resume automatic reviews.
- @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:
- [ ] ▶️ Resume reviews
- [ ] 🔍 Trigger review

📝 Walkthrough ## Walkthrough Adds a new AlterSend CLI app: runtime/type bindings and config, a paparam-based executable, join-code/QR/progress helpers, five commands (send, receive, peek, check-update, update), TypeScript/Vitest config, package manifest, README, and root npm scripts for building/testing the CLI. ## Changes **AlterSend CLI Application** |Layer / File(s)|Summary| |---|---| |**Runtime foundation & Configuration**
`apps/cli/src/types.d.ts`, `apps/cli/src/runtime.ts`, `apps/cli/package.json`, `apps/cli/tsconfig.json`, `apps/cli/vitest.config.ts`|Ambient typings for `pear-runtime`, `which-runtime`, and `paparam`; createCliRuntime that instantiates PearRuntime and worker client with platform storage selection and lock-retry; CLI package manifest and TypeScript/test config.| |**CLI entrypoint & Utilities**
`apps/cli/src/index.ts`, `apps/cli/src/joinCode.ts`, `apps/cli/src/progress.ts`, `apps/cli/src/qr.ts`|Node executable using `paparam` that parses/dispatches subcommands; join-code extraction/validation (64-hex chars); throttled single-line progress rendering; TTY-aware QR display.| |**Send command**
`apps/cli/src/commands/send.ts`|Validates file paths and safety, hosts a transfer (client.host), optionally renders QR, waits for peer, shares files, reports progress, and handles SIGINT and error teardown.| |**Receive command**
`apps/cli/src/commands/receive.ts`|Validates/extracts join code, ensures output dir, connects via worker client, converts offers to download requests, updates progress UI, handles interruption, and manages lifecycle.| |**Peek, Check-Update & Update commands**
`apps/cli/src/commands/peek.ts`, `apps/cli/src/commands/check-update.ts`, `apps/cli/src/commands/update.ts`|Peek lists offered files without downloading; check-update waits up to 5s for updater notification; update applies staged updates immediately or after waiting up to 10s, all with event/timeouts and teardown.| |**Documentation & root scripts**
`apps/cli/README.md`, `CLAUDE.md`, `package.json`|Adds comprehensive CLI README (usage, architecture, storage, maintainer steps), CLI subsection in CLAUDE.md listing `cli:build`, `cli:dev`, `cli:test`, and three root npm scripts to build/run/test the CLI.| ## Sequence Diagram(s) :::mermaid sequenceDiagram participant User participant CLI as index.ts participant Command as Command Module participant Runtime as createCliRuntime participant Pear as PearRuntime participant Worker as WorkerClient participant Peer User->>CLI: npm run cli:dev send file.txt CLI->>Command: dispatch send(files, options) Command->>Runtime: createCliRuntime(storage, onEvent) Runtime->>Pear: new PearRuntime(config) Runtime->>Pear: run(workerEntry, args --storage=...) Runtime->>Worker: require and create worker client with onEvent Runtime->>Worker: await client.ready Runtime-->>Command: return {client, destroy, pear} Command->>Worker: client.host() Command->>User: display join code / QR Peer->>Worker: join with code Worker->>Command: onEvent('status','peer-connected') Command->>Worker: client.shareFiles(...) Worker->>Command: onEvent('status','download-progress') Command->>Command: writeProgress() Worker->>Peer: transfer chunks Worker->>Command: onEvent('status','disconnected') Command->>Runtime: destroy() Command->>User: exit 0 ## Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~25 minutes ## Suggested reviewers - denislupookov ## Poem > 🐰 I hopped along the terminal light, > Shared a code, then queued the flight. > Bars and QR in a joyful spin, > Pear hummed softly, transfers begin. > A rabbit clap — the files hop in!
🚥 Pre-merge checks | ✅ 4 | ❌ 1 ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed) | Check name | Status | Explanation | | :------------------------: | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title 'cli: add command-line interface' accurately summarizes the main change: adding a CLI tool for the altersend project with multiple commands (send, receive, peek, check-update, update). | | Linked Issues check | ✅ Passed | The PR implements a complete CLI tool addressing issue `#24`'s requirement for command-line usage by providing send, receive, peek, check-update, and update commands with proper runtime management, storage handling, and progress tracking. | | Out of Scope Changes check | ✅ Passed | All changes are in-scope: CLI implementation in apps/cli/ with required files, package configuration, TypeScript setup, and minimal root-level changes (CLAUDE.md update and npm scripts). No unrelated modifications detected. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta) - [ ] Create PR with unit tests

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