@@ -343,6 +343,7 @@ pi install https://github.com/user/repo@v1 # tag or commit
|
|||||||
pi install ssh://git@github.com/user/repo
|
pi install ssh://git@github.com/user/repo
|
||||||
pi install ssh://git@github.com/user/repo@v1 # tag or commit
|
pi install ssh://git@github.com/user/repo@v1 # tag or commit
|
||||||
pi remove npm:@foo/pi-tools
|
pi remove npm:@foo/pi-tools
|
||||||
|
pi uninstall npm:@foo/pi-tools # alias for remove
|
||||||
pi list
|
pi list
|
||||||
pi update # skips pinned packages
|
pi update # skips pinned packages
|
||||||
pi config # enable/disable extensions, skills, prompts, themes
|
pi config # enable/disable extensions, skills, prompts, themes
|
||||||
@@ -432,11 +433,12 @@ pi [options] [@files...] [messages...]
|
|||||||
### Package Commands
|
### Package Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pi install <source> [-l] # Install package, -l for project-local
|
pi install <source> [-l] # Install package, -l for project-local
|
||||||
pi remove <source> [-l] # Remove package
|
pi remove <source> [-l] # Remove package
|
||||||
pi update [source] # Update packages (skips pinned)
|
pi uninstall <source> [-l] # Alias for remove
|
||||||
pi list # List installed packages
|
pi update [source] # Update packages (skips pinned)
|
||||||
pi config # Enable/disable package resources
|
pi list # List installed packages
|
||||||
|
pi config # Enable/disable package resources
|
||||||
```
|
```
|
||||||
|
|
||||||
### Modes
|
### Modes
|
||||||
|
|||||||
@@ -183,12 +183,13 @@ ${chalk.bold("Usage:")}
|
|||||||
${APP_NAME} [options] [@files...] [messages...]
|
${APP_NAME} [options] [@files...] [messages...]
|
||||||
|
|
||||||
${chalk.bold("Commands:")}
|
${chalk.bold("Commands:")}
|
||||||
${APP_NAME} install <source> [-l] Install extension source and add to settings
|
${APP_NAME} install <source> [-l] Install extension source and add to settings
|
||||||
${APP_NAME} remove <source> [-l] Remove extension source from settings
|
${APP_NAME} remove <source> [-l] Remove extension source from settings
|
||||||
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
|
${APP_NAME} uninstall <source> [-l] Alias for remove
|
||||||
${APP_NAME} list List installed extensions from settings
|
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
|
||||||
${APP_NAME} config Open TUI to enable/disable package resources
|
${APP_NAME} list List installed extensions from settings
|
||||||
${APP_NAME} <command> --help Show help for install/remove/update/list
|
${APP_NAME} config Open TUI to enable/disable package resources
|
||||||
|
${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list
|
||||||
|
|
||||||
${chalk.bold("Options:")}
|
${chalk.bold("Options:")}
|
||||||
--provider <name> Provider name (default: google)
|
--provider <name> Provider name (default: google)
|
||||||
|
|||||||
@@ -118,12 +118,14 @@ Examples:
|
|||||||
${getPackageCommandUsage("remove")}
|
${getPackageCommandUsage("remove")}
|
||||||
|
|
||||||
Remove a package and its source from settings.
|
Remove a package and its source from settings.
|
||||||
|
Alias: ${APP_NAME} uninstall <source> [-l]
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-l, --local Remove from project settings (.pi/settings.json)
|
-l, --local Remove from project settings (.pi/settings.json)
|
||||||
|
|
||||||
Example:
|
Examples:
|
||||||
${APP_NAME} remove npm:@foo/bar
|
${APP_NAME} remove npm:@foo/bar
|
||||||
|
${APP_NAME} uninstall npm:@foo/bar
|
||||||
`);
|
`);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -147,8 +149,14 @@ List installed packages from user and project settings.
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parsePackageCommand(args: string[]): PackageCommandOptions | undefined {
|
function parsePackageCommand(args: string[]): PackageCommandOptions | undefined {
|
||||||
const [command, ...rest] = args;
|
const [rawCommand, ...rest] = args;
|
||||||
if (command !== "install" && command !== "remove" && command !== "update" && command !== "list") {
|
let command: PackageCommand | undefined;
|
||||||
|
if (rawCommand === "uninstall") {
|
||||||
|
command = "remove";
|
||||||
|
} else if (rawCommand === "install" || rawCommand === "remove" || rawCommand === "update" || rawCommand === "list") {
|
||||||
|
command = rawCommand;
|
||||||
|
}
|
||||||
|
if (!command) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user