MCPcopy Index your code
hub / github.com/LeelaChessZero/lczero-client

github.com/LeelaChessZero/lczero-client @v0.24.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.24.0 ↗ · + Follow
30 symbols 75 edges 2 files 4 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Compiling

You will need to install Go 1.9 or later.

Then, make sure to set up your GOPATH properly, eg. here is mine:

export GOPATH=${HOME}/go:${HOME}/src/lczero-client

Here, I've set my system install of go as the first entry, and then the lczero-client directory as the second.

Pre-reqs:

# (Bug workaround, using Tilps instead)
# go get -u github.com/notnil/chess
go get -u github.com/Tilps/chess
go get -u github.com/nightlyone/lockfile

Pull or download the master branch

Then to produce a lczero-client executable: go build lc0_main.go for the lc0 client

Running

First copy the lc0 executable into the same folder as the lczero-client executable.

Then, run! Username and password are required parameters.

./lczero-client --user=myusername --password=mypassword

For testing, you can also point the client at a different server:

./lczero-client --hostname=http://127.0.0.1:8080 --user=test --password=asdf

Cross-compiling

One of the main reasons I picked go was it's amazing support for cross-compiling.

Pre-reqs:

GOOS=windows GOARCH=amd64 go install
GOOS=darwin GOARCH=amd64 go install
GOOS=linux GOARCH=amd64 go install

Building the client for each platform:

GOOS=windows GOARCH=amd64 go build -o lczero-client.exe
GOOS=darwin GOARCH=amd64 go build -o lczero-client_mac
GOOS=linux GOARCH=amd64 go build -o lczero-client_linux

Core symbols most depended-on inside this repo

getExtraParams
called by 7
lc0_main.go
getNetwork
called by 5
lc0_main.go
createCmdWrapper
called by 2
lc0_main.go
launch
called by 2
lc0_main.go
resultToNum
called by 2
lc0_main.go
checkValidNetwork
called by 2
lc0_main.go
acquireLock
called by 2
lc0_main.go
postParams
called by 2
src/client/client_http.go

Shape

Function 24
Struct 4
Method 2

Languages

Go100%

Modules by API surface

lc0_main.go24 symbols
src/client/client_http.go6 symbols

For agents

$ claude mcp add lczero-client \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact