Repository navigation
feat: deploy scripts and docs/deploy.md - #4
Conversation
📝 WalkthroughWalkthroughAdds deployment support: a Bash CLI for four install modes, npm scripts to invoke it, deployment documentation, VS Code tasks, and a .gitignore rule to exclude packed tarballs. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as "Developer (CLI)"
participant Script as "deploy-from-source.sh"
participant Bun as "Bun (install/build)"
participant Npm as "npm (pack/link/install/registry)"
Dev->>Script: run with mode (pack|link|global|registry)
Script->>Bun: bun install --frozen-lockfile
alt pack
Script->>Npm: npm pack (produces gitlawb-openclaude-*.tgz)
else link
Script->>Bun: bun run build
Script->>Npm: npm link
else global
Script->>Bun: bun run build
Script->>Npm: npm install -g .
else registry
Script->>Npm: npm install -g `@gitlawb/openclaude`@latest
end
Script-->>Dev: exit status / messages
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Add deploy-from-source.sh (pack, link, global, registry) and package.json deploy:* scripts. Document all install/publish options in docs/deploy.md; link from README, advanced-setup, AGENTS; ignore npm pack tarballs. Made-with: Cursor
Made-with: Cursor
4159242 to
6d58c6f
Compare
Made-with: Cursor
There was a problem hiding this comment.
♻️ Duplicate comments (1)
docs/deploy.md (1)
68-68:⚠️ Potential issue | 🟡 MinorAvoid hardcoding a versioned tarball filename.
gitlawb-openclaude-0.4.0.tgzwill become stale and can break copy/paste instructions after version bumps. Use a placeholder or instruct users to use the emitted filename fromnpm pack.Suggested docs update
-npm install -g ./gitlawb-openclaude-0.4.0.tgz +npm install -g ./gitlawb-openclaude-<version>.tgz +# or install the exact filename emitted by `npm pack`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/deploy.md` at line 68, The docs currently hardcode the tarball filename `npm install -g ./gitlawb-openclaude-0.4.0.tgz`, which will break after a version bump; update the instruction to use a placeholder or the produced filename from `npm pack` (for example reference `./gitlawb-openclaude-<version>.tgz` or instruct users to run `npm pack` and install the emitted filename) so the install step remains correct across releases.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/deploy.md`:
- Line 68: The docs currently hardcode the tarball filename `npm install -g
./gitlawb-openclaude-0.4.0.tgz`, which will break after a version bump; update
the instruction to use a placeholder or the produced filename from `npm pack`
(for example reference `./gitlawb-openclaude-<version>.tgz` or instruct users to
run `npm pack` and install the emitted filename) so the install step remains
correct across releases.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 36551ab1-3101-4e2a-a8fb-1f2fdc8d5de7
📒 Files selected for processing (6)
.gitignore.vscode/tasks.jsondocs/advanced-setup.mddocs/deploy.mdpackage.jsonscripts/deploy-from-source.sh
✅ Files skipped from review due to trivial changes (5)
- .gitignore
- docs/advanced-setup.md
- package.json
- scripts/deploy-from-source.sh
- .vscode/tasks.json
| { | ||
| "label": "OpenClaude: smoke", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bun run smoke", |
There was a problem hiding this comment.
🔴 All VS Code tasks reference non-existent scripts/cursor-dev-path.sh
Every task in .vscode/tasks.json invokes ${workspaceFolder}/scripts/cursor-dev-path.sh as its command prefix (lines 7, 21, 32, 43, 54, 65), but this script does not exist anywhere in the repository — not on any branch, not gitignored, and never committed. Running any of these tasks (smoke, unit tests, provider tests, runtime doctor, deploy pack, deploy link) will immediately fail with a "No such file or directory" error. The docs/deploy.md:14 documentation also references this script, compounding the issue.
Was this helpful? React with 👍 or 👎 to provide feedback.
| { | ||
| "version": "2.0.0", | ||
| "tasks": [ | ||
| { | ||
| "label": "OpenClaude: smoke", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bun run smoke", | ||
| "group": { | ||
| "kind": "test", | ||
| "isDefault": true | ||
| }, | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| }, | ||
| { | ||
| "label": "OpenClaude: unit tests", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bun test --max-concurrency=1", | ||
| "group": "test", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| }, | ||
| { | ||
| "label": "OpenClaude: provider tests", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bun run test:provider", | ||
| "group": "test", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| }, | ||
| { | ||
| "label": "OpenClaude: runtime doctor", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bun run doctor:runtime", | ||
| "group": "test", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| }, | ||
| { | ||
| "label": "OpenClaude: deploy pack", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bash scripts/deploy-from-source.sh pack", | ||
| "group": "build", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| }, | ||
| { | ||
| "label": "OpenClaude: deploy link", | ||
| "type": "shell", | ||
| "command": "${workspaceFolder}/scripts/cursor-dev-path.sh bash scripts/deploy-from-source.sh link", | ||
| "group": "build", | ||
| "presentation": { | ||
| "reveal": "always", | ||
| "panel": "shared" | ||
| }, | ||
| "problemMatcher": [] | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
🔴 Shipping .vscode/tasks.json violates AGENTS.md rule against editor-specific trees
AGENTS.md line 52 states: "This repository does not ship editor-only trees (for example .cursor/ or team-local MCP pins) on main. Keep personal or team agent configuration outside the repo or in your fork only, so the upstream tree stays neutral for all contributors." Adding .vscode/tasks.json — a VS Code/Cursor-specific configuration file — directly violates this mandatory rule. The .vscode/ directory is an editor-only tree analogous to the .cursor/ example cited in the rule.
Prompt for agents
The .vscode/tasks.json file violates AGENTS.md's explicit rule (line 52) that the repository does not ship editor-only trees on main. The file should be removed from the repository. If these tasks are useful for contributors, they could be documented in docs/deploy.md or docs/agent-workflow.md as copy-paste snippets, or kept in a contributor's personal fork. The .vscode/ directory should also be added to .gitignore to prevent future commits. The reference to these palette tasks in docs/deploy.md:14 would also need updating.
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-authored-by: adrian stanca <adrianstanca1@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/deploy.md (1)
37-37: Avoid assuming the clone directory is namedopenclaude.Line 37 can fail for users who clone into a different folder. Prefer a generic placeholder to keep instructions portable.
Suggested docs tweak
-cd openclaude +cd <repo-directory>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/deploy.md` at line 37, Replace the hard-coded "cd openclaude" step with a generic placeholder and short instruction so users can change it to whatever folder they cloned into; update the line containing "cd openclaude" to use a variable placeholder like "<repository-directory>" (and add a parenthetical note "replace with your clone folder") so the docs do not assume the clone directory name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/deploy.md`:
- Around line 5-13: The docs list package.json scripts deploy:registry,
deploy:install-global, deploy:link, and deploy:pack that don't exist; either add
those script entries to package.json (e.g., "deploy:registry",
"deploy:install-global", "deploy:link", "deploy:pack" mapping to the shell
commands used in the docs) or change the docs to reference the actual existing
script names; update every occurrence of those script symbols in the doc (the
four deploy:* script mentions at lines noted) so the documented commands match
the real package.json scripts and won't produce "Missing script" errors at
runtime.
---
Nitpick comments:
In `@docs/deploy.md`:
- Line 37: Replace the hard-coded "cd openclaude" step with a generic
placeholder and short instruction so users can change it to whatever folder they
cloned into; update the line containing "cd openclaude" to use a variable
placeholder like "<repository-directory>" (and add a parenthetical note "replace
with your clone folder") so the docs do not assume the clone directory name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ## Quick reference (`package.json`) | ||
|
|
||
| | Script | Equivalent shell | | ||
| |--------|-------------------| | ||
| | `bun run deploy:registry` | `bash scripts/deploy-from-source.sh registry` | | ||
| | `bun run deploy:install-global` | `bash scripts/deploy-from-source.sh global` | | ||
| | `bun run deploy:link` | `bash scripts/deploy-from-source.sh link` | | ||
| | `bun run deploy:pack` | `bash scripts/deploy-from-source.sh pack` | | ||
|
|
There was a problem hiding this comment.
deploy:* commands appear undocumented in package.json and may fail at runtime.
Line 5 onward documents bun run deploy:registry|deploy:install-global|deploy:link|deploy:pack, but the provided package.json snippet does not include these script keys. If that reflects current code, these commands will fail with “Missing script” and the doc’s primary flows break.
Proposed fix
# package.json (scripts)
{
"scripts": {
+ "deploy:pack": "bash scripts/deploy-from-source.sh pack",
+ "deploy:link": "bash scripts/deploy-from-source.sh link",
+ "deploy:install-global": "bash scripts/deploy-from-source.sh global",
+ "deploy:registry": "bash scripts/deploy-from-source.sh registry"
}
}# docs/deploy.md (if scripts are intentionally omitted)
- | `bun run deploy:registry` | `bash scripts/deploy-from-source.sh registry` |
+ | `npm run deploy:registry` | `bash scripts/deploy-from-source.sh registry` |
# (or remove the bun-run wrapper rows entirely and keep only shell commands)Also applies to: 25-30, 39-41, 51-53, 61-63
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/deploy.md` around lines 5 - 13, The docs list package.json scripts
deploy:registry, deploy:install-global, deploy:link, and deploy:pack that don't
exist; either add those script entries to package.json (e.g., "deploy:registry",
"deploy:install-global", "deploy:link", "deploy:pack" mapping to the shell
commands used in the docs) or change the docs to reference the actual existing
script names; update every occurrence of those script symbols in the doc (the
four deploy:* script mentions at lines noted) so the documented commands match
the real package.json scripts and won't produce "Missing script" errors at
runtime.
Summary
scripts/deploy-from-source.shwithpack,link,global, andregistrymodes for every common install path from a checkout.deploy:*scripts inpackage.json, newdocs/deploy.md, cross-links inREADME.md,docs/advanced-setup.md, andAGENTS.md, and.gitignoreentries fornpm packtarballs.Impact
docs/deploy.md) and npm scripts describe how to install from npm, pack a tarball, link for dev, or install globally from source.bun run deploy:*wraps the shell helper; pack artifacts are gitignored.Testing
bun run buildbun run smokebun run deploy:packNotes
deploy-from-source.shexpects bash/macOS/Linux; on Windows, use WSL or follow the manual commands indocs/deploy.md.Summary by CodeRabbit
Documentation
Chores