This VSCode extension enables you to interact with Ocean Protocol directly from your development environment. You can run compute jobs and test algorithms without leaving VSCode.
- 🌊 Ocean Protocol Integration: Direct integration with Ocean Protocol's core functionality
- 💻 Compute-to-Data: Start and monitor compute jobs using JavaScript or Python algorithms
- 🔄 Active File Integration: Automatically detects and uses currently open .js or .py files as algorithms
- 📁 Results Management: Specify output locations and view computation results directly in VSCode
- Node.js (version specified in
.nvmrc
) - VSCode version 1.93.0 or higher
- Git
- Clone the repository:
git clone https://github.com/your-username/ocean-protocol-vscode
cd ocean-protocol-vscode
- Install dependencies:
npm install
- Build the extension:
npm run compile
- Open in VSCode:
- Press F5 to start debugging
- This will open a new VSCode window with the extension loaded
The extension adds a new Ocean Protocol icon to the activity bar. Clicking it reveals several sections:
-
Setup
- Optional: Configure RPC URL, or use the default.
- Optional: Set Ocean Node URL, or use the default.
- Optional: Enter private key for transactions, or use the default.
-
Start Compute Job
- Select algorithm file (automatically detects open .js or .py files)
- Configure compute environment
- Select results folder location
- Start and monitor compute-to-data jobs
- Navigate to the "Start Compute Job" section
- Your currently open JavaScript or Python file will be automatically selected as the algorithm
- Select a results folder for computation output
- Enter the compute environment URL
- Click "Start Compute Job"
ocean-protocol-vscode/
├── src/
│ ├── extension.ts # Main extension entry point
│ ├── viewProvider.ts # WebView UI provider
│ └── helpers/ # Helper functions
│ └── compute.ts # Compute job functionality
├── test/ # Test files
└── package.json # Project configuration
npm run compile
: Compile the TypeScript codenpm run watch
: Compile in watch modenpm run lint
: Run ESLintnpm run test
: Run testsnpm run package
: Create VSIX package for distribution
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For bug reports and feature requests, please open an issue in the GitHub repository.
For general questions about Ocean Protocol, join the Ocean Protocol Discord.