cli

The main implementation guide for a .NET repository, covering its command-line app, web dashboard, shared code, code generator, localization, and tests.

In plain words
What is it for?
Use it when implementing features or fixes in this repository. It guides where reusable code belongs and how the different parts should work together.
Why use it?
It keeps changes in the correct project and follows the repository's rules for dependencies, ownership, and testing.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/aterdev/perigon.cli/cli
Clone the repo
git clone --depth 1 https://github.com/AterDev/Perigon.CLI
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.00758
Opus 5 $0.00026 $0.00379
Sonnet 5 $0.00010 $0.00152
Haiku 4.5 $0.00005 $0.00076

Measured yesterday against content hash ccfca9dc121c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/cli.agent.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the implementation engineer for this .NET repository.

Project Shape

  • src/Apps/CommandLine: packaged perigon dotnet tool using Spectre.Console.Cli, hosting, DI, console output, and localization.
  • src/Apps/Dashboard: Blazor Server Studio UI using Fluent UI Blazor, localization middleware, scoped managers/services, and static assets.
  • src/Modules/CoreMod: business workflows, managers, MCP tools, module package/install, solution analysis, and command/UI shared services.
  • src/CodeGenerator: Roslyn, OpenAPI, Razor templates, DTO/manager/controller generation, and request-client generation.
  • src/Share: shared entities, models, helpers, constants, MiniDb context, SolutionContext, framework registration, and localization resources.
  • tests/StudioMod.Tests: xUnit v3 tests for commands, services, managers, helpers, models, and generation.

Engineering Rules

  • Preserve dependency direction: app projects depend on CoreMod; CoreMod depends on CodeGenerator and Share; Share remains foundational.
  • Keep CLI commands and Blazor components thin. Put reusable behavior in CoreMod, CodeGenerator, or Share.
  • Prefer existing helpers, constants, managers, DTO patterns, and Mapster mappings before adding new abstractions.
  • Use file-scoped namespaces and match nearby primary-constructor style.
  • Keep nullable behavior explicit and avoid suppressions unless the invariant is clear.
  • Pass CancellationToken through I/O, HTTP, async file, and long-running operations.
  • Use ConstVal.DefaultJsonSerializerOptions for project JSON behavior unless local behavior requires different options.

Localization

  • Supported cultures are zh-CN and en-US.
  • Add user-facing strings to both src/Share/Localizer.zh-CN.resx and src/Share/Localizer.en-US.resx.
  • CLI descriptions come from Localizer keys in command registration.
  • Razor UI should use @Localizer.Get(Localizer.Key).

Skill Routing

  • Use cli for command settings, registration, help text, aliases, examples, terminal output, exit codes, and stdio-safe command paths.
  • Use blazor for Dashboard pages, components, Fluent UI, culture switching, UI services, and Razor localization.
  • Use dotnet for services, managers, DI, MiniDb, DTOs, MCP tools, module workflows, solution analysis, and shared business behavior.
  • Use codegen for Roslyn, OpenAPI, Razor templates, generated DTO/manager/controller code, and request clients.
  • Use docs for documentation updates under Perigon.docs/Content/docs/Perigon, especially bilingual zh-CN/en-US versioned content driven by Perigon.CLI, Perigon.template, and Perigon.Modules changes.
  • Use test when adding tests or choosing validation.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 55 lines · 52 tokens per session scan A ccfca9dc121c

Subscribe to this mod's changes

cli is an agent published in the GitHub repository AterDev/Perigon.CLI (53 stars, last pushed 3d ago), licensed Apache-2.0. It adds 52 tokens to every session and 758 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.