
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
A command-line interface for managing OpenCode pets plugins. This tool allows you to validate plugins and display information about available pets listed in the local opencode.json file.
The CLI is included in the pets package. To build and use it:
# Build the CLI
npm run build-cli
# Use directly
./pets.sh <command> [options]
# Or use with node
node src/core/cli.js <command> [options]
validateValidate plugins in current directory or pets directory.
Options:
-a, --all - Validate all plugins in pets directory-p, --plugin <name> - Validate a specific plugin by name-d, --directory <path> - Specify pets directory (default: ./pets)Examples:
# Validate current directory
pets validate
# Validate all plugins in ./pets
pets validate --all
# Validate specific plugin
pets validate --plugin jira
# Validate with custom directory
pets validate --all --directory ./my-plugins
listList available pets from local opencode.json file.
Options:
-d, --directory <path> - Specify directory to search for opencode.json (default: .)Examples:
# List pets from current directory
pets list
# List from custom directory
pets list --directory ./config
infoRun validation and list available pets in one command.
Options:
-d, --directory <path> - Specify directory to search (default: .)-p, --pets-dir <path> - Specify pets directory (default: ./pets)Examples:
# Run validation and list pets
pets info
# Use custom directories
pets info --directory ./config --pets-dir ./my-plugins
initCreate a new pets.json configuration file.
Options:
-d, --directory <path> - Specify directory to create pets.json (default: .)-f, --force - Overwrite existing pets.json-t, --template <type> - Template to use: basic, full, development (default: basic)Templates:
basic: Minimal configuration with version and plugins arrayfull: Complete configuration with settings and metadatadevelopment: Development-focused configuration with sample pluginsExamples:
# Create basic configuration
pets init
# Create full configuration with settings
pets init --template full
# Overwrite existing configuration
pets init --force --template development
configManage pets.json configuration settings.
Options:
-d, --directory <path> - Specify directory with pets.json (default: .)-s, --set <key=value> - Set configuration value-g, --get <key> - Get configuration value-l, --list - List all configurationExamples:
# Show all configuration
pets config --list
# Get specific setting
pets config --get settings.autoValidate
# Set configuration value
pets config --set settings.autoValidate=true
# Set nested value
pets config --set settings.defaultPetsDirectory="./my-pets"
addAdd a plugin to pets.json configuration.
Options:
-d, --directory <path> - Specify directory with pets.json (default: .)-p, --plugin <path> - Plugin path to add (required)-n, --name <name> - Plugin name (optional, auto-detected)-e, --enabled - Enable plugin (default: true)Examples:
# Add plugin with auto-detected name
pets add --plugin ./pets/jira
# Add plugin with custom name
pets add --plugin ./custom/path --name my-plugin
# Add disabled plugin
pets add --plugin ./pets/gitlab --enabled false
removeRemove a plugin from pets.json configuration.
Options:
-d, --directory <path> - Specify directory with pets.json (default: .)-p, --plugin <path> - Plugin path to remove-n, --name <name> - Plugin name to removeExamples:
# Remove by path
pets remove --plugin ./pets/jira
# Remove by name
pets remove --name jira
showDisplay current pets.json configuration in a readable format.
Options:
-d, --directory <path> - Specify directory with pets.json (default: .)Examples:
# Show current configuration
pets show
# Show configuration from custom directory
pets show --directory ./config
helpShow help information.
# 1. Build CLI
npm run build-cli
# 2. Create local configuration
./pets.sh init --template full
# 3. Add plugins to local config
./pets.sh add --plugin ./pets/jira --name jira
./pets.sh add --plugin ./pets/gitlab --name gitlab
# 4. Check all plugins are valid
./pets.sh validate --all
# 5. See what pets are configured locally
./pets.sh show
# 6. Get combined validation and listing
./pets.sh info
# Create development configuration with sample plugins
./pets.sh init --template development
# Validate a single plugin during development
./pets.sh validate --plugin my-new-plugin
# Check current directory plugin
./pets.sh validate
# Add new plugin to local config
./pets.sh add --plugin ./my-plugin --name my-plugin
# Configure settings
./pets.sh config --set settings.autoValidate=false
# Test with different configurations
./pets.sh list --directory ./test-config
# Initialize new configuration
./pets.sh init --template full
# Add plugins
./pets.sh add --plugin ./pets/jira --name "Jira Plugin"
./pets.sh add --plugin ./pets/gitlab --name "GitLab Plugin"
# Manage configuration
./pets.sh config --list
./pets.sh config --get settings.autoValidate
./pets.sh config --set settings.defaultPetsDirectory="./my-plugins"
# Remove plugins
./pets.sh remove --name "Jira Plugin"
# Show current state
./pets.sh show
# Validate a single plugin during development
./pets.sh validate --plugin my-new-plugin
# Check current directory plugin
./pets.sh validate
# Test with different configurations
./pets.sh list --directory ./test-config
The CLI provides clear, emoji-enhanced output:
The CLI integrates seamlessly with OpenCode workflows:
opencode.json for available petsThe pets.json file allows local configuration of plugins:
{
"version": "1.0.0",
"created": "2025-11-19T15:39:56.996Z",
"plugins": [
{
"name": "jira",
"path": "./pets/jira",
"enabled": true,
"description": "Jira integration plugin",
"added": "2025-11-19T15:40:00.000Z"
}
]
}
{
"version": "1.0.0",
"created": "2025-11-19T15:39:56.996Z",
"description": "Local pets configuration",
"settings": {
"autoValidate": true,
"showWarnings": true,
"defaultPetsDirectory": "./pets"
},
"plugins": [
{
"name": "jira",
"path": "./pets/jira",
"enabled": true,
"description": "Jira & Confluence integration",
"added": "2025-11-19T15:40:00.000Z"
}
]
}
name: Plugin identifier (string, required)path: Relative or absolute path to plugin (string, required)enabled: Whether plugin is active (boolean, default: true)description: Plugin description (string, optional)added: When plugin was added (ISO date string, auto-generated)autoValidate: Automatically validate plugins on operations (boolean, default: true)showWarnings: Show validation warnings (boolean, default: true)defaultPetsDirectory: Default directory to search for plugins (string, default: "./pets")The CLI expects this structure:
project/
βββ pets.json # Local plugin configuration
βββ opencode.json # OpenCode configuration (optional)
βββ pets/ # Plugin directory
β βββ plugin1/
β β βββ package.json
β β βββ index.ts
β β βββ opencode.json
β βββ plugin2/
β βββ package.json
β βββ index.ts
β βββ opencode.json
βββ src/core/
βββ cli.js # Compiled CLI
βββ cli.ts # CLI source
The CLI provides helpful error messages for common issues:
opencode.json filesTo extend the CLI:
src/core/cli.ts for new commandssrc/core/validate-plugin.ts for validation logicnpm run build-cli./pets.sh helpFAQs
CLI and runtime for OpenPets - AI plugin infrastructure
The npm package openpets receives a total of 19 weekly downloads. As such, openpets popularity was classified as not popular.
We found that openpets demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.