Skip to content

Conversation

@entropyy0
Copy link

Closes #69

Summary

When BIRD_READ_ONLY=1, all write commands (tweet, reply, follow, unfollow, unbookmark) are blocked with a clear error before execution. Read commands work normally.

Use case

Running bird for AI agents where you want to allow reading/searching but prevent accidental posts — exactly as the README already recommends.

Implementation

  • WRITE_COMMANDS set exported from program.ts
  • Check in preAction hook — zero overhead for read commands
  • Accepts 1 or true
  • Test included for write/read command classification
  • Documented in README under environment shortcuts

3 files, +41 lines. Build + tests pass.

When BIRD_READ_ONLY=1 (or 'true'), all write commands (tweet, reply,
follow, unfollow, unbookmark) are blocked with a clear error message
before execution. Read commands continue to work normally.

This is useful when running bird for AI agents where you want to
allow reading/searching but prevent accidental posts — as the README
already recommends against tweeting.

Implementation:
- Export WRITE_COMMANDS set from program.ts
- Check env var in preAction hook (zero overhead for read commands)
- Add test for write/read command classification
- Document in README under environment shortcuts

Closes steipete#69
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.

Feature request: Read-only mode to disable tweet/reply commands

1 participant