https://github.com/manuelgil/vscplugit
A TypeScript CLI tool for downloading, installing, and uninstalling VSCode extensions.
https://github.com/manuelgil/vscplugit
downloader vscode vsix
Last synced: 3 months ago
JSON representation
A TypeScript CLI tool for downloading, installing, and uninstalling VSCode extensions.
- Host: GitHub
- URL: https://github.com/manuelgil/vscplugit
- Owner: ManuelGil
- License: mit
- Created: 2025-03-22T00:27:19.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-03-22T00:35:03.000Z (10 months ago)
- Last Synced: 2025-09-07T15:46:33.583Z (4 months ago)
- Topics: downloader, vscode, vsix
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/vscplugit
- Size: 139 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
- Support: SUPPORT.md
Awesome Lists containing this project
README
# vscplugit
[](https://www.npmjs.com/package/vscplugit)
[](https://www.npmjs.com/package/vscplugit)
[](https://github.com/ManuelGil/vscplugit)
[](./LICENSE)
## Overview
**vscplugit** is an ESM-only, TypeScript-based CLI tool for downloading, installing, and uninstalling Visual Studio Code extensions. Leveraging modern packages like [inquirer](https://www.npmjs.com/package/inquirer) and [ora](https://www.npmjs.com/package/ora) alongside the robust [vscode-marketplace-client](https://www.npmjs.com/package/vscode-marketplace-client) API, vscplugit offers a streamlined way to manage your VSCode extensions directly from the command line.
## Index
- [vscplugit](#vscplugit)
- [Overview](#overview)
- [Index](#index)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
- [Download Extension](#download-extension)
- [Install Extension](#install-extension)
- [Example: Install from Existing VSIX File](#example-install-from-existing-vsix-file)
- [Example: Download Then Install](#example-download-then-install)
- [Combined Installation Example](#combined-installation-example)
- [Debugging \& Verbose Mode](#debugging--verbose-mode)
- [Uninstall Extension](#uninstall-extension)
- [Error Handling](#error-handling)
- [Support](#support)
- [Feedback](#feedback)
- [Follow Me](#follow-me)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [Changelog](#changelog)
- [License](#license)
## Features
- **Download Extensions:** Retrieve the latest VSCode extension VSIX file from the marketplace.
- **Install Extensions:** Install an extension either from an existing VSIX file or by downloading the latest version first.
- **Uninstall Extensions:** Remove a VSCode extension using its publisher and extension name.
- **ESM-Only Architecture:** Fully leverages modern ESM features in Node.js (v18+).
- **Modular Command Registration:** Built using SOLID principles for easy extension and maintenance.
- **Clear Error Handling:** Uses custom error classes to provide precise and descriptive error messages.
## Installation
Install **vscplugit** globally using npm:
```bash
npm install -g vscplugit
```
Or clone the repository and build it locally:
```bash
git clone https://github.com/ManuelGil/vscplugit.git
cd vscplugit
npm install
npm run build
```
## Usage
After installation, use **vscplugit** from your command line. Below are some examples.
### Download Extension
Download the latest VSCode extension VSIX file:
```bash
vscplugit download --publisher --extension [--output ]
```
**Options:**
- `--publisher, -p`: Publisher name of the extension.
- `--extension, -e`: Name of the extension.
- `--output, -o`: (Optional) Directory where the VSIX file will be saved (default: `./downloads`).
### Install Extension
The install command is versatile—it can download the VSIX file before installing it or install directly from an existing VSIX file.
#### Example: Install from Existing VSIX File
```bash
vscplugit install --publisher --extension --file /path/to/extension.vsix
```
**Options:**
- `--file, -f`: Path to an existing VSIX file to install.
#### Example: Download Then Install
If you do not supply a VSIX file, the tool will download the latest VSIX file from the marketplace before installing it:
```bash
vscplugit install --publisher --extension [--output ]
```
**Options:**
- `--output, -o`: (Optional) Directory to save the downloaded VSIX file (default: `./downloads`).
#### Combined Installation Example
You can combine options to customize your workflow. For example, to install an extension while specifying both a download directory and a fallback VSIX file path:
```bash
vscplugit install --publisher ms-vscode --extension cpptools --output ./my-downloads --file ./fallback/cpptools.vsix
```
In this scenario, if the fallback VSIX file isn’t found, the tool downloads the file to `./my-downloads` before proceeding with the installation.
#### Debugging & Verbose Mode
For more detailed output during execution, you can enable verbose logging (if supported by your environment):
```bash
VERBOSE=true vscplugit download --publisher ms-vscode --extension cpptools
```
> **Note:** Ensure you are using Node.js v18+ and an ESM-compatible shell.
### Uninstall Extension
Remove a VSCode extension by specifying its publisher and extension name:
```bash
vscplugit uninstall --publisher --extension
```
**Options:**
- `--publisher, -p`: Publisher name of the extension.
- `--extension, -e`: Name of the extension.
## Error Handling
vscplugit employs custom error classes for precise error management. For example:
```typescript
try {
// Execute a command
} catch (error) {
if (error instanceof ExtensionNotFoundError) {
console.error('Extension not found:', error.message);
} else if (error instanceof VersionNotFoundError) {
console.error('Version not found:', error.message);
} else if (error instanceof VsixFileNotFoundError) {
console.error('VSIX file not found:', error.message);
} else {
console.error('An unexpected error occurred:', error);
}
}
```
## Support
If you encounter any issues or have suggestions for improvements, please [open an issue](https://github.com/ManuelGil/vscplugit/issues) on GitHub.
## Feedback
If you enjoy using CodeMark+, please consider leaving a review on the [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=imgildev.vscode-marketplace-client).
## Follow Me
Stay updated on the latest features, improvements, and future projects by following me:
- [GitHub](https://github.com/ManuelGil)
- [Twitter (X)](https://twitter.com/imgildev)
## Contributing
We welcome contributions from the community! To contribute, fork the [GitHub repository](https://github.com/ManuelGil/vscplugit) and submit a pull request.
Before contributing, please review our [Contribution Guidelines](./CONTRIBUTING.md) for details on coding standards and best practices.
## Code of Conduct
We strive to create a welcoming, inclusive, and respectful environment for all contributors. Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) before participating in this project.
## Changelog
See the full list of changes in the [CHANGELOG.md](./CHANGELOG.md) file.
## License
This extension is licensed under the MIT License. See the [MIT License](https://opensource.org/licenses/MIT) for more details.