You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TUI loads every saved chat as a horizontal tab; users with many chats have to cycle through Ctrl+Tab to find a specific one, and there is no way to launch oterm directly into a particular chat from the shell.
Solution
Add an --chat <id_or_name> CLI flag (and a complementary --new flag for the inverse). When --chat is passed, look the chat up by integer id or by name — matching the most recent chat on a name collision — and set it as the active tab in on_mount. If no match is found, print a friendly error listing the available chats and exit non-zero.
This is a small, additive change: roughly 10-20 lines in src/oterm/cli/oterm.py to thread the option into the app, and a few lines in src/oterm/app/oterm.py#on_mount to set tabs.active after the existing tab-loading loop. No new dependencies.
Use case
Users can create shell aliases like alias code='oterm --chat=code-helper' or wrapper scripts that jump straight to a specific project chat, and compose with the existing --config flag for per-project context stores.
Alternatives considered
Fuzzy finder inside the TUI (issue a suggestion on historical chat selection #52): would also help, but solves a different problem (interactive discovery). A CLI flag is the right tool for scripted/aliased launch flows.
--last flag to open the most recent chat: would be a nice complement, but --chat <id_or_name> subsumes it (e.g. --chat last).
Problem
The TUI loads every saved chat as a horizontal tab; users with many chats have to cycle through
Ctrl+Tabto find a specific one, and there is no way to launch oterm directly into a particular chat from the shell.Solution
Add an
--chat <id_or_name>CLI flag (and a complementary--newflag for the inverse). When--chatis passed, look the chat up by integer id or by name — matching the most recent chat on a name collision — and set it as the active tab inon_mount. If no match is found, print a friendly error listing the available chats and exit non-zero.This is a small, additive change: roughly 10-20 lines in
src/oterm/cli/oterm.pyto thread the option into the app, and a few lines insrc/oterm/app/oterm.py#on_mountto settabs.activeafter the existing tab-loading loop. No new dependencies.Use case
Users can create shell aliases like
alias code='oterm --chat=code-helper'or wrapper scripts that jump straight to a specific project chat, and compose with the existing--configflag for per-project context stores.Alternatives considered
--lastflag to open the most recent chat: would be a nice complement, but--chat <id_or_name>subsumes it (e.g.--chat last).