SharpPortico.Cli
1.3.0-preview.1
dotnet tool install --global SharpPortico.Cli --version 1.3.0-preview.1
dotnet new tool-manifest
dotnet tool install --local SharpPortico.Cli --version 1.3.0-preview.1
#tool dotnet:?package=SharpPortico.Cli&version=1.3.0-preview.1&prerelease
nuke :add-package SharpPortico.Cli --version 1.3.0-preview.1
SharpPortico.Cli

Command-line companion for the SharpPortico OpenAPI → gRPC source generator.
A preview/validation tool that runs the generator's own mapping pipeline over your OpenAPI 3.0/3.1 spec (YAML or JSON) and reports what SharpPortico would generate — service name, namespace, proto package, RPC surface, protobuf message and enum counts — and, with --out, writes the .proto descriptor the generator embeds as {Service}Proto.Text. The actual C# code generation happens at compile time via the source generator.
dotnet tool install -g SharpPortico.Cli --version 1.3.0-preview.1
# What the mapping makes of the spec
sharpportico generate openapi/petstore.yaml
# And the contract a build of it would ship
sharpportico generate openapi/petstore.yaml --out contracts/
| Option | Effect |
|---|---|
--out DIR\|FILE |
Write the descriptor — a directory gets <spec>.proto |
--service-name NAME |
Base name of the generated service (Service is appended when absent) |
--namespace NS |
Namespace of the generated C#, as the declaration's third argument |
The descriptor is not a second, hand-written rendering of the spec: it comes from the emitter the generator itself calls and is LF-normalized exactly as the {Service}Proto.Text const holds it, so what you review — or hand to protoc, to a client generator, or to a colleague — is the contract a build of the same spec produces. The diagnostics are the generator's own, with the ids and messages the compiler reports: SP1002 says a 3.1 document was read through the 3.0 rewrite, and SP1003 names each construct the mapping widened and what it became.
Every sample spec's descriptor is compiled by protoc in CI (.github/scripts/check-protos.sh), which is the check for what the C# compiler never reads — a name protoc rejects or an import left out of the descriptor.
📖 Full documentation & samples: SharpPortico on GitHub
License
MIT — see LICENSE. Copyright (c) 2026 MPCoreDeveloper.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.0-preview.1 | 0 | 9/30/2026 |
| 1.2.0-preview.1 | 58 | 9/19/2026 |
| 1.1.4-preview.1 | 56 | 9/19/2026 |
| 1.1.3-preview.1 | 58 | 9/19/2026 |
| 1.1.2-preview.1 | 54 | 9/19/2026 |
| 1.1.1 | 93 | 9/13/2026 |
| 1.1.0 | 84 | 9/13/2026 |
| 1.0.0 | 116 | 8/23/2026 |
| 0.4.0-RC.4 | 45 | 9/13/2026 |
| 0.4.0-RC.3 | 48 | 9/13/2026 |
| 0.4.0-RC.2 | 49 | 9/13/2026 |
| 0.4.0-RC.1 | 49 | 9/13/2026 |
| 0.3.0-RC.1 | 62 | 9/13/2026 |
| 0.2.0 | 96 | 9/9/2026 |