UNPKG

@shutootaki/gwm

Version:
358 lines (354 loc) 9.58 kB
// gwm Fig/Kiro CLI completion spec // Generated by gwm completion // // Installation: // gwm completion install --kiro // // Manual installation: // Copy this file to ~/.fig/autocomplete/build/gwm.js var completionSpec = { "name": "gwm", "description": "Git worktree manager CLI", "subcommands": [ { "name": [ "list", "ls" ], "description": "List all worktrees for the current project" }, { "name": "add", "description": "Create a new worktree", "options": [ { "name": [ "-r", "--remote" ], "description": "Fetch from remote and create from remote branch" }, { "name": "--from", "description": "Specify the base branch", "args": { "name": "base_branch", "description": "Base branch to create worktree from", "isOptional": false, "generators": { "script": [ "bash", "-c", "gwm completion __fig_branches_local" ], "postProcess": "function(out) {\n return out.split('\\n').filter(Boolean).map(function(line) {\n var parts = line.split('\\t');\n return { name: parts[0], description: parts[1] };\n });\n}", "cache": { "ttl": 1000 } } } }, { "name": "--code", "description": "Open in VS Code after creation" }, { "name": "--cursor", "description": "Open in Cursor after creation" }, { "name": "--cd", "description": "Output path for shell integration" } ], "args": [ { "name": "branch_name", "description": "Name of the branch for the new worktree", "isOptional": true } ] }, { "name": "go", "description": "Go to a worktree directory", "options": [ { "name": [ "-c", "--code" ], "description": "Open in VS Code" }, { "name": "--cursor", "description": "Open in Cursor" } ], "args": [ { "name": "query", "description": "Search query to filter worktrees", "isOptional": true, "generators": { "script": [ "bash", "-c", "gwm completion __fig_worktrees" ], "postProcess": "function(out) {\n return out.split('\\n').filter(Boolean).map(function(line) {\n var parts = line.split('\\t');\n return { name: parts[0], description: parts[1] };\n });\n}", "cache": { "ttl": 1000 } } } ] }, { "name": [ "remove", "rm" ], "description": "Remove one or more worktrees", "options": [ { "name": [ "-f", "--force" ], "description": "Force remove without confirmation" }, { "name": "--clean-branch", "description": "Branch cleanup mode (auto, ask, never)", "args": { "name": "mode", "description": "Cleanup mode", "isOptional": false, "suggestions": [ "auto", "ask", "never" ] } } ], "args": [ { "name": "query", "description": "Search query to filter worktrees", "isOptional": true, "generators": { "script": [ "bash", "-c", "gwm completion __fig_worktrees" ], "postProcess": "function(out) {\n return out.split('\\n').filter(Boolean).map(function(line) {\n var parts = line.split('\\t');\n return { name: parts[0], description: parts[1] };\n });\n}", "cache": { "ttl": 1000 } } } ] }, { "name": "clean", "description": "Clean up safe-to-delete worktrees", "options": [ { "name": [ "-n", "--dry-run" ], "description": "Show candidates only, do not delete" }, { "name": "--force", "description": "Skip confirmation prompt" } ] }, { "name": "pull-main", "description": "Update main branch worktrees to latest state" }, { "name": "help", "description": "Show help for gwm or a specific command", "args": [ { "name": "command", "description": "Command to show help for", "isOptional": true, "generators": { "script": [ "bash", "-c", "gwm completion __fig_worktrees" ], "postProcess": "function(out) {\n return out.split('\\n').filter(Boolean).map(function(line) {\n var parts = line.split('\\t');\n return { name: parts[0], description: parts[1] };\n });\n}", "cache": { "ttl": 1000 } } } ] }, { "name": "completion", "description": "Manage shell completion", "subcommands": [ { "name": "script", "description": "Output completion script to stdout", "options": [ { "name": "--shell", "description": "Shell type (bash, zsh, fish)", "args": { "name": "shell", "description": "Shell type", "isOptional": false, "suggestions": [ "bash", "zsh", "fish" ] } } ] }, { "name": "install", "description": "Install completion for your shell", "options": [ { "name": "--shell", "description": "Shell type (bash, zsh, fish)", "args": { "name": "shell", "description": "Shell type", "isOptional": true, "suggestions": [ "bash", "zsh", "fish" ] } }, { "name": "--kiro", "description": "Install Kiro/Fig completion spec" }, { "name": "--dry-run", "description": "Show what would be done without making changes" }, { "name": "--modify-rc", "description": "Modify shell rc file (e.g., .zshrc)" }, { "name": "--path", "description": "Custom installation path", "args": { "name": "path", "description": "Installation directory", "isOptional": false } } ] }, { "name": "uninstall", "description": "Uninstall completion", "options": [ { "name": "--shell", "description": "Shell type (bash, zsh, fish)", "args": { "name": "shell", "description": "Shell type", "isOptional": true, "suggestions": [ "bash", "zsh", "fish" ] } }, { "name": "--kiro", "description": "Uninstall Kiro/Fig completion spec" } ] }, { "name": "status", "description": "Show completion installation status" }, { "name": "__complete", "description": "Internal: Generate completion candidates", "hidden": true, "options": [ { "name": "--shell", "description": "Shell type", "args": { "name": "shell", "isOptional": false, "suggestions": [ "bash", "zsh", "fish" ] } }, { "name": "--cword", "description": "Current word index", "args": { "name": "index", "isOptional": false } } ] }, { "name": "__fig_worktrees", "description": "Internal: Fig worktree candidates", "hidden": true }, { "name": "__fig_branches_local", "description": "Internal: Fig local branch candidates", "hidden": true }, { "name": "__fig_branches_remote", "description": "Internal: Fig remote branch candidates", "hidden": true } ] } ], "options": [ { "name": [ "-h", "--help" ], "description": "Show help information" } ] }; // CommonJS export if (typeof module !== 'undefined' && module.exports) { module.exports = completionSpec; } // ES Module export if (typeof exports !== 'undefined') { exports.default = completionSpec; }