CLI for League of Comic Geeks
Project description
locg
Command-line interface for League of Comic Geeks. Browse releases, search series, manage your collection, pull list, wish list, and read list.
All output is JSON, making it easy to pipe into jq or other tools.
Installation
pip install .
# or
pipx install .
For development:
pip install -e ".[test]"
Authentication
Some commands (collection, pull-list, wish-list, read-list, add, remove, update) require a League of Comic Geeks account.
locg login
This persists your session in ~/.config/locg/playwright-profile/.
Commands
search
Search for comic series by title.
locg search "batman"
locg search "amazing spider-man" --pretty
releases
View new comic releases for a given week. Defaults to the current week (Wednesday is new comic day).
locg releases
locg releases --date 2026-04-02 --pretty
check
Check which lists a comic belongs to. Accepts one or more comic IDs (requires login).
locg check 9559460
locg check 9559460 8823401 --pretty
lookup
Resolve LOCG comic IDs in batch from Series:Issue[:Variant] specs. Groups requests by series so each unique series is searched only once, then uses a title-filtered query against that series_id to pinpoint each issue (a small response per issue, no pagination dance through 140-issue pages). By default also fetches your collection once and reports in_collection per row; pass --no-collection to skip the auth + fetch.
locg lookup "Uncanny X-Men:185" "Batman:224" "Amazing Spider-Man:142" --pretty
locg lookup "Uncanny X-Men:179:Newsstand" --no-collection
locg lookup "Batman: The Long Halloween:9" # series names with internal ":" are fine
Output per row:
{
"series_name": "Uncanny X-Men", "issue_number": "185", "variant": null,
"series_id": 108806, "locg_id": 1081721, "locg_variant_id": null,
"issue_name": "Uncanny X-Men #185", "in_collection": false,
"from_cache": false
}
Resolved IDs are cached to disk at $XDG_CACHE_HOME/locg/ids.json (default ~/.cache/locg/ids.json) and reused on subsequent runs — repeat lookups skip the API entirely (from_cache: true). Pass --no-cache to bypass for both reads and writes. Manage the cache with locg cache stats and locg cache clear.
Series matching prefers the canonical run (exact name, then preferred publisher, then oldest start year, then highest issue count), so "Batman" resolves to the 1940 DC run instead of a recent one-shot. If a series or issue can't be resolved, that row gets an "error" field; the rest of the batch still completes.
cache
Inspect or clear the on-disk LOCG ID cache used by lookup. The cache is a single JSON file; entries never auto-expire because LOCG IDs are stable.
locg cache stats # path, entry count, file size
locg cache clear # delete every cached ID
comic
Get full details for a specific comic by ID (publisher, price, creators, description, etc.).
locg comic 9559460
locg comic 9559460 --pretty
series
Get a series overview and its issue list.
locg series 149498
locg series 149498 --pretty
collection
View your collected comics (requires login). Filter by title with --title. Check if a specific title is in your collection with has.
locg collection --pretty
locg collection --title "batman" --pretty
locg collection has "Amazing Spider-Man #300"
pull-list
View your pull list (requires login).
locg pull-list --pretty
wish-list
View your wish list (requires login).
locg wish-list --pretty
read-list
View your read list (requires login).
locg read-list --pretty
add
Add a comic to a list (requires login). Lists: pull, collection, wish, read. When adding to collection, optionally record grade and price in the same step.
locg add collection 9559460
locg add pull 9559460
locg add collection 9559460 --grade 8.5 --price 390
--grade accepts CGC scale values: 0, 0.1, 0.3, 0.5, 1.0 ... 9.8, 9.9, 10.0. Only valid for collection.
remove
Remove a comic from a list (requires login). Lists: pull, collection, wish, read.
locg remove collection 9559460
locg remove wish 9559460
update
Update grade, price, or condition notes on a comic already in your collection (requires login). At least one flag is required.
locg update 9559460 --grade 9.2
locg update 9559460 --price 500 --condition "white pages"
locg update 9559460 --grade 9.8 --price 450 --condition "off-white pages"
login
Log in to League of Comic Geeks. Prompts for username and password.
locg login
Global Flags
| Flag | Description |
|---|---|
--pretty |
Pretty-print JSON output with indentation |
--fields name,id |
Limit output to specific fields (works on any command) |
--debug |
Print HTTP request/response debug info to stderr |
--version |
Show version and exit |
Output Format
All commands output JSON. Errors are written to stderr as {"error": "message"}.
Example output for locg search "batman" --pretty:
[
{
"id": 149498,
"name": "Batman",
"publisher": "DC Comics",
"start_year": 2016,
"end_year": 2020,
"issue_count": 150,
"cover_url": "https://...",
"url": "https://leagueofcomicgeeks.com/comics/series/149498/batman"
}
]
Configuration
Config and cookies are stored in ~/.config/locg/ (respects XDG_CONFIG_HOME).
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file locg-0.2.0.tar.gz.
File metadata
- Download URL: locg-0.2.0.tar.gz
- Upload date:
- Size: 315.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6153f4c24bbc78f8f821cbc406ade16ab7e99d335ab8590b36c44d22c04a8b67
|
|
| MD5 |
732838c36d96a1ad74f3417f3af4841f
|
|
| BLAKE2b-256 |
c78b38c207ac176092cdfd77553285dbf0c5f2fd32f39fb38a9941ecebb29744
|
File details
Details for the file locg-0.2.0-py3-none-any.whl.
File metadata
- Download URL: locg-0.2.0-py3-none-any.whl
- Upload date:
- Size: 50.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d45b2e0718091c6e45c89ce6befb1a66d0adfaf29661bc787b55a28d8b38fd
|
|
| MD5 |
62bd0a7a4a56d669f13314321d09014a
|
|
| BLAKE2b-256 |
db82bd16f9012a3b03d5eb1496df00a3a41516cb6cd922bdff21bdb1ba645bbd
|