ChatIRC is a small curses-based IRC-like client that uses OpenAI chat models as the assistant backend. It aims for a keyboard-first, compact UX inspired by classic IRC clients like BitchX and iirc.
- Per-room chat logs and message history
- Slash commands:
/room,/rooms,/save,/load,/nick,/topic,/help,/quit,/getkey,/invite - Tab-completion for commands/rooms and persistent input history
- Unicode-aware wrapping and optional
wcwidthdependency for accurate layout - Background API calls so the UI stays responsive
- Create and activate a virtualenv (recommended):
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtecho "sk-..." > openapi_key
2. Provide your OpenAI API key. Recommended: create a per-user hidden file under ~/.chatirc/openapi_key (preferred), or put openapi_key in the project directory:
Preferred (per-user):
mkdir -p ~/.chatirc
echo "sk-..." > ~/.chatirc/openapi_key
chmod 600 ~/.chatirc/openapi_keyFallback (project-local):
echo "sk-..." > openapi_key
chmod 600 openapi_keyYou can also set OPENAI_API_KEY as an environment variable.
- Run the client:
python3 chatirc.py/getkey— opens the OpenAI API keys page in your browser/invite <email>— opens your mail client with a templated invite (replace the placeholder link with your GitHub release URL)/help— lists commands
- To build a single-file binary using PyInstaller:
./build.sh- A
Makefiletargetmake buildruns the script. The resulting binary will appear underdist/.
- Do NOT commit your
openapi_keyfile into version control. It's ignored via.gitignore. - Consider storing the key under
~/.chatirc/openapi_keyfor multi-project installs; the current default matches the working directory fileopenapi_key.
Pull requests welcome. See TODO.md for in-progress ideas.
MIT
-
The
assets/directory containsappicon.pngand theme images. When building with PyInstaller the workflow bundles these files with--add-dataso the runtime can access them. At runtime the helperget_asset_path(name)resolves the correct absolute path whether running from source or from a PyInstaller one-file bundle (viasys._MEIPASS). -
Windows: the CI attempts to convert
assets/appicon.pngto a.icousing ImageMagick if available and passes it to PyInstaller via--icon. -
If you want guaranteed OS-native icons ensure
.ico(for Windows) and.icns(for macOS) files are present inassets/and update the workflow to use them.
- Tests are run with pytest in CI. Locally you can run:
python3 -m pip install -r requirements.txt
pytest -q