name: dx-hub-config
description: View and edit hub configuration — add repos, adjust terminal delay. Use to manage hub settings. Trigger on "hub config", "add repo to hub", "terminal delay".
when_to_use: "Use to view and edit hub configuration — add repos, adjust terminal delay. Trigger on 'hub config', 'add repo to hub', 'terminal delay', 'configure hub', or 'edit hub settings'."
argument-hint: "[show | add-repo | terminal-delay ]"
allowed-tools: ["Read", "Edit", "Glob", "Grep", "Write", "Bash"]
You view and edit the hub configuration in .ai/config.yaml.
Pre-flight
Read .ai/config.yaml. If a hub: section is absent, STOP:
Hub mode is not configured. Run
/dx-hub-initfirst.
1. Parse Subcommand
Inspect $ARGUMENTS and route to the matching section:
| Subcommand | Action |
|---|---|
(none) or show |
Display current hub config |
add-repo <path> |
Discover and add a repo |
terminal-delay <seconds> |
Set seconds to wait for Claude to start in terminal |
2. show
Print hub settings in readable format:
Hub Configuration
─────────────────────────────────
Enabled: <hub.enabled>
Terminal delay: <hub.terminal-delay>s
State TTL: <hub.state-ttl>
Repos (<count>):
- <name> <path> [capabilities: <caps>] [base: <base-branch>] [project: <project>]
...
3. add-repo
- Resolve the path (expand
~, make absolute). - Check that
<path>/.ai/config.yamlexists. If not, STOP: "No.ai/config.yamlfound at<path>. Is this a dx-enabled project?" - Read
<path>/.ai/config.yamland extract:name(or derive from directory name)scm.base-branch(defaultmainif absent)scm.project(optional)
- Check for a duplicate: if
hub.reposalready contains an entry with the samename, STOP: "Repo<name>is already in the hub. Useshowto review current repos." - Append to
hub.reposin.ai/config.yaml:- name: <name> path: <resolved-path> base-branch: <base-branch> project: <project> # omit if absent - Print confirmation:
Added
<name>(<resolved-path>) to hub. Total repos:.
4. terminal-delay
- Validate
<seconds>is a positive integer between 1 and 30. If not, STOP: "Invalid delay<seconds>. Use a number between 1 and 30." - Update
hub.terminal-delayin.ai/config.yaml. - Print: > Terminal delay set to
<seconds>s.
Examples
/dx-hub-config
/dx-hub-config show
Prints current hub settings and all registered repos.
/dx-hub-config add-repo ../my-other-repo
Reads ../my-other-repo/.ai/config.yaml, extracts metadata, and adds the repo to the hub.
/dx-hub-config terminal-delay 8
Updates the terminal startup delay and confirms the change.
Troubleshooting
"Hub mode is not configured"
Cause: .ai/config.yaml has no hub: section.
Fix: Run /dx-hub-init to initialise hub mode first.
"No .ai/config.yaml found at <path>"
Cause: The target directory is not a dx-enabled project, or the path is wrong.
Fix: Run /dx-init in the target repo, then retry.
"Repo <name> is already in the hub"
Cause: A repo with that name is already registered.
Fix: Run /dx-hub-config show to review existing entries.