altis-cli --help / --version should work without configuration
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- cli
Research direction
Start in bin/altis-cli.js, reading configure() and main() around parser.parse(...), config-load, and the setup gate. Run altis-cli --help and altis-cli --version in an unconfigured non-TTY environment, then verify both flags and their short forms bypass configuration and exit without error code 1.
Written by the indexing model from the issue text.
Description
bin/altis-cli.js runs the config-load and setup gate inside main() before it parses any arguments (parser.parse(...) is the last thing it does). As a result --help and --version never reach yargs when the CLI is unconfigured:
- In a non-TTY (CI, scripts, piped output) an unconfigured CLI hits the
!config.get('didSetup')branch and callsprocess.exit(1)— so altis-cli --help fails for anyone who hasn't run setup. - In a TTY it prompts "Run initial setup?" instead of showing help.
Spotted when trying to set up a simple asmoke test which failed in CI.
Fix: short-circuit --help / --version (and ideally -h / -v) before the config-load and setup gate, so informational flags work regardless of setup state — standard CLI behaviour. The parser is already built at that point (configure() on line 26), so it can handle these before any config work happens.
Once fixed, the smoke test could optionally go back through bin/altis-cli.js if we want it to cover the entry point too, though the parser-build test is arguably the better release check.
Acceptance Criteria
- Both
altis-cli --helpandaltis-cli --versionwork without returning error code 1 - Test if both work regardless of the configuration state
For Altis Team Use
Ready for Work Checklist
Is this ticket ready to be worked on? See
the Play Book Definition of Ready
- Is the title clear?
- Is the description clear and detailed enough?
- Are acceptance criteria listed?
- If this is a bug, has a regression test been defined?
- Have any dependencies been identified? (Optional)
- Have any documentation/playbook changes been identified? (Optional)
- Is an estimate or time box assigned?
- Is a priority label assigned?
- Is this ticket added to a milestone?
- Is this ticket added to an epic? (Optional)
Completion Checklist
Is this ticket done? See
the Play Book Definition of Done
- Has the acceptance criteria been met?
- Is the documentation updated (including README)?
- Do any code/documentation changes meet project standards?
- Are automatic tests in place to verify the fix or new functionality?
- Or are manual tests documented (at least on this ticket)?
- Are any Playbook/Handbook pages updated?
- Has a new module release (patch/minor) been created/scheduled?
- Have the appropriate
backportlabels been added to the PR? - Is there a roll-out (and roll-back) plan if required?
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 7d 9h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from humanmade/altis-cli
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
to refine
Difficulty 5/5 Over a week Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in humanmade/altis-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·