# `ComposerNew.Argv`
[🔗](https://github.com/elixir-composer/composer/blob/v0.3.0/lib/composer_new/argv.ex#L1)

Splits `mix composer.new` argv into APP, REF, the archive's own options
and the recipe flags.

This is a manual pass, like `igniter.new`'s, rather than `OptionParser`
in `:strict` mode: a strict parse drops the switches it doesn't know,
which are the recipe flags here, and would read the `--no-ecto` of
`--with-args --no-ecto` as a switch. The rules:

  * APP is the first argument
  * an option with a value takes `--opt=value` or `--opt value`; for
    `--with-args`, the separate form takes the next argument as it is,
    even when it starts with `-`
  * `--install` and `--extra-dep` repeat, and `--install` also splits
    on `,`
  * `--reset`, `--dry-run` and `--no-recipe` are booleans
  * any other `-x` or `--x` is a recipe flag, kept in order
  * after `--`, everything is a recipe flag
  * the second positional argument is REF, and a third is an error

# `t`

```elixir
@type t() :: %{
  app: String.t(),
  ref: String.t() | nil,
  opts: keyword(),
  recipe_flags: [String.t()]
}
```

# `parse`

```elixir
@spec parse([String.t()]) :: {:ok, t()} | {:error, String.t()}
```

Parses argv.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
