.--~~,__
:-....,-------`~~'._.'
`-,,, ,_ ;'~U'
_,-' ,'`-__; '--. (XiaoTian)
(_/'~~ ''''(;
XiaoTian (哮天犬) is named after the legendary "Howling Celestial Dog" in Chinese mythology, known for its keen sense of smell and ability to track down anything. Just like its namesake, this tool is designed to "sniff out" the latest updates from GitHub repositories you care about.
XiaoTian is a command-line tool designed for developers and project managers to automatically track and summarize updates from subscribed GitHub repositories.
- Repository subscription management
- GitHub API integration with token support
- Update retrieval from GitHub repositories (commits, issues, pull requests, releases)
- Configuration management with persistent settings
- Customizable update display with filtering options
- Interactive confirmation for destructive operations
- User-friendly REPL interface with history support
- AI-powered update summaries with LLM integration
- Rust 1.70 or higher (for building from source)
- GitHub Personal Access Token (optional, for higher API rate limits)
- Ollama service (optional, for AI-powered summaries)
The easiest way to install XiaoTian is through Cargo, Rust's package manager:
cargo install xiaotian
Pre-built binaries for major platforms are available on the Releases page.
- Download the appropriate binary for your platform
- Extract the archive
- Add the binary to your PATH
# Example for Linux/macOS
chmod +x xiaotian
sudo mv xiaotian /usr/local/bin/
# Clone the repository
git clone https://github.com/hedon954/xiaotian.git
cd xiaotian
# Build the project
cargo build --release
# Run the application
cargo run --release --bin xiaotian
# Or install it locally
cargo install --path .
To verify the installation, run:
xiaotian --version
You should see output similar to:
XiaoTian 0.4.0
Commands available in XiaoTian
Usage: [COMMAND]
Commands:
add Add a repository or subscription
list List repositories or subscriptions
show Show details of a repository, subscription, or updates
delete Delete a repository or subscription
fetch Fetch updates for subscriptions
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
XiaoTian uses a hierarchical command structure with the following main commands:
add repository <owner> <name>
- Add a GitHub repositorylist repositories
- List all repositoriesshow repository <id>
- Show repository detailsdelete repository <id>
- Delete a repository (with interactive confirmation)
add subscription <owner> <name>
- Subscribe to a repositorysubscribe <repository_id>
- Subscribe to a repository by IDlist subscriptions
- List all subscriptionsshow subscription <id>
- Show subscription detailsdelete subscription <id>
- Delete a subscription (with interactive confirmation)
fetch updates <subscription_id> [days]
- Fetch updates for a subscription for the last N daysshow updates <subscription_id> [limit]
- Show recent updates for a subscription with optional limit
XiaoTian is currently in version 0.4.0. Key features implemented:
- Core architecture and storage system (v0.1.0)
- GitHub API integration (v0.2.0)
- REPL commands for configuration and update management (v0.2.1)
- Command module refactoring and improved error handling (v0.2.2)
- Command line parsing with Clap integration (v0.2.3)
- Enhanced REPL experience with reedline-repl-rs (v0.2.4)
- Data relationship integrity and enhanced user experience (v0.2.5)
- ID system simplification with intuitive integer IDs (v0.2.6)
- Architecture simplification with streamlined data flow (v0.2.7)
- Scheduled updates and structured report generation (v0.3.0)
- LLM integration and AI-powered update summaries (v0.4.0)
Version 0.2.6 focuses on improving the ID system, making it more intuitive and user-friendly:
- Replaced UUID with auto-increment integers for repositories and subscriptions
- Optimized model relationships with direct ID references
- Enhanced error handling with more specific context information
- Simplified command line interaction with easy-to-type integer IDs
- Added
subscribe <repository_id>
command for direct repository subscription
Example of the new ID system in action:
xiaotian> add repo rust-lang/rust
Repository added with ID: 1
xiaotian> subscribe 1
Subscription created with ID: 1
xiaotian> show subscription 1
Subscription #1:
Repository: rust-lang/rust (ID: 1)
Last checked: Never
Status: Active
Version 0.2.7 introduces major architectural simplifications:
- Removed the Subscription concept, using direct Source management with custom fetch_update functions
- Eliminated Update storage in favor of on-demand processing
- Simplified command naming (repository→repo, repositories→repos)
- Streamlined command interface for better user experience
Example of the simplified command structure:
xiaotian> add repo rust-lang/rust
Repository added with ID: 1
xiaotian> fetch updates 1
Fetching updates for rust-lang/rust...
[Output of processed updates]
XiaoTian v0.3.0 has implemented the following features:
- Use
cron_tab
library to implement scheduled tasks based on cron expressions - Create a standalone
cron
binary entry point for running scheduled tasks - Design and implement structured Markdown report generation
- Organize reports by source type and repository, using the
reports/{source_type}/{owner}_{repo}_{since}_{until}.md
directory structure - Optimize report content, focusing on high-value information (Pull Requests, Issues, and Releases)
- Refactor code architecture for better maintainability
The upcoming v0.4.0 release will feature:
- LLM utility for AI-powered content generation
- Ollama integration for local AI processing
- AI-generated summaries of repository updates
- Enhanced report format with intelligent content organization
- Support for dry-run mode to preview prompts
XiaoTian follows a structured development roadmap:
- Scheduled tasks using cron expressions
- Standalone scheduler binary for continuous operation
- Structured Markdown report generation
- Organized report directory structure
- Optimized high-value content
- Improved code architecture
- LLM utility for AI-powered content generation
- Ollama integration for local AI processing
- AI-generated summaries of repository updates
- Enhanced report formats with both detailed and AI summary reports
- Support for dry-run mode to preview prompts
- Modular and maintainable code architecture
- Multiple notification channels
- Report delivery mechanisms
- Scheduled notifications
- Comprehensive testing
- Complete documentation
- Polished user experience
- Multiple report formats (Markdown, HTML, PDF)
- Customizable report templates
- Persistent storage support
This project is licensed under the MIT License - see the LICENSE file for details.
- Octocrab for GitHub API integration
- Clap for command-line argument parsing
- reedline-repl-rs for the interactive REPL interface
- All contributors who have helped shape and improve this project