Self Checks / 自检
Related App / 涉及应用
All supported apps / 通用功能
Problem or Motivation / 问题或动机
Currently, the "Open Terminal" action uses a fixed startup command for each app.
This works for the default workflow, but it is too limited for users who want CC Switch to inject the selected provider environment and then run a custom terminal/session command.
Common examples:
- Some users manage terminal sessions with Zellij or Tmux, and do not want CC Switch to directly launch the app command. They want CC Switch to open the selected terminal, inject provider environment variables, and then attach/create a session:
zellij attach --create {sessionName}
tmux new -A -s {sessionName}
- Some Claude Code users need to append startup flags, for example:
claude --settings {settingsFile} --dangerously-skip-permissions
- Some users launch apps through wrapper commands or aliases:
hapi claude --settings {settingsFile}
At the moment, these workflows require manually re-running commands after the terminal opens, which makes the "Open Terminal" action less useful for session-managed or wrapper-based workflows.
Related issues:
Proposed Solution / 建议方案
Add an optional provider-level "Terminal startup command" template.
When empty, CC Switch keeps the existing default behavior.
When configured, the existing "Open Terminal" flow should:
- Use the selected terminal app as configured today, such as Terminal.app, iTerm2, Warp, etc.
- Apply the selected provider configuration and inject provider environment variables
- Run the configured command template instead of the built-in default startup command
This keeps terminal selection and startup command customization separate:
- terminal preference controls where the command runs
- terminal startup command controls what runs after the provider environment is loaded
Useful template variables could include:
{settingsFile}: temporary provider config/settings file path
{providerId}: selected provider id
{sessionName}: generated safe session name
{app}: current app type
{cwd}: selected working directory
Additional Context / 补充信息
Example commands:
zellij attach --create {sessionName}
tmux new -A -s {sessionName}
claude --settings {settingsFile} --dangerously-skip-permissions
hapi claude --settings {settingsFile}
This should be backward compatible: if the command template is empty, each app should continue using its current default startup command.
Contribution / 参与贡献
Self Checks / 自检
I have read the FAQ section in README.
我已阅读 README 中的常见问题。
I have searched for existing issues, including closed ones.
我已搜索过已有的 Issue,包括已关闭的。
Related App / 涉及应用
All supported apps / 通用功能
Problem or Motivation / 问题或动机
Currently, the "Open Terminal" action uses a fixed startup command for each app.
This works for the default workflow, but it is too limited for users who want CC Switch to inject the selected provider environment and then run a custom terminal/session command.
Common examples:
zellij attach --create {sessionName} tmux new -A -s {sessionName}claude --settings {settingsFile} --dangerously-skip-permissionshapi claude --settings {settingsFile}At the moment, these workflows require manually re-running commands after the terminal opens, which makes the "Open Terminal" action less useful for session-managed or wrapper-based workflows.
Related issues:
Proposed Solution / 建议方案
Add an optional provider-level "Terminal startup command" template.
When empty, CC Switch keeps the existing default behavior.
When configured, the existing "Open Terminal" flow should:
This keeps terminal selection and startup command customization separate:
Useful template variables could include:
{settingsFile}: temporary provider config/settings file path{providerId}: selected provider id{sessionName}: generated safe session name{app}: current app type{cwd}: selected working directoryAdditional Context / 补充信息
Example commands:
zellij attach --create {sessionName} tmux new -A -s {sessionName} claude --settings {settingsFile} --dangerously-skip-permissions hapi claude --settings {settingsFile}This should be backward compatible: if the command template is empty, each app should continue using its current default startup command.
Contribution / 参与贡献
我有兴趣参与开发此功能。