Betalgo.Blueflow.Chopper
1.0.5
dotnet tool install --global Betalgo.Blueflow.Chopper --version 1.0.5
dotnet new tool-manifest
dotnet tool install --local Betalgo.Blueflow.Chopper --version 1.0.5
#tool dotnet:?package=Betalgo.Blueflow.Chopper&version=1.0.5
nuke :add-package Betalgo.Blueflow.Chopper --version 1.0.5
<img width="1140" height="240" alt="Betalgo Blueflow Github readme banner" src="https://github.com/user-attachments/assets/1c580ed2-9a6c-4b74-93ee-0efeead70278" />
Blueflow Chopper
Blueflow Chopper is a specialized utility designed to break down monolithic OpenAPI files into smaller, manageable YAML snippets.
This tool is particularly useful for AI-assisted development workflows where large OpenAPI specifications exceed context window limits. By splitting the specification into granular files (per path and per schema), developers can selectively feed relevant parts of the API definition to LLMs without overwhelming the context.
Requirements
- .NET 10 SDK or newer.
Installation
You can install the tool globally via NuGet:
dotnet tool install -g Betalgo.Blueflow.Chopper
Usage
Run the tool using the CLI command blueflow-chopper. You can provide a local file or a remote URL as the source.
Basic Example
blueflow-chopper --input openapi.yaml --output openapi-split
Development
To run the tool locally without installing:
dotnet run --project Blueflow.Chopper -- --input openapi.yaml --output openapi-split
CLI Options
| Option | Short | Description | Default |
|---|---|---|---|
--input |
-i |
Path to the source OpenAPI YAML/JSON file. | (Auto-discover) |
--url |
-u |
URL to a remote OpenAPI YAML/JSON file. | null |
--output |
-o |
Directory where split files will be generated. | openapi-split |
--sections |
-s |
Comma-separated list of sections to export (paths, schemas). |
paths,schemas |
--clean |
N/A | Deletes the output directory before writing new files. | false |
Examples
Split from a URL:
blueflow-chopper --url https://api.example.com/openapi.yaml --clean
Export only Schemas:
blueflow-chopper -i openapi.yaml -s schemas
Output Structure
The tool generates a structured directory layout:
paths/<resource>/<method>/<operationId>.yml- Contains a single OpenAPI operation definition.
components/schemas/<SchemaName>.yml- Contains a single schema definition.
manifest.json- A machine-readable summary of all generated files.
Contributing
We welcome contributions to Blueflow Chopper. To ensure a smooth collaboration process, please adhere to the following guidelines:
- Code Style: Follow standard C# coding conventions and existing project patterns.
- Testing: Ensure that any new logic is covered by appropriate tests.
- Pull Requests: Submit clear, focused pull requests describing the problem solved or feature added. Avoid bundling unrelated changes.
Thank you for helping improve the project.
A product of Betalgo.
| 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. |
This package has no dependencies.