lictl

Crates.iolictl
lib.rslictl
version0.2.1
created_at2025-04-19 23:54:16.338347+00
updated_at2025-05-02 08:50:12.299292+00
description A command line interface for scripting Lichess
homepagehttps://github.com/ddaws/lictl
repositoryhttps://github.com/ddaws/lictl
max_upload_size
id1641229
size81,262
Dawson (ddaws)

documentation

https://docs.rs/lictl

README

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

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request
Commit count: 53

cargo fmt