@magic-comment/cli
v0.3.0
Published
MagicComment CLI — read and export comment threads into an agent context pack. By Magic Team.
Readme
@magic-comment/cli
Read, export, and manage MagicComment feedback threads from the terminal — built so an AI coding agent (or you) can pull reviewer comments into its context.
Install
# one-off
npx @magic-comment/cli feedback threads --project-id proj_… --review-id preview
# or install globally
npm install -g @magic-comment/cli
magic-comment --helpConfiguration
Every option can be passed as a flag or an environment variable:
| Env var | Flag | Meaning |
| --- | --- | --- |
| MAGIC_COMMENT_SERVER_URL | --server-url | Collaboration server URL (ws://, wss://, http://, or https://) |
| MAGIC_COMMENT_CONTROL_PLANE_URL | --control-plane-url | Control-plane URL for provisioning (default https://api.magic-comment.com) |
| MAGIC_COMMENT_API_KEY | --api-key | API key — write commands need a secret key (sk_…) |
| MAGIC_COMMENT_PROJECT_ID | --project-id | Project id (proj_…) |
| MAGIC_COMMENT_REVIEW_ID | --review-id | Optional review override; otherwise uses the project selection |
Security note: prefer
MAGIC_COMMENT_API_KEYover--api-keyfor secret keys — command-line arguments are visible to other processes on the machine (the CLI warns when ansk_…key is passed via--api-key).
Commands
# Create-or-get a project for an app and mint a publishable key
magic-comment provision --app my-app --name "My App" --json
# => { "projectId": "proj_…", "pk": "pk_…", "serverUrl": "wss://…" }
# List indexed pages for a review
magic-comment feedback pages --project-id proj_… --review-id preview
# List comment threads, grouped by page (--status new|in_progress|to_review|resolved|all, --json)
magic-comment feedback threads --project-id proj_… --review-id preview
# Export open threads into an agent context pack
magic-comment feedback export --project-id proj_… --review-id preview \
--page-id preview/home --repo /path/to/repo
# Move a thread to review (secret key required)
magic-comment status --thread-id th_… --status to_review
# Reply to a thread (secret key required)
magic-comment reply --thread-id th_… --message "Fixed in the latest build"Run magic-comment --help for the full option list.
License
MIT
