mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-19 08:28:06 +02:00
feat(cli): let ktx setup --agents choose an install directory (#298)
Split the fused directory concept into projectDir (what the agent config references) and installRoot (where project-scoped files are written), so users can install .claude/, .mcp.json, skills, and rules where they open their agent instead of only in the ktx project directory. - Add --install-dir <path> (resolved against cwd, created if missing, mutually exclusive with --global/--local, rejected for claude-desktop). - Add an interactive directory menu: ktx project dir / Current directory (hidden when it equals the project dir) / Custom directory… / Global scope (shown only when every target supports it). - Expand a leading ~ in typed/quoted paths so the ~/… menu hints round-trip. - Record installRoot in the install manifest and merge key; thread it through file planning, MCP config paths, summaries, and next actions. - Refresh uv.lock to 0.12.0 for the editable ktx-sl and ktx-daemon packages.
This commit is contained in:
parent
ed44f46f2a
commit
4e61020089
10 changed files with 650 additions and 70 deletions
|
|
@ -29,6 +29,7 @@ below.
|
|||
| `--agents` | Install agent configuration and rules only | `false` |
|
||||
| `--target <target>` | Agent target: `claude-code`, `claude-desktop`, `codex`, `cursor`, `opencode`, or `universal` | - |
|
||||
| `--global` | Install agent integration into the global target scope for `claude-code` or `codex` | `false` |
|
||||
| `--install-dir <path>` | Directory to install project-scoped agent config into. Defaults to the ktx project directory; resolved against the current directory and created if missing. Use it to install `.claude/`, `.mcp.json`, and rules where you open your agent (e.g. `--install-dir .`). Mutually exclusive with `--global` and `--local` | ktx project dir |
|
||||
| `--yes` | Accept project creation and runtime install defaults where setup asks for confirmation | `false` |
|
||||
| `--no-input` | Disable interactive terminal input | - |
|
||||
|
||||
|
|
|
|||
|
|
@ -68,19 +68,30 @@ If you choose an install mode, it then asks which targets to install:
|
|||
└
|
||||
```
|
||||
|
||||
When every selected target supports both project and global setup, the command
|
||||
also asks where to install supported agent config:
|
||||
When at least one selected target supports project-scoped setup, the command
|
||||
asks where to install agent config:
|
||||
|
||||
```txt
|
||||
◆ Where should ktx install supported agent config?
|
||||
◆ Where should ktx install agent config?
|
||||
│
|
||||
│ ktx project: /path/to/your/ktx-project
|
||||
│
|
||||
│ ○ Project scope (ktx project directory)
|
||||
│ ○ ktx project directory /path/to/your/ktx-project
|
||||
│ ○ Current directory /path/to/where/you/ran/ktx
|
||||
│ ○ Custom directory… (enter a path)
|
||||
│ ○ Global scope (user config)
|
||||
└
|
||||
```
|
||||
|
||||
The first three choices write project-scoped files (`.claude/`, `.mcp.json`,
|
||||
`.cursor/`, skills, and rules) into the chosen directory while still pointing
|
||||
them at this ktx project. Use **Current directory** or **Custom directory…**
|
||||
when you open your coding agent from somewhere other than the ktx project
|
||||
directory. **Current directory** is hidden when it is already the ktx project
|
||||
directory, and **Global scope** appears only when every selected target
|
||||
supports global setup. Non-interactive runs pass `--install-dir <path>` (for
|
||||
example `--install-dir .`) for the same result.
|
||||
|
||||
## Generated files
|
||||
|
||||
**ktx** writes MCP client configuration and analytics guidance by default. It writes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue