rtk-ai/rtk

Feature request: `rtk init` support for custom config dirs (claude-multi compatibility)

Open

#1,103 opened on Apr 9, 2026

View on GitHub
 (3 comments) (2 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clieffort-mediumenhancementhelp wantedplatform:linuxpriority:low

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (Avg merge 11d 1h) (45 merged PRs in 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:

  1. Hooks not installed in other instances — ~/.claude-glm/hooks/ doesn't get rtk-rewrite.sh, so no token savings when using claude-glm.

  2. Repeated "external import" prompt@RTK.md in ~/.claude/CLAUDE.md resolves 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

  1. Install claude-multi: npm install -g claude-multi
  2. Add a GLM instance: claude-multi add glm --provider glm --api-key "your-key"
  3. Run rtk init -g (installs to ~/.claude/ only)
  4. Open any project with claude-glm — observe the external import prompt
  5. 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.md file import with inline content during rtk 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)

Contributor guide