https://github.com/dolegi/lichess-bot
Lichess bot api bridge
https://github.com/dolegi/lichess-bot
chess-bot lichess lichess-api
Last synced: 2 months ago
JSON representation
Lichess bot api bridge
- Host: GitHub
- URL: https://github.com/dolegi/lichess-bot
- Owner: dolegi
- License: agpl-3.0
- Created: 2019-03-09T17:33:59.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-08-29T12:59:10.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T22:32:05.040Z (3 months ago)
- Topics: chess-bot, lichess, lichess-api
- Language: Go
- Size: 37.1 KB
- Stars: 17
- Watchers: 2
- Forks: 5
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Lichess Bot 
Lichess BOT interface for UCI compatible engines.## How to use
- Upgrade to a BOT account on lichess. [guide](https://lichess.org/api#operation/botAccountUpgrade)
- `go get github.com/dolegi/lichess-bot`
- Download a UCI compatible engine such as [stockfish](https://stockfishchess.org/download/)
- Create a new toml file for config
- Put BOT name, API key and engine path in `config.toml`
- Run with `./lichess-bot config.toml`### Upgrade to BOT account
As well as normal usage shown above, you can use this library to upgrade your account> WARNING: Upgrading your account cannot be undone
To upgrade run like this
```
./lichess-bot config.toml upgrade
```## Minimal config
```toml
token = "XXX"
botname = "XXX"
url = "https://lichess.org/api/"[engine]
path = "path/to/engine"[challenge]
variants = [
"standard"
]
speeds = [
"blitz",
"bullet"
]
modes = [
"rated",
"casual"
]
```# Config format
```toml
token = "XXX" # API token for Lichess
botname = "XXX" # Name of the BOT account
url = "https://lichess.org/api/" # URL for Lichess API[engine]
path = "path/to/engine" # Path to UCI compatible engine
[engine.options]
threads = 1 # Number of CPU threads to use
hash = 512 # Max memory in MB engine can use
[engine.go]
nodes = 1 # Search number of nodes only
depth = 5 # Search depth limit
movetime = 5000 # Move time limit in milliseconds[network]
latency = 100 # Estimated network latency when sending requests in milliseconds[challenge]
variants = [ # Variants engine supports
"standard"
]
speeds = [ # Speeds to play at
"blitz",
"bullet"
]
modes = [ # Modes to play. Must be "rated" and/or "casual"
"rated"
]
```# Docker
Example usage for using Docker:
`docker build . -t lichess-bot && docker run -v $(pwd)/config.toml:/app/config.toml lichess-bot ./config.toml`# Releases
To install run `go get github/dolegi/lichess-bot`
Note: Windows release is untested# References
- [Lichess BOT API](https://lichess.org/api#tag/Chess-Bot)
- [Python Lichess BOT](https://github.com/careless25/lichess-bot)
- [UCI reference](https://www.shredderchess.com/chess-info/features/uci-universal-chess-interface.html)