Playground for experimenting with custom client code for itch.io
  • TypeScript 100%
Find a file
2025-08-21 21:56:50 -04:00
.idea basic implementation of itch API client 2025-08-21 21:14:28 -04:00
src remove commented code from Client 2025-08-21 21:56:50 -04:00
.gitignore convert to TypeScript and implement CategoriesModel / Filter 2025-08-06 20:37:48 -04:00
package-lock.json convert to TypeScript and implement CategoriesModel / Filter 2025-08-06 20:37:48 -04:00
package.json basic implementation of itch API client 2025-08-21 21:14:28 -04:00
readme.md factor main logic into itch.ts 2025-08-07 12:52:46 -04:00
tsconfig.json enable TypeScript strict mode 2025-08-07 22:48:02 -04:00

itch-client-stuff

Getting Started

  1. Log into itch.io using a web browser, and use dev tools to capture the cookies being sent. You're specifically looking for itchio, itchio_id, and itchio_token.
  2. Create a file src/secrets.ts and enter export const cookie = 'YOUR COOKIES HERE';. Do not ever share this file, as the cookie grants full access to your account!
  3. Run npm install to install dependencies.
  4. Run npm run run to run the tool. (yes that's two "run"s - it's not a typo!)

Repo overview

  • src/index.ts - main entry point.
  • src/itch.ts - implements useItch() function for building simple scripts based on common logic.
  • src/secrets.ts - storage for any secrets that should not be commited to git.
  • src/data3.ts - implementation of Data3, a custom flat-file KV database. (check the git history to see what happened to Data2 and Data(1))
  • src/client.ts - itch.io API client. Uses a mix of REST APIs and HTML scraping to obtain data.
  • src/filter.ts - programmable filter utility. Not fully implemented, but will eventually be used to progressively build filters from the UI.
  • src/util/* - static utility functions.
  • src/util/stringUtils.ts - unicode hell.
  • src/model/* - "model" classes, which implement a typed repository model over Data3 stores.
  • src/model/model.ts - base class for all models, extend this if adding a new model type.

Yeah and that's about it, for now. There's no UI yet so just add whatever filters you want in the bottom part of index.ts, and npm run nun will automatically build your changes.