How should per-project install work? — follow-up to #309 #351
Replies: 2 comments
-
|
Sorry for the slow reply on this. I'm wondering if we need a global / project context switcher in the TUI. Default mode is global, installs are to That would allow two completely separate configs without just adding more main menu items. I think that's clean. Thoughts? |
Beta Was this translation helpful? Give feedback.
-
|
No rush at all on the reply — I've got plenty on my end, so happy to pick this up whenever it suits you. The switcher is cleaner than the per-scope rows I floated, and it settles the part I was least sure about (not piling more entries onto the install menu). 👍 On #58: @jackall3n's open PR already builds most of the config side — and uses the same
Since this builds directly on his work, I'd love to loop @jackall3n back in — he proposed the original approach, and ideally we land the finished thing crediting all three (his config foundation, your hook-routing + design, and I'll take the glue/UI). Only if you're both happy with that. What #58 doesn't have: the install/hook side (it doesn't touch The install/hook half is your One thing worth deciding up front: the hooks/statusLine would live in A few smaller things to pin down:
Happy to take the glue + UI here, building on #58 + |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Was poking through the #309 branch and noticed your
25595a4("fix: sync hooks to installed settings target") — looks like the per-scope hook part is already mostly there. You added atargetPathargument tosyncWidgetHooksso hooks land in whichever settings file the install targets, anisKnownCommandcheck so we don't write hook entries next to someone's custom non-ccstatusline statusLine, and a test pinning down "hooks follow the install, not whichever statusLine ends up active."For the UI side: each scope (user-global, project-local) shows up as its own row in the menu, with the current state on the right — installed or not, refresh interval if set, plus a marker on whichever one Claude Code is actually using. Enter on a row drills into install / uninstall / reinstall / edit-refresh for that scope. Same idea as the existing flow where you pick a line and then edit its items — just at the scope level.
One thing I noticed while looking at this:
buildCommandinsrc/utils/claude-settings.ts:251-255always usesgetConfigPath()no matter what. If I'm in project A's TUI and choose to install at user-global, project A's--configpath ends up baked into the global command — which would then apply to every project. Making it scope-aware fixes that. Small change but worth doing in the same PR.On hooks: with your
targetPath/isKnownCommandwork in place, Anthropic's docs say identical hook command strings dedupe automatically when merged across files. So if both scopes have the same install command, the hook fires once; if they differ (per-project--config), it fires once per scope, and a small fix on the Skills count side handles that cleanly. Open question — would you want me to build on top of25595a4on a follow-up branch, or rebase onto current main and redo the same hook-routing shape there?Beta Was this translation helpful? Give feedback.
All reactions