hjk rm
Remove an instance, including its container and git worktree.
Synopsis
hjk rm <branch> [flags]
Description
Removes an instance entirely. This command:
- Stops the container if running
- Deletes the container
- Deletes the git worktree
- Removes the instance from the catalog
Warning: This deletes uncommitted work in the worktree. Make sure to commit or stash any changes you want to keep before removing an instance.
Arguments
| Argument | Description |
|---|---|
branch | Git branch name of the instance to remove (required) |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--force | -f | bool | false | Skip confirmation prompt |
Examples
# Remove with confirmation prompt
hjk rm feat/auth
# Force remove without confirmation
hjk rm feat/auth --force
Confirmation Prompt
Without the --force flag, the command displays:
This will remove instance <id> for branch <branch>.
Worktree at <path> will be deleted.
Are you sure? [y/N]
Type y or yes to confirm, or any other input (including Enter) to cancel.
See Also
- hjk stop - Stop without removing
- hjk ps - List instances
- hjk recreate - Recreate container without removing worktree