-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Description
Currently, custom commands in Forge must be placed in flat directories (~/forge/commands or .forge/commands), making it difficult to organize large sets of commands. This feature request proposes adding namespace support to enable hierarchical command organization using folder structures.
Current Behavior
Command files are loaded from flat directories:
~/forge/commands/.forge/commands/
After loading, commands are available as /command
Proposed Changes
Enable organizing commands in nested folders, where folder names become namespaces in the command invocation path.
Example Structure
~/forge/commands/
git/
commit.md
rebase.md
pr.md
docker/
build.md
run.md
database/
postgres/
backup.md
restore.md
Resulting Commands
/git:commit/git:rebase/git:pr/docker:build/docker:run/database:postgres:backup/database:postgres:restore
Benefits
- Better Organization - Group related commands logically by category
- Scalability - Manage large command sets without cluttering single directory
- Discoverability - TAB completion shows available commands within namespace (e.g., typing
/git:+ TAB lists all git-related commands) - Flexibility - Unlimited nesting depth for complex command hierarchies
- Namespace Clarity - Clear command context from invocation path
Additional Context
This pattern is common in modern CLI tools and would significantly improve command management for users with extensive custom command libraries.
Metadata
Metadata
Assignees
Labels
No labels