Feature request: `rtk init` support for custom config dirs (claude-multi compatibility)
#1.103 aberto em 9 de abr. de 2026
Métricas do repositório
- Stars
- (48.085 stars)
- Métricas de merge de PR
- (Mesclagem média 11d 1h) (45 fundiu PRs em 30d)
Description
Description
Users of claude-multi manage multiple isolated Claude Code instances, each with its own config directory (e.g. ~/.claude, ~/.claude-glm, ~/.claude-minimax). Currently rtk init only targets the default ~/.claude/ directory.
This causes two problems for multi-instance setups:
-
Hooks not installed in other instances —
~/.claude-glm/hooks/doesn't getrtk-rewrite.sh, so no token savings when usingclaude-glm. -
Repeated "external import" prompt —
@RTK.mdin~/.claude/CLAUDE.mdresolves to a file outside the project directory. Every non-default instance prompts on every new project:Allow external CLAUDE.md file imports? This project's CLAUDE.md imports files outside the current working directory.
Steps to Reproduce
- Install claude-multi:
npm install -g claude-multi - Add a GLM instance:
claude-multi add glm --provider glm --api-key "your-key" - Run
rtk init -g(installs to~/.claude/only) - Open any project with
claude-glm— observe the external import prompt - Check
~/.claude-glm/hooks/— no rtk hook installed
Expected Behavior
Two independent improvements that would together solve this:
A. Custom config dir support for rtk init:
rtk init --config-dir ~/.claude-glm— install hook + CLAUDE.md to a specific instance- Or
rtk init --all-instances— auto-detect all claude-multi managed dirs and install into each
B. Inline @RTK.md content into CLAUDE.md:
- Replace the
@RTK.mdfile import with inline content duringrtk init - This eliminates the "external import" warning for all users, not just multi-instance ones
- Hooks are still installed separately per instance via (A), which is always needed
(A) and (B) are complementary — hooks must land in each instance's settings.json, while (B) removes the import annoyance entirely.
Environment
- OS: Ubuntu 24.04 (Linux 6.8.0-106-generic)
- RTK Version: 0.35.0
- claude-multi: latest
- Claude Code: managed via claude-multi with multiple providers (Anthropic, GLM)