Perigon.CLI is an fast development assistance tool that helps you quickly build front-end and back-end services based on Aspire/AspNetCore/EF Core.
It provides command line, WebUI and an MCP Server over stdio. In the well-designed project architecture after actual combat, it reduces various template codes through code generation and LLM technology,
and intelligently generates simple business implementation logic, which greatly improves development efficiency and improves development experience!
It is provided as a dotnet command-line tool and also supports a Web UI and an MCP Server over stdio.
-
Seamless integration for perigon.templates templates (ASP.NET Core projects)
- Start by creating a new solution or adding an existing project
- Intelligently generate DTO files, including common DTOs such as add, update, query, list, etc.
- Intelligently generate data operations and business logic implementations, including common add, update, and filter functions
- Generate controller interfaces, etc.
-
Provide command line tools to quickly generate client request code, including
- Csharp HttpClient request service
- Angular HttpClient request service
- Axios request service
-
Provide a Web UI interface to manage and maintain multiple projects and provide more comprehensive functions
- Include all the functions of the command line tool
- Custom code generation steps and content (through Razor templates), custom generated content
-
Provide MCP services over stdio to support Agent mode in various editors
The command-line tool can assist developers in generating common code templates based on entity models (.cs files), including:
- DTO files, such as create, update, query, list DTO files
- Repository files, data repository layer code
- Controller files
- Protobuf files
- Client request services
DTO, Manager, and Controller entity code generation currently supports Standard projects only. The tool reads
.config/perigon.config.tomlfrom the solution root and reports that AOT code generation is unsupported whenisAOT = true.
For the frontend, it can generate the necessary code (.ts) for requests based on swagger OpenAPI's JSON content, including:
- Request services,
xxx.service.ts - Interface models,
xxx.ts
You can add other web project types, such as JAVA, Python, Go, etc., and you can get:
- Manage
OpenAPIdocuments to generate client code. - Customize code generation steps and content (via Razor templates).
You can use the perigon.templates project template, which is recommended for use in conjunction!
- Ensure Install the
.NET SDK
Use the dotnet tool command to install:
dotnet tool install --global perigon.cliYou can check the latest version on nuget!
Start the UI interface with one command!
perigon studioThis command will automatically open the browser page, the port is 19160.
Note
perigon studio starts the Web UI. Its default port is 19160; if the port is occupied, 9160 is used.
The MCP server is no longer exposed through an HTTP URL; it is started over stdio.
perigon agent mcpRun perigon agent init in the project root to generate .agents/mcp.json automatically. The generated configuration starts the server with perigon agent mcp.
You can use perigon --help to view command help information.
Or use perigon [command] --help to view specific command help information.
Run dotnet restore in the project root, then run perigon aot jsonContext to generate or update Native AOT JSON contexts for services under src/Services. Use --path <project-root> to select another root. Rerun the command after endpoint or module model changes. Handwritten declarations outside the generated section are preserved; add types that cannot be inferred statically by hand. Register the context in the service's JSON serialization options; the command does not modify startup code.
When packaging a module, use -v or --version to set the package version. If omitted, the command uses 1.0.0 and prints a warning:
perigon module pack FileManagerMod AdminService --version 1.2.0