Skip to content

Add ./bep CLI and Cursor skill for BEP workflow#3426

Draft
hellovai wants to merge 5 commits intocanaryfrom
feat/bep-cli
Draft

Add ./bep CLI and Cursor skill for BEP workflow#3426
hellovai wants to merge 5 commits intocanaryfrom
feat/bep-cli

Conversation

@hellovai
Copy link
Copy Markdown
Contributor

@hellovai hellovai commented Apr 28, 2026

Pull Request Template

Issue Reference

  • This PR is not linked to a specific issue

Changes

This PR adds a CLI tool and organizes static export content for BEPs:

beps/bep CLI Script

A uv-powered Python script providing git-like workflows for BEPs:

  • ./bep pull - Fetch all BEPs from the server into local ./all-beps/ (created on demand, not tracked)
  • ./bep list - List local BEPs with optional status filtering
  • ./bep new "Title" - Scaffold a new BEP-?-slug/ locally with template
  • ./bep diff <ref> - Compare local changes against server version
  • ./bep push <ref> - Upload changes to server, including pages/*.md (requires BEP_API_TOKEN)
  • ./bep open <number> - Open BEP in browser

Export Utils Updates (export-all-utils.ts)

  • Added generateBepSkill() - Claude skill included as skills/bep.md in the ZIP
  • Static content is now generated in code rather than stored as repo files

Testing

  • Python syntax validation passed (python3 -m py_compile)
  • Manual testing pending (uv not available in CI environment)

PR Checklist

  • I have read and followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Additional Notes

The CLI depends on:

  • uv for script execution (shebang: #!/usr/bin/env -S uv run --script)
  • httpx library (declared in inline script metadata)
  • BEP_API_TOKEN environment variable for push operations

This fixes the issue where pages/*.md files were not included in push operations.

Slack Thread

Open in Web Open in Cursor 

- Add beps/bep: uv-powered CLI script with pull/push/list/new/diff/open commands
- Add .cursor/rules/bep.mdc: Cursor skill for invoking the BEP CLI
- Add beps/all-beps/: Directory for pulled BEPs (content gitignored)
- Update .gitignore: Ignore dynamic all-beps content (BEP-*/, Claude.md, etc.)

The ./bep CLI enables local editing of BEPs with git-like workflows:
- ./bep pull: Fetch all BEPs from server as local folders
- ./bep new 'Title': Create BEP-?-slug/ with template
- ./bep diff <ref>: Compare local vs server
- ./bep push <ref>: Upload changes (requires BEP_API_TOKEN)

Pages (pages/*.md) are now properly included in push operations.

Co-authored-by: hellovai <hellovai@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Error Error Apr 28, 2026 9:51pm
promptfiddle Ready Ready Preview, Comment Apr 28, 2026 9:51pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2650da05-4430-4503-973a-073dbc84917f

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 feat/bep-cli

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Latest build completeView logs

@github-actions
Copy link
Copy Markdown

🐑 BEPs Preview Ready

Preview URL: https://dj7ggjkp4tlhz.cloudfront.net/feat-bep-cli/

Commit: f43063f8ad13f61702726f8853f9b04bc5c71ffeWorkflow run

- Remove .cursor/rules/bep.mdc (not a Cursor rule)
- Add generateBepSkill() to export-all-utils.ts
- Include skills/bep.md in the all-beps ZIP download

The skill is now included when downloading all BEPs via the API,
making it available as a Claude Code skill rather than a Cursor rule.

Co-authored-by: hellovai <hellovai@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

🐑 BEPs Preview Ready

Preview URL: https://dj7ggjkp4tlhz.cloudfront.net/feat-bep-cli/

Commit: 4b894de9ef4f2b90829fb28205df8a97dd55eec3Workflow run

The all-beps directory is created locally by './bep pull' but
shouldn't be tracked in the repo. Static content (skill, instructions)
is generated in export-all-utils.ts, not stored as files.

Co-authored-by: hellovai <hellovai@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

🐑 BEPs Preview Ready

Preview URL: https://dj7ggjkp4tlhz.cloudfront.net/feat-bep-cli/

Commit: 997b8eb62fb90f1d93c2be95c8a03adef7e79389Workflow run

- Remove beps/bep from repo (was static file)
- Add generateBepScript() to export-all-utils.ts
- Script is now included as 'bep' in the all-beps ZIP download
- Script works from the downloaded bundle directory (ALL_BEPS_DIR = SCRIPT_DIR)

Both the skill and CLI script are now generated dynamically and
included in the export bundle, keeping the repo clean.

Co-authored-by: hellovai <hellovai@users.noreply.github.com>
- Add typescript/apps/beps/static/ directory with:
  - bep: CLI script with __BEP_API_BASE__ placeholder
  - skills/bep.md: Claude skill file
- Update export-all-utils.ts to read from static files at runtime
- Use readStaticFile() helper to load content
- Replace __BEP_API_BASE__ placeholder with actual API URL at export time

This keeps the code cleaner and makes the static files easier to edit.

Co-authored-by: hellovai <hellovai@users.noreply.github.com>
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