Repository navigation
Conversation
Plain-language descriptions for every command, argument, and flag, with examples for the most-used commands. Top-level help explains how commands read (account, what, which one, verb), shows @account and pasted links, and groups commands by topic instead of listing every verb. Tests keep it that way: every command, argument, and flag has help written as a sentence, key commands show examples, and all help fits an 80-column terminal.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Help gets muted 256-color styling in a terminal: soft blue headers, bold command names, muted cyan flags, gray placeholders and example notes. Pipes, --no-color, NO_COLOR, and TERM=dumb stay plain, and stripping the colors always gives back the plain text. Every section header gets a blank line under it, and entries start flush left with descriptions two spaces in. Coloring goes by section rather than by indentation. The default-verb help now says you can leave out 'view'.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b898a10abf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Login help promised that every account is added, but on Chatwoot versions whose profile doesn't list accounts, login asks for one account ID and adds only that one. The help now says so, and the accounts help no longer repeats the promise.
|
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Rewrites the CLI's help so it reads well for people: plain language, real examples, and a top-level page that's easy to scan.
Stacked on #44 (multi-account), since much of the new text covers
@account, pasted links,accountsanduse. Once #44 merges, GitHub retargets this PR tomain.chatwoot --helpBefore: "CLI for Chatwoot." followed by about 40 commands and verbs in one flat list.
After:
@acmeand a pasted dashboard linkchatwoot conv --helpshows the verbsEvery command, argument and flag
Rewritten to say what happens and what to type, for example:
Examples and warnings where they matter
convs,conv,reply,snooze,assign,label,contacts,accounts,use,auth login,auth logout,hc articlesandapi.--privatereaches the customer and can't be taken backlabelremoves any label you leave outusechanges the default for every terminal, and@nameorCHATWOOT_ACCOUNTswitch for lessapirequest other than GET can change dataTests that keep it this way
New file
cmd/chatwoot/help_test.go:@accountand links, and shows the groups<id> reply <text>)--helpfor every command fits in 80 columnsThe only code changes are that
newParseraccepts extra Kong options (so the tests can capture help output) and the top-level help lists commands without expanding their verbs. Nothing else changes behavior.Layout and color
<id>, and gray example descriptions. These are 256-color codes chosen to read on both dark and light backgrounds.--no-color,NO_COLORandTERM=dumbget no color. A test checks that stripping the colors gives back exactly the plain text.