mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
feat: add update command to CLI
Adds 'superclaude update' as a convenience command for updating installed commands. This is equivalent to 'install --force' but provides better user experience. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,38 @@ def install(target: str, force: bool, list_only: bool):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@main.command()
|
||||||
|
@click.option(
|
||||||
|
"--target",
|
||||||
|
default="~/.claude/commands/sc",
|
||||||
|
help="Installation directory (default: ~/.claude/commands/sc)",
|
||||||
|
)
|
||||||
|
def update(target: str):
|
||||||
|
"""
|
||||||
|
Update SuperClaude commands to latest version
|
||||||
|
|
||||||
|
Re-installs all slash commands to match the current package version.
|
||||||
|
This is a convenience command equivalent to 'install --force'.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
superclaude update
|
||||||
|
superclaude update --target /custom/path
|
||||||
|
"""
|
||||||
|
from .install_commands import install_commands
|
||||||
|
|
||||||
|
target_path = Path(target).expanduser()
|
||||||
|
|
||||||
|
click.echo(f"🔄 Updating SuperClaude commands to version {__version__}...")
|
||||||
|
click.echo()
|
||||||
|
|
||||||
|
success, message = install_commands(target_path=target_path, force=True)
|
||||||
|
|
||||||
|
click.echo(message)
|
||||||
|
|
||||||
|
if not success:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@main.command()
|
@main.command()
|
||||||
@click.argument("skill_name")
|
@click.argument("skill_name")
|
||||||
@click.option(
|
@click.option(
|
||||||
|
|||||||
Reference in New Issue
Block a user