Skip to content

feat(cli): print the installed version with chartula --version - #286

Merged
goldbarth merged 1 commit into
mainfrom
feat/version-flag
Sep 30, 2026
Merged

goldbarth merged 1 commit into
mainfrom
feat/version-flag

Conversation

@goldbarth

Copy link
Copy Markdown
Owner

Closes #255

  • Why: a user had no command to find the installed version. chartula --version printed Unknown command '--version'. and exited with 1, and the version showed up only after a run, as toolVersion in changelog.json. The bug report and the alpha feedback form ask for it.
  • chartula --version prints the informational version: chartula 0.1.0-preview.3+<commit>, exit 0, on stdout. It is the text changelog.json records as toolVersion, so a report and a run file name the same build, and a build from source is told apart from a release.
  • Checked before anything else is read: no checkout, no configuration, no key and no token are needed, so it works from any directory and right after install.
  • Only --version: no -v or version word. A short flag is easy to add later, and hard to take back once a script depends on it.
  • The help text lists it, and docs/cli.md mirrors the help line for line and says what the output is.
  • The issue templates ask for its output, and docs/install.md tells the user to check an install with it, instead of --help. The install scripts still smoke-test with --help, since CHARTULA_VERSION can pin a release that has no --version.

Verified with the built binary, from an empty directory:

$ chartula --version; echo $?
chartula 0.1.0-preview.3+953a939f0b2fb99c0834790b8363a057e0da18da
0

Tests: VersionTests runs the built CLI with --version and no key or token, and checks the output, exit 0 and an empty stderr; the help text names it. Full suite 854 passing, build without warnings, dotnet format clean.

@goldbarth goldbarth self-assigned this Sep 30, 2026
@goldbarth
goldbarth merged commit fd9b455 into main Sep 30, 2026
4 checks passed
@goldbarth
goldbarth deleted the feat/version-flag branch September 30, 2026 11:37
goldbarth added a commit that referenced this pull request Oct 1, 2026
…s a run (#305)

Follows #295 and #286, which gave a user `chartula doctor` and `chartula
--version` to report from.

- **Why:** the bug report asked for the .NET version, which a user of a
release binary does not have, and for nothing a maintainer needs to run
the case again: not the command, the install method, the platform, the
model, or what the run printed. The feature request asked for a user
story and acceptance criteria, which is a maintainer's job, and not for
the workaround or who is affected.
- **The bug report is a form** (`bug_report.yml`), in the order a
reporter has the answers: what happened, the command, the output of
`chartula --version`, the install method, the platform as the eight
binaries of `docs/install.md` plus a build from source, provider and
model, the output of `chartula doctor`, the lines before the first step,
and the error or the run summary. No .NET version.
- **`doctor` and the header lines are optional, the rest required.** A
bug in `doctor` itself has no `doctor` output to paste; a run that
stopped at a usage error has no header. Both say why they help, so they
are filled in anyway.
- **The header field asks for every line up to `Range:`,** not only
`Model:` and `GitHub:`: a real run prints the announced `--tag` and
`--repo` defaults first, and those name the release the run worked on.
Its placeholder is copied from that run, with `thinking
provider-default` as `EndpointNotice.cs` prints it.
- **The form says its output is safe to paste,** since Chartula names
variables and never their values, and asks to replace a private
repository's name instead of withholding the report.
- **The feature request is a form** (`feature_request.yml`): the
problem, the current workaround, who is affected, all required; a
proposal, optional. It links `ROADMAP.md`, so a planned point is found
before it is requested again, and Discussions for a question.
- **Alpha feedback:** the version placeholder no longer names
`0.1.0-preview.3` with its commit, which aged with the next release; one
sentence says the alpha is the time before 1.0.0 and its releases carry
"preview" in the version, linking `versioning.md`.
- **`config.yml` links the Q&A category of Discussions** for questions,
above the security link. Blank issues stay enabled.
- The template file names `alpha-feedback.yml` and the chooser URL in
`troubleshooting.md` are unchanged, so every link to them still
resolves; nothing linked the two Markdown templates.

**Verified:**
- All four files validate against the SchemaStore schemas for issue
forms and the template chooser config (script, with a negative test).
- The header lines and their order are from a real `preview` with the
binary built from `main`, against an unreachable GitHub endpoint on
127.0.0.1; the error field's "last progress line and the message below
it" matches what that run printed.
- The labels `type:bug` and `type:feature` exist, and the Q&A category's
slug is `q-a` (GitHub API).

Tests: none, issue templates only.
goldbarth added a commit that referenced this pull request Oct 7, 2026
Follows #344. Step 1 of `docs/development/releasing.md`.

- **Why now:** the launch points are merged, and the binary people
install is still `0.1.0-preview.3`, which has none of them. The
announcement needs a release that holds what the README and the docs on
`main` describe.
- **What ships since preview.3,** 63 commits:
- a first run: `chartula doctor` (#295, grouped in #341), `chartula
--version` (#286), a free `preview` (#292), progress while a run works
(#297, with a spinner and `--plain` in #340), a first tag from the first
commit with a confirmation for a large range (#282);
- what a release contains: commits without a pull request (#291), issue
numbers at every depth (#293), a sentence for a release with nothing for
developers (#307 in #333);
- checks and prompts: pull request text quoted and bounded (#338), no
false flag for a wrapped phrase or a fenced block (#336), flags set
apart from the entries (#331);
- publishing: the token checked before the first model call (#285), a
published release not replaced unless asked (#335);
- the files: `changelog.json` without descriptions and readable as text
(#294, #332).
- **Breaks to state in the notes,** as `docs/versioning.md` asks of a
preview:
- `changelog.json` is schema version 2: a change's `description` is gone
(#294). The run record is schema version 3 and holds the complete facts.
- `generate` stops on a tag whose release is already published;
`--replace-published` restores the old behaviour (#335).
- An option a command does not take stops the run (#301), and
`--whole-history` is gone (#282).
- The terminal output changed form (#340 to #342): the summary's first
line, audience headings in place of `--- Technical ---`, and `doctor`'s
last line. A script that reads those lines needs a look; exit codes and
the files are unchanged.
- The csproj `Version` is the single source; nothing else carries the
number.

**After merge:** tag the merge commit on `main` with `v0.1.0-preview.4`
and push it; `release.yml` builds the draft, `chartula generate --tag
v0.1.0-preview.4` writes the notes into it, and publishing runs
`install.yml`. The pinned `v0.1.0-preview.3` in `docs/ci.md` and
`docs/install.md`, and the template link in the `doctor` samples, move
to the new tag once the release exists, with the changelog pull request
of step 6.

**Verified:** the built CLI prints `chartula 0.1.0-preview.4+<commit>`.

Tests: no test changed. Full suite 1,010 passing, build without
warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

There is no way to print the installed version

1 participant