Plugins & Extensions: How to Extend Pocket Code's Capabilities
Learn how to install, configure, and create your own plugins to customize your development experience in Pocket Code.
Plugins & Extensions: How to Extend Pocket Code's Capabilities
Plugins are the heart of customization in Pocket Code. With the extension system, you can tailor the IDE exactly to your workflow.
What are plugins?
Plugins are modules that extend Pocket Code's base functionality. They can add:
- Support for new languages
- Code analysis tools
- Integration with external services
- Custom themes and styles
- Shortcuts and automations
Installing your first plugin
Open the Marketplace from the sidebar menu and search for the plugin you need. Tap Install and it will activate automatically.
Recommended plugins to get started
| Plugin | Description | Category |
|---|---|---|
| Prettier | Automatic code formatting | Productivity |
| ESLint | Static analysis for JavaScript | Quality |
| GitLens | Advanced Git visualization | Version control |
| REST Client | Test APIs directly | Tools |
| Tailwind CSS IntelliSense | Autocomplete for Tailwind | Frontend |
Plugin configuration
Each plugin has its own configuration section accessible from Settings > Plugins:
{
"prettier": {
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5"
},
"eslint": {
"autoFixOnSave": true,
"rules": {
"no-unused-vars": "warn"
}
}
}
Creating your own plugin
Pocket Code's plugin SDK lets you create extensions with JavaScript:
// my-plugin/index.js
export default {
name: "my-plugin",
version: "1.0.0",
activate(context) {
// Your initialization code
context.registerCommand("myPlugin.greeting", () => {
context.showMessage("Hello from my plugin!");
});
},
deactivate() {
// Cleanup when deactivated
},
};
Plugin structure
my-plugin/
βββ package.json # Plugin metadata
βββ index.js # Entry point
βββ README.md # Documentation
βββ assets/ # Icons and resources
βββ icon.svg
Publishing
- Package your plugin with
pocket-cli pack - Upload the file to the Marketplace
- Wait for review (24-48 hours)
- Available for the community!
SDK API
The SDK provides access to:
- Editor API β Manipulate text, selections, and cursors
- File System API β Read and write project files
- UI API β Create panels, buttons, and notifications
- Terminal API β Execute commands
- Git API β Version control operations
Best practices
- Performance: Only load what's needed on startup
- Permissions: Only request permissions you actually use
- Documentation: Include a clear README
- Versioning: Follow SemVer for updates
- Testing: Test on different screen sizes
Plugins make Pocket Code an infinitely adaptable IDE. Explore the Marketplace or create your own extensions to boost your productivity.