Wrapper to launch Claude Code in a dedicated kitty terminal with tmux
Project description
clauthing
A snazzy wrapper around claude code, using kitty and tmux. Keep all you claude codes in one place and some useful commands which take advantage of hooks and tmux pop ups. Deterministic skills.
THIS IS BUGGY ALPHA SOFTWARE; IT IS AI-GENERATED AND NOT WELL REVIEWED. It does, however, contain some magic and I wanted to throw it onto the internet so others could use it.
Only tested on Linux.
Features
:commandto run DETERMINISTIC actions written in python:cdcommand to change directory:forkcommand to clone a conversation:permissionsto view permissions:ruleto modularly define context which is always laded.:skillSKILL to creeate a new school:reloadto restart claude at the same point with new features::skill newto define a template to be deterministally added to the context at this point using ::new- Various other features
Planned features: Use any terminal, rather than just kitty.
Changelog
1.0.0 - Basic packaging up of one I am using. I was mostly using --one-tab
1.1.0 - Fixed a bunch of bugs in multi-window setting since I am using it. :resume, :cd, got multi logging working. End-to-end tests
Motivation
Claude code has a number of features that that I want which are absent from the claude desktop app. Mostly things related to programmatic access to messages, hooks surrounding messages being sent, and the ability to run deterministic commands.
However, I will likely still want to use a terminal even while using claude code and I don't want claude codes cluttering up all my terminal windows. Rather, I want claude codes in one place ans terminals in another. I, therefore, want to wrap up claude code in a kitty window running tmux away from terminals.
As a side effect, wrapping claude with tmux lets me do lots of weird magic to add features.
Alternatives and prior work
This is terrible. It is a wrapper around claude code and mostly implemented using tmux and kitty. However, it is usable and I use it and it gives you access to the claude code subscription while still using claude as as the underlying harness.
This means you get access to claude's cheaper subscriptin models, with additional features, without violating their tems and conditions.
If you are willing to spend more money you can use API based usage rather than sunscription based usage and use something like opencode or PI. I have not used these myself as I want to use the cheaper model. Chatgpt is compatible with open code.
Installation
pipx install clauthing
Install kitty and tmux
Usage
clauthing
Single window
I have a mode of development where I cycle through a lot of separate x11 windows. I use --one-tab for this.
Shorcuts
Tab Switching
- Alt+h - Switch to previous window
- Alt+l - Switch to next window
- Alt+o - Toggle to last window (switch between current and previous)
Other Useful Keybindings
- Ctrl+n - Open new window
- Ctrl+w - Close current window (won't close if it's the last one)
- Alt+r - reload the curent window
Colon commands
There are some commands implemented with hooks. Type :help to see the commands.
Doublecolon skills
Claude has skills but they are stuck in the mindset of "allow claude to do the orchestration". Colon skills are a clauthing specific feature. If you type ::blah the blah skill is immediately sent to claude.
To create the skill blah you can use ::skill blah.
Session Storage
Session metadata is stored in ~/.local/state/clauthing/sessions/ and open sessions are tracked in ~/.config/clauthing/open-sessions.json (for debugging purposes only - liable to change).
Testing
Fast tests (no credentials needed):
./run-tests
Live tests run a real claude session and require a credential snapshot:
# One-time: open a browser OAuth flow and capture the resulting credentials
creds-for-claude get > /tmp/creds.json
# Verify the credentials work
creds-for-claude check < /tmp/creds.json
# Run the live :cd test
python live_tests/test_cd_live.py
creds-for-claude is a separate tool (pipx install creds-for-claude) that drives a
fresh claude through OAuth login in an isolated temp directory and captures the
resulting tokens — so live tests never touch your main claude config.
Contributing
I'm vibe coding. You're vibe coding. I suggest you create a fork named clauthing-whatever and try to get people to use it. Send me your fork in a PR, describing what it does in as much detail as you can muster and I will have an LLM tell me what is going on and reimplement your idea.
About
I am @readwith. As part of my work i make a stream of tools related to AI-coding and useing a computer in general. If this is interesting I suggest following me on github. If I am interesting, follow me on X.
Image from Lewis Carroll.
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 clauthing-1.1.1.tar.gz.
File metadata
- Download URL: clauthing-1.1.1.tar.gz
- Upload date:
- Size: 115.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8664861a1ec30b1ed3060991ebd0d0493caf23b0f176861dc321bb090485c5e9
|
|
| MD5 |
f291e860c0e22fc9758d2e95fe2912ab
|
|
| BLAKE2b-256 |
886cd273d352a18ff17f3333c53bccb7dcd56354e5390cf626ea1c7e38ae5064
|
File details
Details for the file clauthing-1.1.1-py3-none-any.whl.
File metadata
- Download URL: clauthing-1.1.1-py3-none-any.whl
- Upload date:
- Size: 136.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0631d75621a4e7d02433b8440054ff94ce00011c607e2672417c7eca8a54702
|
|
| MD5 |
c3f3fb71b94539f02e88e79b2883d083
|
|
| BLAKE2b-256 |
6ccd28231120a92a8a7575d8feca8b17b0b67892037b24a52d3859a3882a8a97
|