feat(cli): list-all-frameworks mode + help output overhaul#1662
feat(cli): list-all-frameworks mode + help output overhaul#1662damyanpetev merged 12 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the CLI’s ig list behavior outside a project to enumerate all frameworks and their visible project templates, and revamps --help output across commands to restore proper yargs banners, improve wording consistency, and document positional arguments. It also fixes a CLI guard that previously misidentified valid alias-invoked commands as “Unknown command”.
Changes:
- Add “list all frameworks” mode for
ig listoutside a project when--frameworkisn’t provided; error when--typeis provided without--framework. - Overhaul help/usage output (top-level usage/examples; add
.positional(...)help for args; normalize descriptions; remove usage-suppression). - Fix post-parse “Unknown command” guard to recognize command aliases; add
upgradealias forupgrade-packages.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/cli/lib/commands/list.ts |
Adds all-framework listing mode outside projects and improves list command help text/examples. |
packages/cli/lib/cli.ts |
Restores top-level usage banner/examples and derives known command names from registered commands + aliases. |
packages/cli/lib/commands/new.ts |
Documents positional name, normalizes option descriptions, and adds examples. |
packages/cli/lib/commands/add.ts |
Documents positional args, normalizes option descriptions, and adds examples. |
packages/cli/lib/commands/config.ts |
Adds positional metadata and normalizes descriptions for subcommands/options. |
packages/cli/lib/commands/doc.ts |
Switches help to positional term (see API compatibility comment). |
packages/cli/lib/commands/generate.ts |
Normalizes help text and descriptions for generate and generate template. |
packages/cli/lib/commands/build.ts |
Removes usage-suppression so help renders consistently. |
packages/cli/lib/commands/start.ts |
Normalizes --port description and removes usage-suppression. |
packages/cli/lib/commands/test.ts |
Normalizes --e2e description and removes usage-suppression. |
packages/cli/lib/commands/upgrade.ts |
Adds upgrade alias and normalizes option/description text. |
packages/cli/lib/commands/mcp.ts |
Normalizes option/description text and removes usage-suppression. |
packages/cli/lib/commands/ai-config.ts |
Normalizes description and removes usage-suppression. |
packages/cli/README.md |
Documents new ig list outside-project behavior. |
spec/unit/list-spec.ts |
Adds unit coverage for multi-framework listing and -t without -f erroring. |
spec/acceptance/help-spec.ts |
Updates help-output acceptance expectations to match new yargs usage layout. |
spec/unit/mcp-cli-spec.ts |
Updates expectation for normalized (lowercased) MCP description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
damyanpetev
left a comment
There was a problem hiding this comment.
Not sure what prompted the change of casing to lower specifically; suppose consistency for the most existing(?) though still not consistent looking at the -h and -v options descriptions.
Alternatively, might reconsider capitals for the start of each as it makes a cleaner separation from possible positional at end of long commands and/wraps. For comparison, a very default setup on my terminal wraps and thus:

The all-lower case wrapped lined merge a bit for me, so I actually find a upper case start helps tracking which items starts where
Not critical by any measure, just putting it for discussion. Actually, I prefer the dotted lines we use in our own formatting for that readability.
| const command: UpgradeCommandType = { | ||
| command: "upgrade-packages", | ||
| describe: "upgrades Ignite UI Packages", | ||
| aliases: ["upgrade"], |
There was a problem hiding this comment.
This is actually a note-worthy change, kinda lost in all the note descriptions. Not sure what prompted it, but sure I guess it.
| inProject = true; | ||
| } | ||
|
|
||
| if (!inProject && !argv.framework) { |
There was a problem hiding this comment.
Could eventually allow framework/type for the out-of-project list, would be just a filter on the listing. Currently just one type and not that many projects under each, so not really a massive need to filter that output out, just a nice to have.
Co-authored-by: Copilot <copilot@github.com>
…eUI/igniteui-cli into dkalinov/help_improvements
Co-authored-by: Damyan Petev <damyanpetev@users.noreply.github.com>
Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/2e0c13c0-f9ca-4c8f-b7f7-4427b6f693df Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Description
Two related improvements to the CLI surface:
ig listoutside a project now enumerates all frameworks and their project templates. Previously,ig listwith no--frameworkflag silently defaulted to jQuery. It now iterates every registered framework, prints each of its project libraries (project types), and lists the non-hidden project templates under each one — giving users a complete overview of whatig newcan scaffold before committing to a framework. Existing in-project behaviour and explicit-f/-tusage are unchanged. Passing-twithout-foutside a project now errors cleanly instead of being silently ignored.Help output overhaul. The previous
.usage("")calls incli.tsand every command builder were suppressing the command banner and description text that yargs would otherwise render for--help. Replaced with a real top-level usage (Usage: ig [command] [options]), an explicit note that runningigalone starts step-by-step mode, and top-level examples. Added.positional(...)declarations soig new --help,ig add --help, andig doc --helpactually document their positional arguments. Normalizeddescribestrings (lowercase verbs, no trailing periods) and option text across every command. Added.example(...)entries onnew,add, andlist.Also fixed a latent bug: after yargs dispatched a command via its alias (e.g.
ig l,ig g), the post-parse guard incli.tscomparedargv._[0]against a hand-maintainedALL_COMMANDSset containing only primary names, producing a spurious "Unknown command" error after the handler had already run successfully.cli.tsnow derives the accepted-command set from each registered command'scommand+aliases, so aliases are automatically recognized. Also addedupgradeas an alias forupgrade-packages.Related Issue
Closes #
Type of Change
(Also includes a bug fix for the alias-routing "Unknown command" false positive.)
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context
New
ig listoutput (outside a project, no-fflag):New top-level
ig --help:Note on behaviour change:
ig listwith no arguments outside a project used to default to--framework jquery; it now prints the all-frameworks summary instead. Anyone scripting against the old output should pass-f jqueryexplicitly.Test coverage:
spec/unit/list-spec.ts— added a case asserting the multi-framework listing (including a hidden template filtered out) and a case asserting-t-without--ferrors.spec/acceptance/help-spec.ts— expectations rewritten for the new help output; all 11 cases pass.spec/unit/mcp-cli-spec.ts— describe-assertion lowercased.