Cathook is a Team Fortress 2 Linux internal DLC.
This project is currently in beta. Some features may be broken, unfinished, unstable, or may not work at all. Expect bugs, crashes, missing behavior, and issues.
Doesnt matter what cheat you use, get ready for a gameban.
Cathook builds into a shared object that is injected into the TF2 process. It reads game state, calls Source Engine interfaces, hooks selected client/runtime functions, and renders or automates features from inside the game.
Useful project details:
- The build uses a unity-style entry point in
src/cathook.cpp. - Runtime files live under
/opt/cathookby default. - Built libraries are installed to
/opt/cathook/bin. - Runtime assets from
assets/are installed to/opt/cathook/assets. - Runtime configs are stored as
.catfiles under/opt/cathook/configsby default, includingdefault.cat. - Logs are written under
/opt/cathook/logs.
For Source Engine interface and structure references, see Valve's Source SDK 2013 Multiplayer.
Officially supported Linux distros are Debian, Ubuntu, Linux Mint, Debian-close distros, and Manjaro. Other distros may work if the dependency installer has a matching package script, but they are not officially supported.
Install build dependencies for your distro:
./install-depsInstall dependencies, build Cat, install runtime files, and prepare the bundled botpanel:
./setup.shBuild Cat and choose the mode from the first-run terminal menu:
sudo ./build.shThe saved mode is reused by build.sh, inject.sh, preload, debug.sh, and the Docker build wrappers. Remove ~/.config/cathook/mode or set CATHOOK_MODE_FILE to choose a different preference file.
Build an explicit mode:
sudo ./build.sh --default
sudo ./build.sh --textmode
sudo ./build.sh --bothFor a local build without installing to /opt/cathook, use ./build.sh --no-install.
For local development, use dev mode to skip repository update checks and avoid reset paths:
sudo ./build.sh --dev
sudo ./inject.sh --dev
./setup.sh --devYou can also set CATHOOK_DEV_MODE=1 for build.sh, inject.sh, setup.sh, or botpanel/update.
--no-update is accepted as an alias for --dev.
Attach to a running TF2 process:
sudo ./inject.shUse the textmode binary when attaching, overriding the saved mode:
sudo CATHOOK_MODE=textmode ./inject.sh
sudo TEXTMODE=1 ./inject.shinject.sh refreshes /opt/cathook/assets and clears old cathook/exception logs before loading the library.
It stages the temporary dlopen copy through /proc/<pid>/root, checks that the target process can read it, and retries alternate runtime directories when Ubuntu/Steam Runtime path isolation hides a staged file.
It also copies any bundled /opt/cathook/bin/libGLEW.so.* next to the temporary library.
To build in the repo's Linux container:
./docker_build.shOn PowerShell hosts:
./docker_build.ps1Use ./preload before launching TF2 when the library needs to be loaded before game modules are ready. It uses the saved mode unless CATHOOK_MODE, TEXTMODE, CATHOOK_TEXTMODE, or CATHOOK_BINARY overrides it.
src/cathook.cpp- unity build entry pointsrc/core/- shared runtime systems, hooks, logging, config, diagnosticssrc/features/- gameplay, automation, visual, movement, combat, and menu featuressrc/games/tf2/sdk/- TF2-facing entities, interfaces, materials, and SDK typessrc/external/- bundled third-party code such as ImGui, MD5, libsigscan, and funchook headersassets/- runtime fonts, sounds, and textures copied from upstream cathook databotpanel/- bundled catbot IPC server and web panelpackages/- distro dependency installers used byinstall-deps
Do you want to submit code to Cathook? Open a pull request and keep changes focused.
Currently, pupnoodle is the only maintainer, so reviews and issue responses may take time.
Keep code simple, direct, and consistent with the existing style:
- Use
snake_case. - Prefer small focused functions and POD-style data where practical.
- Keep platform-specific behavior isolated.
Discord: https://discord.gg/sARNsbvBps
This project is based on TeamFortress2-Linux-Internal.
nullworks - original cathook creators
DrCoomer - cheat i based the "cathook" on
GatoPotato658 - Unibox. without him there would be nothing
Salmon - Salmonpaste.
