ash-project / ash-project/igniter

Reserves `--help` for each mix task and showing bad args error with its helper

Open
#182 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Elixir
Stars
404
Forks
75
Avg merge
9h 58m
Merged PRs (30d)
3

Description

Hello,

As we discussed on Discord, I think it would be great if `Igniter` reserves the `--help`s option and provides a display similar to mix help task.
This approach can help prevent mistakes for users of the `CLI,` especially those coming from **non-Elixir** stacks.

---
Another improvement that I believe can enhance the task is displaying a helper specific to each argument. For instance, if an argument is entered incorrectly, the task could show an error like:

```
** (Mix) Could not invoke task "mishka.ui.gen.component": 1 error found!
--color : Missing argument of type string
```

However, in a library like Clap (built on Rust), the usage of that option is also displayed. For example:

```
curl [options / URLs]
or
--alt-svc
or
Usage: color [OPTIONS]
```

This approach provides users with clear guidance on how to correctly use the options, similar to how it's presented in Unix-style commands.

---

By the way, since Igniter's strength lies in generating initial templates and providing a very intuitive structure, I believe that, in addition to argument definitions, composing other tasks, and similar features, it would be beneficial to include the version in its map. This way, the `--version` option could also be reserved automatically.

Of course, this is more of a personal suggestion, but I think it could add a nice touch to the tool's usability.

Thank you in advance

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Igniter's CLI entry point, task argument definitions, task composition, and version map. Clarify whether the scope includes reserved --help, argument-specific errors with usage, and automatic --version handling, then define tests and acceptance criteria for each behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.