Core logic and utilities for building bots on Farcaster.
- API wrapper (Neynar SDK planned)
- Message handling & scheduling system
- Onchain integrations (Base planned)
- CI pipeline (Node 20 + TypeScript)
- Add config module
- Add scheduler
- Add Neynar API placeholder
- Fix CI pipeline (Node 20 + TypeScript + @types/node)
- Implement Neynar
postCast()stub (SDK ready) - Add onchain Base events bridge
- Add Message Queue placeholder (
src/utils/queue.ts) - Add Webhook handler stub (
src/hooks/webhook.ts) - Route webhook → queue → cast templates
- Map Base onchain events → Farcaster casts
- Add rate-limit & backoff logic
- Copy
.env.example→.envand fill API keys. - Install deps:
npm i - Build:
npm run build - Run (dry-run):
node dist/index.js
✅ Passing on Node 20
TypeScript 5.x with @types/node.
Create a local .env file (never commit it) based on .env.example:
NEYNAR_API_KEY=your_neynar_api_key
SIGNER_UUID=your_delegated_signer_uuid # use delegated signer, not a private key
POST_IMAGE_URL_1=https://yourimage1.url
POST_IMAGE_URL_2=https://yourimage2.url
POST_IMAGE_URL_3=https://yourimage3.urlThese variables are required for local runs and GitHub Actions.
Use .env.example as a reference. Add real values only in a local .env file or GitHub Secrets.
node scripts/runBatchPoster.jsThis will:
- Immediately post the first message.
- Schedule two more posts, each one hour apart.
- Go to Settings → Secrets and variables → Actions and add:
NEYNAR_API_KEYSIGNER_UUID- (optional)
POST_IMAGE_URL_1,POST_IMAGE_URL_2,POST_IMAGE_URL_3
- Open Actions → One-time Farcaster autopost batch → Run workflow to trigger the job manually.
Default demo images use picsum.photos.
You can override them by setting your own image URLs or editing src/scheduler/autoPosts.js.
The file src/utils/neynarClient.js provides the helper function:
postCast({ text, imageUrl })It currently logs mock output for testing.
Replace its body with the actual Neynar SDK or REST call using your delegated signer when you’re ready for real posting.
This approach keeps your main wallet seed completely safe.
- Never commit
.envor any real private keys. - Always use a delegated signer, approved in Warpcast (can be revoked anytime).
- CI/CD automation must rely only on environment variables and GitHub Secrets.
Latest bot log sample (auto-generated):
[2025-10-29T09:00:00.000Z] gm Farcaster 🌐 #AutomationTest
[2025-10-29T10:00:00.000Z] gm Farcaster 🌐 #AutomationTest
➡️ Logs from the latest run are available in the Artifacts section (cast-log.zip) at the bottom of each workflow page.
.github/workflows/
ci.yml
test-bot.yml
auto-post-batch.yml
assets/images/autopost/
post1_cyberpunk.jpg, post2_cyberpunk.jpg, post3_cyberpunk.jpg
scripts/
postTestCast.js
runBatchPoster.js
src/
api/ (stubs)
hooks/webhooks.ts
scheduler/autoPosts.js
types/events.ts
utils/
logger.ts
queue.ts
scheduler.ts
neynarClient.js
index.ts
config.ts
MIT © 2025 Igorehadem
Repository activity and maintenance checklist for Farcaster Bot Core
| # | Commit Type | Description | Status |
|---|---|---|---|
| 1 | docs: |
✏️ Rebuilt and cleaned up README with badges & env docs | ✅ |
| 2 | docs: |
🧠 Added detailed comments to all GitHub workflows | ✅ |
| 3 | docs: |
🔧 Updated .env.example and config.ts (safe signer) |
✅ |
| 4 | feat: |
🧾 Added reusable logger.ts utility |
✅ |
| 5 | refactor: |
♻️ Integrated logger into index.ts |
✅ |
| 6 | refactor: |
🚀 Updated scripts (postTestCast.js, runBatchPoster.js) |
✅ |
| 7 | feat: |
🗓 Enhanced auto-post scheduler with structured logging | ✅ |
| 8 | feat: |
🪝 Implemented typed webhook handler and event types | ✅ |
| 9 | chore: |
🎨 Added Prettier and EditorConfig for code style | ✅ |
| 10 | docs: |
🧱 Added this summary checklist to README | ✅ |
- Modular design:
config,logger,scheduler,webhooks - CI-ready with mock Neynar integration
- Consistent code style and logging system
- Ready for Phase 2: onchain → cast bridge
Last updated: ${new Date().toISOString().slice(0,10)}