3 unstable releases
Uses new Rust 2024
new 0.2.1 | May 2, 2025 |
---|---|
0.1.1 | Apr 19, 2025 |
0.1.0 | Apr 19, 2025 |
#393 in Game dev
373 downloads per month
24KB
498 lines
lictl - Lichess CLI Tool
A command-line interface for interacting with Lichess.org's API to make it easy to script your way around Lichess.
Installation
cargo install lictl
Authentication
Before using commands that require authentication, you'll need to log into Lichess:
lictl login
# Verify your authentication
lictl whoami
Commands
Broadcasts
# Get broadcast details by ID
lictl broadcasts get --by-id <broadcast-id>
# Get broadcast details by round ID
lictl broadcasts get --by-round <round-id>
# Export broadcast PGN
lictl broadcasts export <broadcast-id>
Broadcast Rounds
# Get broadcast round details
lictl broadcast-rounds get <round-id>
Studies
# Import PGN into a study
lictl studies import <study-id> "<pgn-content>"
Generic API Requests
# Make GET requests to any Lichess API endpoint
lictl req get /account
lictl req get /broadcast page=2 nb=10
Scripts
The project includes helpful scripts in the scripts/
directory:
copy-broadcast-to-study.sh
Copies a broadcast's games into a study:
./scripts/copy-broadcast-to-study.sh <round-id> <study-id>
Development
# Run tests
cargo test
# Build in debug mode
cargo build
# Build in release mode
cargo build --release
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Dependencies
~13–24MB
~340K SLoC