Expand description
§Herald 📢
Automated viral tweet generation and scheduling for developer releases.
Herald helps developers and teams automatically announce their work on Twitter/X by detecting events (releases, commits, PRs) and generating engaging tweets using LLMs.
§Features
- Event Detection: Automatically detect releases from GitHub, crates.io, npm
- LLM-Powered Generation: Generate viral tweets using Claude, GPT, or local models
- Twitter Integration: Post directly to Twitter/X using the v2 API
- Scheduling: Queue tweets for optimal posting times
- Templates: Pre-built templates for common announcement types
§Quick Start
# Install
cargo install herald
# Configure (creates ~/.config/herald/config.toml)
herald init
# Generate a tweet for a release
herald generate --project myproject --event release
# Post immediately
herald post "just shipped something cool 🚀"
# Schedule for later
herald schedule "coming soon..." --time "2024-01-15 09:00"§Configuration
Herald uses a TOML configuration file:
[twitter]
api_key = "your-api-key"
api_secret = "your-api-secret"
access_token = "your-access-token"
access_token_secret = "your-access-token-secret"
[llm]
provider = "anthropic" # or "openai", "ollama"
api_key = "your-api-key"
model = "claude-sonnet-4-20250514"
[defaults]
emojis = true
hashtags = false
tone = "casual" # casual, professional, hype, technical
max_length = 280
[[projects]]
name = "myproject"
github = "user/myproject"
crates_io = "myproject"
events = ["release", "major_feature"]§Environment Variables
Credentials can also be set via environment variables:
TWITTER_API_KEYTWITTER_API_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETANTHROPIC_API_KEYorOPENAI_API_KEYGITHUB_TOKEN(for private repos)
Re-exports§
pub use config::Config;pub use config::EventType;pub use config::LlmConfig;pub use config::ProjectConfig;pub use config::ScheduleConfig;pub use config::TweetDefaults;pub use config::TwitterConfig;pub use error::HeraldError;pub use error::Result;pub use events::Event;pub use events::EventContext;pub use events::EventDetector;pub use generator::GeneratedTweet;pub use generator::TweetGenerator;pub use generator::TweetTemplates;pub use scheduler::ScheduledTweet;pub use scheduler::ScheduleStatus;pub use scheduler::Scheduler;pub use twitter::PostedTweet;pub use twitter::TwitterClient;
Modules§
- config
- Configuration management for herald
- error
- Error types for herald
- events
- Event detection for releases, commits, and other announcements
- generator
- Tweet generation using LLMs
- interactive
- Interactive mode for herald
- scheduler
- Tweet scheduling system
- Twitter/X API integration
- ui
- Pretty terminal UI using Molten’s full TUI stack
Constants§
- USER_
AGENT - Default user agent for API requests
- VERSION
- Herald version