Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Turns every [Terminal.Gui](https://github.com/gui-cs/Terminal.Gui) View into a C
```sh
brew install gui-cs/tap/clet # macOS / Linux
winget install gui-cs.clet # Windows 10/11
dotnet tool install -g clet # any platform with .NET SDK
dotnet tool install -g Terminal.Gui.clet # any platform with .NET SDK
```

## What it replaces
Expand Down Expand Up @@ -118,7 +118,7 @@ Whatever theme is set in your TG `ConfigurationManager` applies to every clet au

**Q: Do I need .NET installed?**
**No** for `brew install` and `winget install` — those ship a self-contained NativeAOT binary (~8 MB, no runtime needed).
**Yes** for `dotnet tool install -g clet`.
**Yes** for `dotnet tool install -g Terminal.Gui.clet`.

---

Expand Down
19 changes: 11 additions & 8 deletions specs/clet-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,11 @@ After all matrix jobs and smoke tests pass:
- Use `wingetcreate update` with the GitHub token.
- Manifest PR is auto-merged by Microsoft's bot if validation passes (otherwise paged).

**.NET tool** (NuGet):
- `dotnet pack` the `Clet.Tool` project (which references `Clet` and packages the build output as a global tool).
- `dotnet nuget push` to nuget.org with the API key.
**.NET tool** (NuGet) — follows the [mdv](https://github.com/gui-cs/mdv) packaging pattern (single project, `PackAsTool`):
- The `src/Clet/Clet.csproj` carries the tool metadata directly — no separate `Clet.Tool` project. Required properties: `<PackAsTool>true</PackAsTool>`, `<ToolCommandName>clet</ToolCommandName>`, `<PackageId>Terminal.Gui.clet</PackageId>`, plus standard NuGet metadata (`Description`, `PackageReadmeFile`, `PackageLicenseFile`, `PackageProjectUrl`, `RepositoryUrl`, `RepositoryType`, `PackageTags`). README and LICENSE are packed via `<None Include="..." Pack="true" PackagePath="/" />`.
- `dotnet pack -c Release src/Clet/Clet.csproj` produces `Terminal.Gui.clet.<version>.nupkg`.
- `dotnet nuget push Terminal.Gui.clet.<version>.nupkg --source https://api.nuget.org/v3/index.json --api-key <key>`.
- End-user install: `dotnet tool install -g Terminal.Gui.clet`. The tool command is `clet` (independent of the package id, matching the `mdv` / `Terminal.Gui.mdv` pattern). The packed tool is the framework-dependent IL build; the AOT single-file binary is a separate artifact shipped through Homebrew/WinGet (see D-019).

### 5.5 Failure handling

Expand Down Expand Up @@ -718,7 +720,7 @@ The legitimate worry that `InputInjection`-driven tests can drift from AOT behav
| Mouse click | ☐ | ☐ | ☐ | ☐ |
| Inline restore | ☐ | ☐ | ☐ | ☐ |

Run before every minor release (v1.0, v1.1, ...). Captured in a release checklist issue. This is the v0.5 milestone gate.
Run before every minor release (v1.0, v1.1, ...). Captured in a release checklist issue ([#23](https://github.com/gui-cs/clet/issues/23) tracks the first pass for v0.5). This is the v0.5 milestone gate.

### 6.6 AOT publish tests

Expand Down Expand Up @@ -758,7 +760,7 @@ Schedule follows TG releases, not a calendar; no dates here.
| **v0.1 alpha** | [#2](https://github.com/gui-cs/clet/issues/2) | `gui-cs/clet` repo bootstrapped; abstractions, registry, JSON, source generator in place; `select` clet (replicating `Examples/InlineSelect`) working in unit + integration tests. **No runnable binary yet** — see v0.11. |
| **v0.11** | [#9](https://github.com/gui-cs/clet/issues/9) | Runnable `clet` binary. CLI host (`Program.Main`, `CommandLineRoot`, `AliasDispatcher`, `OutputFormatter`, `ExitCodes`) per §4.6/§4.7. `clet --help` / `--version` / `help <alias>` / `list --json` / `<alias> --json` work end-to-end. Plain-text help; Markdown-rendered help defers to v0.5. Process-level smoke harness on Linux x64 (Process.Start-based; TUIcast keystroke harness deferred to v0.3 — see [decisions log D-007](decisions.md)). |
| **v0.3 alpha** | [#3](https://github.com/gui-cs/clet/issues/3) | All 14 input clets functional. JSON schema drafted. AOT publish (§6.6) green on `gui-cs/clet` CI. TUIcast keystroke harness wired up. |
| **v0.5 beta** | [#4](https://github.com/gui-cs/clet/issues/4) | Naming locked; JSON schema locked; exit-code table locked; inline rendering verified on the four-terminal matrix; v1.0 input and viewer lists locked; `Markdown` View integration verified end-to-end including link safety; threat model published; Homebrew tap and WinGet manifest in working draft form; the gui-cs/clet release workflow proven against a real TG release cut. **TG dependency on a release tag, not `*-develop.*`** (see §8 risks). |
| **v0.5 beta** | [#4](https://github.com/gui-cs/clet/issues/4) | Naming locked; JSON schema locked; exit-code table locked; inline rendering verified on the four-terminal matrix; v1.0 input and viewer lists locked; `Markdown` View integration verified end-to-end including link safety; threat model published; `dotnet tool install -g Terminal.Gui.clet` packs and installs locally (mdv pattern, see D-019); Homebrew tap and WinGet manifest in working draft form; the gui-cs/clet release workflow proven against a real TG release cut. **TG dependency on a release tag, not `*-develop.*`** (see §8 risks). |
| **v0.9 RC** | [#5](https://github.com/gui-cs/clet/issues/5) | All §6 test layers passing in CI. One real release cycle exercised end-to-end. Rollback runbook (`docs/runbooks/release-rollback.md`) exercised once. |
| **v1.0 GA** | [#6](https://github.com/gui-cs/clet/issues/6) | Tied to TG v2 GA. Brew, WinGet, NuGet channels live. Documentation published. Issue templates for clet bugs in place. |

Expand Down Expand Up @@ -807,9 +809,10 @@ A suggested sequence (linear, not parallelizable until v0.3 except where noted):
7. **Fourth wave:** `pick-directory`, `pick-file`. #5158 has landed on TG `develop` (§3.2); `FileDialog` typed result is `IReadOnlyList<string>?` (string for single-select wire format, array of strings for `--multi`, per §4.3.2).
8. **`md` viewer clet.** First viewer clet; exercises the `IViewerClet` contract and the help-rendering pipeline (§4.7).
9. **Release pipeline:** build matrix, signing, smoke gate.
10. **Publish channels:** Homebrew first (lowest ops friction), then WinGet, then NuGet tool.
11. **v0.5 gate:** four-terminal matrix run + threat model + locked schema + #5156 Markdown rendering tests landed in TG.
12. RC and GA.
10. **`dotnet tool` packaging:** add `PackAsTool`/`ToolCommandName`/`PackageId=Terminal.Gui.clet` to `src/Clet/Clet.csproj` (mdv pattern, D-019). `dotnet pack -c Release` produces a global-tool `.nupkg`; `dotnet tool install -g --add-source ./bin/Release Terminal.Gui.clet` works locally end-to-end. This is the lowest-friction install path and the first publish channel exercised before Homebrew/WinGet.
11. **Publish channels:** Homebrew (lowest ops friction for native AOT bottle), then WinGet, then NuGet tool push.
12. **v0.5 gate:** four-terminal matrix run + threat model + locked schema + #5156 Markdown rendering tests landed in TG.
13. RC and GA.

---

Expand Down
14 changes: 14 additions & 0 deletions specs/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Format: `## D-NNN: <short title> (status)`. Status is one of `Active`, `Supersed

---

## D-019: Distribute clet as a single-project `dotnet tool` (mdv pattern) (Active)

**Context.** Spec §5.4 originally hand-waved at "the `Clet.Tool` project (which references `Clet` and packages the build output as a global tool)" — but no such project exists in the repo, and there is no need for one. The sibling [`gui-cs/mdv`](https://github.com/gui-cs/mdv) viewer ships as a single-csproj global tool: `<PackAsTool>true</PackAsTool>` + `<ToolCommandName>mdv</ToolCommandName>` + `<PackageId>Terminal.Gui.mdv</PackageId>` directly on the executable's csproj. Install command is `dotnet tool install -g Terminal.Gui.mdv`. clet should adopt the same pattern: a single csproj that produces both the AOT single-file binary (for Homebrew/WinGet) and a `dotnet tool` package (for the cross-platform `dotnet tool install` path).

**Decision.** Add `PackAsTool`, `ToolCommandName=clet`, and `PackageId=Terminal.Gui.clet` directly to `src/Clet/Clet.csproj`. Pack the README and LICENSE into the NuGet package via `<None Include="..." Pack="true" PackagePath="/" />`. No separate `Clet.Tool` project. The AOT binary continues to be produced by `dotnet publish -c Release` against the same csproj — `PackAsTool` only affects `dotnet pack` output, not `dotnet publish`. End users on any platform with the .NET SDK can install via `dotnet tool install -g Terminal.Gui.clet` and invoke `clet` from PATH. The package id is namespaced under `Terminal.Gui.` to match the mdv precedent and to make the gui-cs origin obvious in NuGet search.

**Why:** mdv has already proven the single-csproj approach works for a Terminal.Gui-based tool, and a separate `Clet.Tool` project would add a layer of indirection (project reference, build orchestration, second csproj to keep in sync) that earns nothing. The spec's earlier "Clet.Tool project" phrasing was aspirational — never built.

**How to apply:** §5.4 ".NET tool (NuGet)" describes this packaging in concrete terms (properties to set, exact `dotnet pack` / `dotnet tool install` commands). README install hint is updated to `dotnet tool install -g Terminal.Gui.clet`. v0.5 milestone exit criterion (§7) requires `dotnet pack` + local `dotnet tool install` to work end-to-end before the channels-live exit criteria for v1.0 GA.

**Pointers.** Spec §5.4, §7 v0.5 row, §10 step 10. README "Install" section. The `mdv.csproj` reference: <https://github.com/gui-cs/mdv/blob/main/mdv.csproj>.

---

## D-018: ASCII logo wired into `--help` banner and README hero section (Active)

**Context.** [Issue #12 (branding)](https://github.com/gui-cs/clet/issues/12) approved the three-line box-drawing logo and tagline "One binary. Every prompt. JSON out. Go home." and called for the logo to be wired into `clet --help` and the README hero section.
Expand Down
Loading