JKL CLI
Quick Start
- •Confirm which binary is installed: prefer
jkl; if missing, tryjkl2. - •Run inside tmux for TUI features.
- •Launch the TUI:
jkl tui. - •Open pane status selector:
jkl tui --pane-state --session-name "<session_name...>" --pane-id "<pane_id>".
Safety Notes
- •Always include the tmux session name when updating metadata.
- •When updating a pane, always include
--pane-id. - •Set
--pane-nameonly when initially labeling panes (usually at the beginning of a session); avoid repeatedly changing pane names during normal status/context updates. - •Update pane context when needed; do not modify session context unless explicitly requested.
- •Avoid editing
~/.config/jkl/session_context.jsondirectly unless asked.
Command Map
- •
tui- •
jkl tuiopens the main TUI. - •
jkl tui --pane-state --session-name <session_name...> --pane-id <pane_id>opens the pane status selector for a specific pane.
- •
- •
upsert- •Session metadata:
jkl upsert <session_name...> [--session-id <session_id>] [--status <status>] [--context <text...>]. - •Pane metadata:
jkl upsert <session_name...> --pane-id <pane_id> [--pane-name <pane_name>] [--status <status>] [--context <text...>]. - •Prefer setting
--pane-nameonce at session start, then using later upserts for status/context only.
- •Session metadata:
- •
rename- •
jkl rename <session_id> <session_name...>renames the session entry keyed bysession_id.
- •
- •
sync- •
jkl syncremoves persisted sessions/panes that no longer exist in tmux. - •Session matching is ID-first and falls back to session name.
- •If a session was renamed in tmux, sync updates
session_nameand moves the entry to the newblake3(session_name)key.
- •
Status Values
- •Use
working,waiting,done, ornone(case-insensitive). - •Omit
--statusto leave the current status unchanged.
TMUX Context Helpers
- •Session name:
tmux display-message -p '#S' - •Session id:
tmux display-message -p '#{session_id}' - •Pane id:
tmux display-message -p '#{pane_id}'
Data Locations
- •Context file:
~/.config/jkl/session_context.json(created automatically if missing). - •Log file:
~/.config/jkl/jkl.log.
Examples
- •Update session status:
- •
jkl upsert "work" --status working
- •
- •Update pane status and context:
- •
jkl upsert "work" --pane-id %1 --status waiting --context "debugging timeout"
- •
- •Set pane name at session start:
- •
jkl upsert "work" --pane-id %1 --pane-name "planner"
- •
- •Rename a session entry:
- •
jkl rename "${SESSION_ID}" "new name"
- •
- •Reconcile persisted metadata with tmux:
- •
jkl sync
- •
Notes
- •Multi-word session names and context values can be passed as multiple tokens; use
--before options if a value could be parsed as a flag.