tmc-cli - The Modding Community
The API, From Your Terminal
tmc-cli is a command-line client for our public content API. It creates, edits and deletes your assets, mods, servers, articles, communities, collections and groups, and, because that is what the API is actually used for, it uploads files and cuts releases in one command.
Install it from a clone. tmc-cli is not on PyPI yet, so pip installs it from the public repository. The three steps are further down.
$ tmc auth whoamiprofile defaultsite https://moddingcommunity.comauthMode tokentoken tmc_ab…9fcanRead truecanWrite truecanDelete falseA single standard-library package, so there is nothing to build and nothing to resolve. It is not on PyPI, so it installs from a clone. Every command, flag and exit code is written up in the docs.
Three Steps, No Package Index
tmc-cli is not on PyPI. It installs from a clone of the public repository, needs Python 3.11 or newer and pulls in no other packages.
One Tool, Six Corners Of The API
Command names are exactly what is typed. Run tmc --help for the full list.
Releases From One Command
Cutting a release through the raw API is four requests in a particular order: upload the files, collect their ids, read the release set that already exists, then write the new one back without disturbing the others. release publish is that sequence.
What The CLI Can Do
One command for each thing you would do in the browser, plus a few you would not want to do by hand: bulk edits, pipelines and scripted releases.
Keys, Profiles And The Public Half
Log in once and the credential is stored in ~/.config/tmc/config.json at mode 0600, or hand it over in the environment and nothing touches disk at all. One profile per site or per key, and --anon for the half of the API that needs no key in the first place.
Four Verbs That Say What They Do
The dangerous one is set: on this API a PUT to a relation means "this is now the complete set", so a one-member PUT deletes everything else on the item. The CLI keeps the four apart and warns before it sends the destructive one.
Use It In CI
Build your project, cut a release and upload its files on every tag. Credentials come from the environment, so nothing is written to disk on a runner.
