Proto RPC

February 11, 2026 · View on GitHub

Send gRPC requests to services defined in .proto files — directly from VS Code.

License: MIT


✨ Features

FeatureDescription
Service DiscoveryAutomatically scans the workspace for .proto files and lists every service & RPC method.
Payload EditorJSON text area with immediate validation — edit request bodies before sending.
Custom HeadersAttach arbitrary key: value metadata (e.g. authorization: Bearer …).
Server OverrideA project-level default address via settings, overridable per request in the UI.
Unary gRPC CallsSends requests through @grpc/grpc-js and displays the response inline.
Saved RequestsPersist frequently used payloads as a shareable JSON file committed to the repo.
Response HistoryEvery call is logged to a configurable JSON file for debugging & comparison.

🚀 Quick Start

# clone
git clone https://github.com/r-52/proto-rpc.git
cd proto-rpc

# install & build
make install build

# run tests
make test

Then press F5 in VS Code to launch the Extension Development Host.

Open the command palette (Cmd+Shift+P) → Proto RPC: Open Client.


⚙️ Extension Settings

SettingDefaultDescription
protoRpc.serverAddresslocalhost:50051Default gRPC server address (host:port).
protoRpc.savedRequestsPath.proto-rpc/saved-requests.jsonWorkspace-relative path to saved requests.
protoRpc.historyPath.proto-rpc/history.jsonWorkspace-relative path to response history.

Settings are configured in .vscode/settings.json or VS Code's Settings UI.


🛠️ Development

Prerequisites

  • Node.js ≥ 18
  • npm ≥ 9

Makefile Targets

TargetDescription
make installInstall npm dependencies
make buildCompile TypeScript → dist/
make watchCompile in watch mode
make testBuild + run unit tests (mocha)
make lintLint sources with ESLint
make cleanRemove dist/ and .vsix files
make packageBuild + package into a .vsix
make publishBuild + publish to the VS Code Marketplace

Project Structure

src/
├── extension.ts        Activation & command registration
├── protoRpcPanel.ts    Webview panel lifecycle & message handling
├── protoParser.ts      .proto file discovery & regex-based parsing
├── grpcClient.ts       Unary gRPC request logic
├── storage.ts          Read/write saved requests & history JSON
├── utils.ts            Workspace helpers
└── test/
    └── protoRpc.test.ts  Unit tests (mocha)
media/
├── main.js             Webview UI logic
├── styles.css          Webview styles (VS Code theme variables)
├── icon.svg            Extension icon (source)
└── icon.png            Extension icon (256 × 256)

📦 Packaging & Publishing

# Package into a .vsix
make package

# Publish (requires `npx vsce login <publisher>` first)
make publish

📄 License

MIT © r-52