The Argument object is used to indicate when a Subcommand or Option takes a user-defined value as a parameter.


When mapping out the CLI Skeleton, it is essential to include an Argument object when required by a subcommand or options. If no argument is specified but one is expected by the CLI tool, Fig will provide incorrect suggestions and get in the user's way when they try to type it out.

Unlike Subcommand or Option, Argument objects do not conform to the Suggestion type. The only properties on Argument, which are visible in the autocomplete popup are name and description.

Arguments can also include hints about what suggestions should be displayed.

  • Generators, which can only be defined on Arguments, are one example of this. Generators are responsible for providing suggestions for the argument.
  • The isScript, isCommand, and isModule properties also inform what type of suggestions Fig will list.