Skip to content

feat(cli): list-all-frameworks mode + help output overhaul#1662

Merged
damyanpetev merged 12 commits intomasterfrom
dkalinov/help_improvements
Apr 28, 2026
Merged

feat(cli): list-all-frameworks mode + help output overhaul#1662
damyanpetev merged 12 commits intomasterfrom
dkalinov/help_improvements

Conversation

@dkalinovInfra
Copy link
Copy Markdown
Contributor

Description

Two related improvements to the CLI surface:

  1. ig list outside a project now enumerates all frameworks and their project templates. Previously, ig list with no --framework flag 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 what ig new can scaffold before committing to a framework. Existing in-project behaviour and explicit -f/-t usage are unchanged. Passing -t without -f outside a project now errors cleanly instead of being silently ignored.

  2. Help output overhaul. The previous .usage("") calls in cli.ts and 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 running ig alone starts step-by-step mode, and top-level examples. Added .positional(...) declarations so ig new --help, ig add --help, and ig doc --help actually document their positional arguments. Normalized describe strings (lowercase verbs, no trailing periods) and option text across every command. Added .example(...) entries on new, add, and list.

Also fixed a latent bug: after yargs dispatched a command via its alias (e.g. ig l, ig g), the post-parse guard in cli.ts compared argv._[0] against a hand-maintained ALL_COMMANDS set containing only primary names, producing a spurious "Unknown command" error after the handler had already run successfully. cli.ts now derives the accepted-command set from each registered command's command + aliases, so aliases are automatically recognized. Also added upgrade as an alias for upgrade-packages.

Related Issue

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration 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

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

Additional Context

New ig list output (outside a project, no -f flag):

Available frameworks and project templates:

Angular (angular)
	Ignite UI for Angular (igx-ts)
		empty             Project structure with routing and a home page
		side-nav          Project structure with side navigation drawer
		side-nav-auth     Side navigation extended with user authentication module

jQuery (jquery)
	jquery (js)
		jquery            Ignite UI CLI project for jQuery

React (react)
	Ignite UI for React (igr-ts)
		empty             Empty project structure with home page and routing
		top-nav           Project structure with top navigation menu

WebComponents (webcomponents)
	Ignite UI for Web Components (igc-ts)
		empty             Project structure with routing and a home page
		side-nav          Project structure with side navigation drawer

Run 'ig new <name> --framework <framework> --type <projectType>' to scaffold a project.
Run 'ig list -f <framework> [-t <projectType>]' to list component templates.

New top-level ig --help:

Usage: ig [command] [options]

Run without a command to start the interactive step-by-step project setup.

Commands:
  ig new [name]             creates a project
  ig add [template] [name]  adds a component or view template to the current project
  ig build                  builds the project
  ig start                  starts the project
  ig generate               generates custom templates (see subcommands)  [aliases: g]
  ig config                 gets, sets or adds a configuration property (see subcommands)
  ig doc [term]             opens the Infragistics search for the given term
  ig test                   executes project tests
  ig list                   lists frameworks, project templates and component templates  [aliases: l]
  ig upgrade-packages       upgrades Ignite UI packages  [aliases: upgrade]
  ig mcp                    starts the Ignite UI MCP server for AI assistant integration
  ig ai-config              configures Ignite UI AI tooling (MCP servers and AI coding skills)

Options:
  -v, --version  Show current Ignite UI CLI version  [boolean]
  -h, --help     Show help                           [boolean]

Examples:
  ig                                 launch the interactive step-by-step project setup
  ig new my-app --framework angular  scaffold a new Ignite UI for Angular project
  ig add grid main-grid              add a Grid component to the current project
  ig list                            show all frameworks and their project templates

Note on behaviour change: ig list with 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 jquery explicitly.

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--f errors.
  • 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.

Copilot AI review requested due to automatic review settings April 23, 2026 09:19
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 23, 2026

Coverage Status

coverage: 86.279% (-0.02%) from 86.3% — dkalinov/help_improvements into master

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 list outside a project when --framework isn’t provided; error when --type is 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 upgrade alias for upgrade-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.

Comment thread packages/cli/lib/commands/doc.ts
kdinev
kdinev previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Member

@damyanpetev damyanpetev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Image

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

Image

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"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually a note-worthy change, kinda lost in all the note descriptions. Not sure what prompted it, but sure I guess it.

Comment thread packages/cli/lib/commands/list.ts Outdated
inProject = true;
}

if (!inProject && !argv.framework) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/cli/lib/cli.ts
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

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:

  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node packages/cli/bin/execute.js new --help de_modules/.bin/tsx (dns block)
    • Triggering command: /usr/local/bin/node node packages/cli/bin/execute.js config --help (dns block)
    • Triggering command: /usr/local/bin/node node packages/cli/bin/execute.js generate --help (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@damyanpetev damyanpetev merged commit 5055bda into master Apr 28, 2026
3 checks passed
@damyanpetev damyanpetev deleted the dkalinov/help_improvements branch April 28, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants