Repository navigation
fix(cli): line up the examples in fctl publish's and fctl review's help - #277
Merged
Merged
Conversation
Their help texts went on to new lines without a `\`, so the spaces that indent those lines in the source reached the help: `fctl publish --help` printed its second sentence and its examples 22 to 24 spaces in, and `fctl review --help` four of its five examples 30 spaces in. A test now walks every command's help texts and fails on such indentation.
kalaspuff
approved these changes
Oct 25, 2026
kalaspuff
pushed a commit
that referenced
this pull request
Oct 25, 2026
## Summary `fctl` without arguments, `fctl -h`, `fctl --help` and `fctl help` now end with a paragraph for agents, after the examples: read https://fctl.sh/llms.txt to learn fctl and this CLI, what they'll find there, and https://fctl.sh/llms-full.txt for all of it in one file. An agent that finds fctl on its PATH usually runs one of these first, so that's where it now learns where its guide is. `fctl` alone prints the short help, so the pointer is in the short help too, and `-h` shows it as well. It is one plain paragraph rather than an indented section because clap wraps help text to the terminal's width without indenting continuation lines; it reads cleanly at 60, 80 and 100 columns (100 is what agents get outside a terminal). A unit test checks that all four outputs contain it; I also checked that both URLs serve what the paragraph lists. `fctl`, ending with: ``` Examples: fctl login https://app.fctl.sh fctl run -p my-app "Add a dark mode toggle" fctl sessions --active fctl attach my-app#12 fctl host install Agents: read https://fctl.sh/llms.txt to learn fctl and this CLI: what fctl is, the words it uses, how to drive it from a script or a tool call (access tokens, --json, exit codes, waiting for a session), what to avoid, recipes, and links to every doc page as Markdown, all of them in one file at https://fctl.sh/llms-full.txt. ``` A separate fix, found while writing this: `fctl publish --help` and `fctl review --help` printed their examples with the source's indentation. - #277 ## Worth confirming - **Decision:** the pointer comes last, after the examples, where a terminal leaves it just above the prompt. An agent that reads only the first lines (`fctl --help | head`) won't see it. [fctl session](https://app.fctl.sh/s/ses_01M5SSYJC8AZTVMF34HFYXXB8H) Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fctl publish --helpandfctl review --helpprinted parts of their help far to the right: their texts went on to new lines without a\, so the spaces that indent those lines in the source came out in the help.fctl publish --helpprinted its second sentence and its examples 22 to 24 spaces in, andfctl review --helpfour of its five examples 30 spaces in. Both now read like the other commands' help. They came in with #71 and #223.A new test walks every command's help texts (descriptions, before and after help, and every argument's help) and fails on a line indented by more than 8 spaces, which is as far as any help indents on purpose (
fctl review submit --help's JSON example). It fails on main'sfctl publishand passes with this change. Found while working on the pull request below; it's separate so that it gets its own line in the release notes.fctl review --help, ending with, before:After:
fctl session