TUI launcher for Claude Code
Project description
TUI launcher for Claude Code with profile, GitHub account, version, model, directory, MCP, and permission switching.
Quick start
./c # launch the TUI
./c --help # show all flags
The first run creates ~/.claudelauncher/ populated with defaults (config, segments, options, themes).
Requirements: Python 3.14+ on the PATH. No third-party packages.
The segment bar
The TUI is a single horizontal "segment bar" rendered at the vertical centre of the terminal. Each segment is a labelled cell whose value can be cycled, searched, or freely edited. Above and below the focused segment, a vertical "fan-out" shows the other available options dimmed in the segment's accent colour. Pressing Enter on any segment launches Claude Code with the current selections.
Keys:
- Left / Right -- move focus between segments (also exits freeform edit mode)
- Up / Down -- cycle the focused segment's value (blank state
---is part of the ring) - Type characters -- start fuzzy search (on
searchablesegments) or freeform edit (onfreeformsegments) - Tab -- accept the current fuzzy match and advance to the next segment
- Backspace -- delete a search/edit character (on a non-empty selected value, starts edit mode)
- Esc -- cancel the in-progress search or edit
- Enter -- launch
- q or Ctrl-C -- quit without launching
Search shows the matched characters in the search-match colour. The search buffer turns red when no option matches.
Narrow terminals
When the segment bar is wider than the terminal, the renderer switches to a scrolling viewport:
- The focused segment is centered horizontally
- Edge arrows (
<2,3>) show how many segments are off-screen in each direction - A minimap in the top-right corner shows all segments as small colored squares; the focused one has an opaque background highlight
- Partially visible segments at the viewport edges are clipped rather than wrapped
The viewport activates automatically and deactivates when the terminal is resized wider. All rendering is identical to the non-scrolling case when the bar fits.
Segment types
| Key | Label | Controls |
|---|---|---|
profile |
Profile | Maps to CLAUDE_CONFIG_DIR (e.g. ~/.claude-personal) |
github |
GH | Selects the GitHub account; gh auth token --user <acct> exported as GH_TOKEN |
version |
Ver | Picks the Claude Code binary in ~/.local/share/claude/versions/ |
model |
Model | Sets the model ID (ANTHROPIC_MODEL); [1m] suffix enables 1M-context |
directory |
Dir | Working directory to cd into before launch |
mcp |
MCP | MCP profile mode (default, strict) |
permissions |
Perms | Permission mode passed to Claude Code (bypass, default, plan, auto) |
Profile, GitHub, and Model are creatable: their option lists end with a + sentinel that prompts for a new value and persists it to options.json. Directory is freeform: you can type any path. Version pulls a live npm listing merged with the locally installed binaries.
CLI flags
One-shot commands
c --versions # list installed versions, mark which one `claude` points to
c --install 2.1.119 # download and install a Claude Code binary from GCS
c --uninstall 2.1.104 # remove an installed binary (refuses if it is the current symlink target)
c --reset-options # delete options.json so defaults regenerate next run
c --show # print last_config, theme, default flags, recent dirs
c --config # open ~/.claudelauncher/ in $EDITOR
c --health # run pre-launch health checks and exit
c --new-profile # interactive wizard to create a new Claude Code profile
c --migrate SRC DST # migrate session artifacts between profiles
c --migrate --dry-run S D # preview migration without changes
c --redir OLD NEW # redirect session data after a project directory rename
c --redir --dry-run O N # preview redirect without changes
Segment overrides
Every enabled segment gets its own --<key> flag. These pre-fill the TUI:
c --profile work --github mhxv
c --directory ~/Projects/foo --model claude-opus-4-7
If the override set covers every required segment, the TUI is skipped entirely and Claude Code launches directly.
Session passthrough
Mutually exclusive flags forwarded to Claude Code:
c -c # --continue: resume the most recent session
c -r # --resume: open Claude Code's session picker
c -r 0123abcd # --resume <id>: jump to a specific session
c -p "summarize this repo" # --print: non-interactive print mode
These compose with segment overrides: c --profile personal -r opens the picker against the personal profile.
Print mode (-p) skips the TUI and launches Claude Code non-interactively. Extra flags after -- are passed through:
c -p "explain auth.py" -- --output-format json --allowedTools "Read,Bash"
Config directory
~/.claudelauncher/ layout:
| Path | Purpose | Auto-written? |
|---|---|---|
config.json |
Theme, enabled segments, default flags, health-check switch, minimap mode | No (user-edited) |
segments.json |
Segment definitions (label, width, wrap, searchable, etc.) | No |
options.json |
Values, metadata, and discovery configs per segment | Only via + UX |
state.json |
last_config, recent_dirs, launch_count, npm cache |
Yes, every launch |
themes/*.json |
Colour schemes (dark.json, light.json ship by default) |
No |
hooks/* |
Executable scripts -- see below | No |
Defaults are regenerated on first run if any file is missing.
On startup, missing keys from the current defaults are merged into existing files (config, segments, themes) without overwriting user values. Schema-versioned migrations handle value changes that must be applied once (e.g. correcting a default).
Hooks
Drop an executable script into ~/.claudelauncher/hooks/ whose name starts with pre-launch (e.g. pre-launch-token-refresh). It runs immediately before exec, with the chosen segment values exported as CL_<KEY> environment variables:
#!/usr/bin/env bash
# ~/.claudelauncher/hooks/pre-launch-warn-work
if [[ "$CL_PROFILE" == "work" && "$CL_DIRECTORY" == "$HOME/Projects/personal-thing" ]]; then
echo "Refusing to use the work profile on a personal project." >&2
exit 1
fi
A nonzero exit aborts the launch (and prevents launch_count from being incremented). Hooks have a 10-second timeout.
Adding new options
- Profile / GitHub / Model: cycle the segment to its
+sentinel, press Enter, type the new value. It is appended tooptions.jsonunder the segment'svalueslist and selected. - Direct edit: open
~/.claudelauncher/options.jsonand add to the relevant segment'svaluesarray. For profiles you also need ametadata.<name>.config_direntry. - Install a Claude Code version: run
c --install <version>or pick a not-yet-installed version in the TUI and confirm the install prompt. Binaries land in~/.local/share/claude/versions/<version>.
Themes
Two themes ship with the launcher: dark.json and light.json in ~/.claudelauncher/themes/. Switch by setting theme in config.json to the file's basename. Themes define per-segment foreground / focus / option / unavailable colours and the search highlight palette. Add a new theme by writing another themes/<name>.json and pointing config.json at it.
Themes also include an overflow section for viewport chrome:
| Key | Controls |
|---|---|
arrow_fg |
Colour of the <N / N> edge scroll indicators |
minimap_fg |
Colour of unselected minimap squares |
minimap_focused_bg |
Background highlight on the focused minimap square |
minimap_char |
Character used for minimap squares (default ▪) |
Tests
cd /home/m/Projects/claudewheel
python3 -m unittest discover tests/
240+ stdlib unittest tests covering segment cycling, fuzzy matching, requires-evaluation, install/manifest parsing, discovery merge logic, viewport scrolling, and config migration. Runs in under one second.
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 claudewheel-0.3.2.tar.gz.
File metadata
- Download URL: claudewheel-0.3.2.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4af8f053a0d19376754da210dc786eab25fe665e07016c795dd60677ca6d9539
|
|
| MD5 |
032615b65ae536122b66d1dfe6c8dc10
|
|
| BLAKE2b-256 |
b577506a81473e0b9a2a9dfe6bec03dc94f4aa05d7a0eb00b63d3a330c04bb5d
|
Provenance
The following attestation bundles were made for claudewheel-0.3.2.tar.gz:
Publisher:
publish.yml on smm-h/claudewheel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudewheel-0.3.2.tar.gz -
Subject digest:
4af8f053a0d19376754da210dc786eab25fe665e07016c795dd60677ca6d9539 - Sigstore transparency entry: 1502492017
- Sigstore integration time:
-
Permalink:
smm-h/claudewheel@a05cbec0142b904e5f6b23327bb9cd0c2b50454d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/smm-h
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a05cbec0142b904e5f6b23327bb9cd0c2b50454d -
Trigger Event:
release
-
Statement type:
File details
Details for the file claudewheel-0.3.2-py3-none-any.whl.
File metadata
- Download URL: claudewheel-0.3.2-py3-none-any.whl
- Upload date:
- Size: 56.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8aca5f676ac184778401aa3528787ddc59c2da5037e3742a049f28ac30871b1
|
|
| MD5 |
bc2a4b6b96a8a68ac18a90ed838d5ed4
|
|
| BLAKE2b-256 |
797522d721f0b8002b3ca15e1a3fa7cdcb0ca2d4c25242724226c1d048b766a0
|
Provenance
The following attestation bundles were made for claudewheel-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on smm-h/claudewheel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudewheel-0.3.2-py3-none-any.whl -
Subject digest:
c8aca5f676ac184778401aa3528787ddc59c2da5037e3742a049f28ac30871b1 - Sigstore transparency entry: 1502492063
- Sigstore integration time:
-
Permalink:
smm-h/claudewheel@a05cbec0142b904e5f6b23327bb9cd0c2b50454d -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/smm-h
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a05cbec0142b904e5f6b23327bb9cd0c2b50454d -
Trigger Event:
release
-
Statement type: