Skip to content

Add dev.sh command-line dev tool for the calibre plugin#80

Draft
sheldonrrr wants to merge 1 commit into
mainfrom
cursor/add-cli-dev-tool-c5e8
Draft

Add dev.sh command-line dev tool for the calibre plugin#80
sheldonrrr wants to merge 1 commit into
mainfrom
cursor/add-cli-dev-tool-c5e8

Conversation

@sheldonrrr

Copy link
Copy Markdown
Owner

Summary

Adds a command-line development tool (dev.sh) so the whole dev loop for this calibre GUI plugin (build → run → smoke test) can be driven from the terminal, including headless via xvfb-run. Also adds AGENTS.md with Cursor Cloud setup notes and known gotchas.

dev.sh subcommands

  • build – rebuild + reinstall the plugin (calibre-customize -b .)
  • run – launch the calibre GUI (uses DISPLAY, else falls back to xvfb-run)
  • run-headless – launch the GUI under xvfb-run (no display needed)
  • smoke – isolated headless build+load check; exits non-zero if the plugin fails to load
  • compile – fast py_compile syntax check of plugin sources
  • library – create the dev library (~/calibre-library) + a sample book
  • logs – show the plugin's log directory

Notes

  • No plugin/runtime code was modified — this only adds tooling and docs.
  • AGENTS.md documents a known first-run gotcha: config.get_prefs() references an unbound logger in the fresh-config migration branch on main (fixed on dev); it self-heals on the second launch, and dev.sh smoke seeds the config to avoid it.

Evidence

Command-line dev tool running end-to-end (compile + build + headless smoke test passing):
dev_tool_output.log

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

- dev.sh wraps the calibre CLI (build/run/run-headless/smoke/compile/library/logs)
  so the full plugin dev loop works from the terminal, including headless via xvfb-run.
- Add AGENTS.md with Cursor Cloud setup notes and known first-run gotchas.

Co-authored-by: Sheldonrrr <boy.liushaopeng@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7eadddae-becf-4417-be65-41ded2cf0980

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/add-cli-dev-tool-c5e8

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.

@cursor
cursor Bot deleted the cursor/add-cli-dev-tool-c5e8 branch July 2, 2026 11:34
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.

2 participants