@ayudb1304/sushi
v0.1.3
Published
Build-in-Public Content Engine — transforms Git diffs into platform-specific social media drafts
Maintainers
Readme
Sushi -- Build-in-Public Content Engine
Turn your Git commits into ready-to-post social media drafts. Sushi reads your code changes and helps you share progress on X and LinkedIn without writing from scratch.
Start Here (30 seconds)
No API key required for first success.
npx @ayudb1304/sushi quickstartWhat this does:
- creates
.bip/config.ymlwith beginner defaults if missing - generates demo drafts instantly (local mode)
- saves drafts to
.bip/drafts/ - tells you the exact next step for real AI drafts
Step 2: Get Real AI Drafts
- Create a free Gemini key: aistudio.google.com/apikey
- In your project root, add a
.envfile:
GEMINI_API_KEY=your-key-here- Run quickstart again:
npx @ayudb1304/sushi quickstartEveryday Usage
Generate drafts from your latest commit:
npx @ayudb1304/sushi generate --commit HEAD --saveIf HEAD is unfamiliar, it just means "your latest commit in this repo."
Just get the narrative summary:
npx @ayudb1304/sushi summarize --commit HEADRun setup diagnostics:
npx @ayudb1304/sushi doctorClone-Repo Setup (optional)
If you cloned this repo and want local scripts:
npm run setup
npm run quickstartCommands
| Command | Description |
|---------|-------------|
| npx @ayudb1304/sushi quickstart | One-command onboarding (demo-first, real mode when key exists) |
| npx @ayudb1304/sushi doctor | Check Node, Git, config, and Gemini key readiness |
| npx @ayudb1304/sushi init | Interactive setup for custom profile/platform/tone |
| npx @ayudb1304/sushi summarize --commit <sha> | Analyze a commit and print narrative |
| npx @ayudb1304/sushi generate --commit <sha> [--save] | Generate X + LinkedIn drafts from a commit |
| npx @ayudb1304/sushi ingest-github --event-file <path> [--repo-path <path>] | Queue GitHub push webhook commits for processing |
| npx @ayudb1304/sushi run-worker [--once] | Process queued events and write outputs to .bip/engine/outputs/ |
| npx @ayudb1304/sushi serve-webhooks [--port 8787] [--host 0.0.0.0] | Run GitHub webhook receiver (POST /webhooks/github) with signature verification |
| npx @ayudb1304/sushi serve-dashboard [--port 8788] [--host 0.0.0.0] | Run dashboard API + timeline UI |
| npx @ayudb1304/sushi run-weekly-summary [--once] [--interval-hours 168] | Generate weekly summary markdown on schedule |
Advanced Setup
Phase 2 Engine setup
Required environment variables
Set these before running live webhook + worker flows:
# Required for webhook signature verification
export GITHUB_WEBHOOK_SECRET="your-webhook-secret"
# Required for encrypted installation token storage (min 16 chars)
export BIP_TOKEN_MASTER_KEY="replace-with-strong-secret"Optional but useful:
# Fallback token used when webhook Authorization header is not provided
export GITHUB_INSTALLATION_TOKEN="ghp_xxx"
# Optional asset upload (if set, generated assets upload to S3)
export AWS_REGION="us-east-1"
export BIP_ASSET_BUCKET="your-bucket-name"
export BIP_ASSET_CDN_BASE_URL="https://cdn.example.com" # optionalEnd-to-end Phase 2 flow
- Build the modern dashboard frontend (one-time, or after UI changes):
npm --prefix dashboard install
npm run dashboard:build- Start webhook receiver:
npx @ayudb1304/sushi serve-webhooks --port 8787- Point GitHub webhook to:
POST http://<your-host>:8787/webhooks/github- Process queued events:
npx @ayudb1304/sushi run-worker- Inspect timeline and assets:
# if you changed dashboard UI, rebuild before serving
npm run dashboard:build
npx @ayudb1304/sushi serve-dashboard --port 8788
# open http://localhost:8788- Generate weekly summary:
npx @ayudb1304/sushi run-weekly-summary --oncePATH troubleshooting (global install users)
If npm install -g @ayudb1304/sushi succeeds but sushi shows command not found,
your npm global bin directory is not in your shell PATH.
- Find your npm global prefix:
npm config get prefix- Add
<prefix>/binto your PATH (zsh):
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
hash -r- Verify:
which sushi
sushi --versionIf you want zero shell setup, use npx @ayudb1304/sushi ... instead of global install.
How it works
git commit --> sushi extracts diff --> Gemini analyzes changes --> platform drafts- Parses the commit diff (files changed, additions, deletions, raw patches)
- Sends structured context to Gemini 2.5 Flash with anti-hallucination constraints
- Generates a problem/solution narrative grounded in the actual code changes
- Renders platform-specific drafts using your configured tone
Sushi never auto-posts. You review, edit, and post on your own terms.
Platform safety and policy
- Sushi is draft-first and human-in-the-loop: it does not auto-post by default.
- You remain responsible for platform policies for X, LinkedIn, Reddit, and any other channel.
- Recommended flow: generate drafts in Sushi, review/edit, then post manually or via approved publishing tools.
Requirements
- Node.js >= 18
- Git
- A Gemini API key (free tier works fine)
Contributing
git clone https://github.com/ayudb1304-wq/bip-cli.git
cd bip-cli
npm install
npm test
npm run dev -- generate --commit HEADLicense
MIT
