A tool for polling Aristotle results and managing Lean4 project compilation. This project provides both shell scripts and a Rust-based command-line interface for automating the process of:
- Polling the Aristotle API for new project results
- Managing Lean4 project compilation
- Tracking build status and results
- Poll for new projects: Download and process new results from Aristotle
- Build management: Compile all Lean4 projects with proper error handling
- Parallel downloads: Support for concurrent project processing
- Comprehensive logging: Detailed logs for debugging and monitoring
- Configuration management: Easy-to-use config file for settings
- Rust implementation: Fast, reliable, and maintainable Rust code
aristotle-manager/
├── Cargo.toml # Rust project configuration
├── Makefile # Make targets for building
├── README.md # This file
├── shell.nix # Nix development shell
├── src/
│ └── main.rs # Rust source code
├── config.sh # Shell script configuration
├── *.sh # Shell scripts (legacy)
└── result.txt # Build results
- Rust: Ensure you have Rust installed (via rustup or your package manager)
- Nix: For development environment (optional but recommended)
- OpenSSL: System libraries for HTTPS support
# Enter the Nix development shell
nix-shell
# Build the project
cargo build
# Run the project
cargo run -- --help# Ensure you have the required dependencies
sudo apt-get install pkg-config libssl-dev # Ubuntu/Debian
# OR
sudo pacman -S pkgconf openssl # Arch Linux
# Build the project
cargo build
# Run the project
cargo run -- --help# Build and test all Lean4 projects (shell scripts)
make test
# Pull updates and build all projects
make poll
# Fetch new results from Aristotle and test them
make poll-results
# Show build results
make results
# Clean up result file
make clean
# Build the Rust project
make rust-build
# Run the Rust project
make rust-run -- <command> [args...]
# Run tests
make rust-test
# Format code
make rust-fmt
# Lint code
make rust-clippy# Show help
cargo run -- --help
# Configure API key
cargo run -- configure set --api-key YOUR_KEY
# Show configuration
cargo run -- configure show
# Poll for new projects
cargo run -- poll
# Poll and build projects
cargo run -- poll-and-build
# Build all projects
cargo run -- build
# Show results
cargo run -- results
# Clean build artifacts
cargo run -- cleanThe shell scripts in this project (poll.sh, poll-results.sh, build_all.sh) are being migrated to Rust. They are still available but will be deprecated once the Rust migration is complete.
# Update all projects and build
./poll.sh
# Build only
./build_all.sh
# Debug script
./debug_aristotle.shThe Rust project uses a configuration file at ~/.config/aristotle-manager/config.toml. You can configure:
- Base directories
- Number of parallel downloads
- Retry settings
- Notification settings (email, Slack)
base_dir = "/home/mdupont/projects/arist"
results_dir = "/home/mdupont/projects/aristotle_results"
git_base = "/home/mdupont/05/07/arist"
max_parallel_downloads = 4
retry_wait_seconds = 10
max_retries = 3
notification_email = ""
slack_webhook = ""This project uses the Aristotle API at https://aristotle.harmonic.fun/api/v3.
GET /api/v3/project- List projectsGET /api/v3/result/{id}- Download project result
Set your API key using:
# Via environment variable
export ARISTOTLE_API_KEY=your_key_here
# Or via the CLI
cargo run -- configure set --api-key your_key_hereThe project includes a shell.nix file for Nix-based development. To enter the development shell:
nix-shellThis will load all required dependencies including:
- Rust toolchain
- System libraries (OpenSSL, libgit2, etc.)
- Build tools (cargo, rustfmt, clippy)
# Build
cargo build
# Run
cargo run -- <command>
# Test
cargo test
# Format code
cargo fmt
# Lint code
cargo clippyThe project is set up for CI/CD with GitHub Actions or other CI systems. The .github/workflows/ directory contains workflow files for building and testing.
- ✅ Create Rust project structure
- ✅ Implement API client
- ✅ Migrate shell scripts to Rust CLI
- ✅ Add configuration management
- ⬜ Add comprehensive error handling
- ⬜ Implement notification system
- ⬜ Add monitoring and metrics
- ⬜ Create proper documentation
This project is licensed under the MIT License.
Contributions are welcome! Please open an issue or pull request for any questions or suggestions.