feat(llm): auto-start proxy after setup when proxy-mode tools are configured
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 300
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 184
Description
Currently thv llm setup detects proxy-mode tools (Cursor, VS Code, Xcode), patches their config files, then exits with a printed reminder:
One or more tools use proxy mode. Start the proxy with: thv llm proxy start
(see pkg/llm/setup.go:141-142)
Users must manually run thv llm proxy start in a separate terminal and keep it running. This is an extra friction step that is easy to miss and causes proxy-mode tools to silently fail.
Proposal: When thv llm setup detects at least one proxy-mode tool, automatically start the proxy process (equivalent to thv llm proxy start) at the end of setup rather than just printing a reminder. This could be:
- Foreground (blocking) — simple, consistent with current
thv llm proxy startbehavior - Background daemon — lower friction but adds complexity (PID management, restart on reboot)
The foreground option is the minimal change: after persisting tool configs, if hasProxyMode(configured) is true, call the proxy start logic directly instead of (or in addition to) printing the reminder message.
Notes:
- Token-helper / direct-mode tools (Claude Code, Gemini CLI) do NOT need the proxy and should be unaffected.
- The proxy could still be exposed as a standalone
thv llm proxy startcommand for users who want explicit control or need to restart it independently.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pkg/llm/setup.go:141-142 and trace the existing thv llm proxy start entry point. Determine how setup persists proxy-mode tool configurations and how the chosen foreground or background startup should integrate, while leaving token-helper/direct-mode tools unchanged. Done means proxy-mode tools work immediately after setup and standalone proxy start remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100