feat: Change installation directory to ~/.claude/commands/sc/

- Updated default installation path from ~/.claude/commands/ to ~/.claude/commands/sc/
- This maintains the /sc: namespace through directory organization
- Updated install_commands() default path in install_commands.py
- Updated CLI --target default in main.py to ~/.claude/commands/sc
- Updated list_installed_commands() to look in sc subdirectory
- All tests passing (70 passed, 1 skipped)
- Verified real installation: commands now install to ~/.claude/commands/sc/

Commands retain their /sc: prefix through name field in frontmatter:
- /sc:research - Deep web research
- /sc:index-repo - Repository indexing
- /sc:agent - Specialized AI agents
- /sc:recommend - Command recommendations
- /sc - Main help/dispatcher

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
mithun50
2025-11-11 18:37:03 +01:00
parent 8c0559ca9a
commit ad80f57f63
8 changed files with 325 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
"""
Command Installation
Installs SuperClaude slash commands to ~/.claude/commands/ directory.
Installs SuperClaude slash commands to ~/.claude/commands/sc/ directory.
"""
from pathlib import Path
@@ -17,15 +17,15 @@ def install_commands(
Install all SuperClaude commands to Claude Code
Args:
target_path: Target installation directory (default: ~/.claude/commands)
target_path: Target installation directory (default: ~/.claude/commands/sc)
force: Force reinstall if commands exist
Returns:
Tuple of (success: bool, message: str)
"""
# Default to ~/.claude/commands
# Default to ~/.claude/commands/sc to maintain /sc: namespace
if target_path is None:
target_path = Path.home() / ".claude" / "commands"
target_path = Path.home() / ".claude" / "commands" / "sc"
# Get command source directory
command_source = _get_commands_source()
@@ -145,12 +145,12 @@ def list_available_commands() -> List[str]:
def list_installed_commands() -> List[str]:
"""
List installed commands in ~/.claude/commands/
List installed commands in ~/.claude/commands/sc/
Returns:
List of installed command names
"""
commands_dir = Path.home() / ".claude" / "commands"
commands_dir = Path.home() / ".claude" / "commands" / "sc"
if not commands_dir.exists():
return []

View File

@@ -28,8 +28,8 @@ def main():
@main.command()
@click.option(
"--target",
default="~/.claude/commands",
help="Installation directory (default: ~/.claude/commands)",
default="~/.claude/commands/sc",
help="Installation directory (default: ~/.claude/commands/sc)",
)
@click.option(
"--force",
@@ -46,8 +46,8 @@ def install(target: str, force: bool, list_only: bool):
"""
Install SuperClaude commands to Claude Code
Installs all slash commands (/research, /index-repo, etc.) to your
~/.claude/commands directory so you can use them in Claude Code.
Installs all slash commands (/sc:research, /sc:index-repo, etc.) to your
~/.claude/commands/sc directory so you can use them in Claude Code.
Examples:
superclaude install