.aider.md
Cross-platform .NET console UI toolkit. C# 14 targeting net10.0.
Terminal.Gui v2 is a complete rewrite. Pre-2025 training data about Terminal.Gui is wrong.
Read ai-v2-primer.md FIRST — it contains the v1→v2 corrections table, correct minimal app pattern, and all common gotchas.
| v1 (WRONG) | v2 (CORRECT) |
|---|---|
Application.Init (); | IApplication app = Application.Create ().Init (); |
Application.Run (); | app.Run<MyWindow> (); |
Application.Shutdown (); | app.Dispose (); |
Application.Top | No global top — pass root view to app.Run () |
new Toplevel () | Use Runnable subclass or Window |
using Terminal.Gui; | using Terminal.Gui.App; / Terminal.Gui.Views; / etc. |
new Button ("OK") | new Button { Text = "OK" } |
button.Clicked += ... | button.Accepted += (_, _) => { /* action */ }; |
view.Bounds | view.Viewport |
new RadioGroup (...) | new OptionSelector { ... } |
dotnet restore
dotnet build --no-restore
dotnet test --project Tests/UnitTestsParallelizable --no-build
dotnet test --project Tests/UnitTests --no-build
Note: These rules apply only when contributing code to the Terminal.Gui library itself. App developers using Terminal.Gui do NOT need to follow these conventions.
() and [] — Method () not Method(), array [i] not array[i]var — Explicit types except built-ins (int, string, bool, etc.)new () — Button btn = new () not Button btn = new Button ()[...] not new List<T> { ... }For full details, see:
docfx/apispec/namespace-*.md — Compressed API docs.claude/cookbook/common-patterns.md — Common UI recipes