Skip to content
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ poetry export -f requirements.txt --output requirements.txt

* `--format (-f)`: The format to export to (default: `requirements.txt`). Currently, only `constraints.txt` and `requirements.txt` are supported.
* `--output (-o)`: The name of the output file. If omitted, print to standard output.
* `--without`: The dependency groups to ignore when exporting.
* `--with`: The optional dependency groups to include when exporting.
* `--only`: The only dependency groups to include when exporting.
* `--with`: The dependency groups to include. By default, no groups are exported.
* `--only`: The only dependency groups to include.
* `--without`: The dependency groups to ignore. *Deprecated**)
* `--default`: Only export the main dependencies. (**Deprecated**)
* `--dev`: Include development dependencies. (**Deprecated**)
* `--extras (-E)`: Extra sets of dependencies to include.
Expand Down
8 changes: 4 additions & 4 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ poetry export --only test,docs

* `--format (-f)`: The format to export to (default: `requirements.txt`). Currently, only `constraints.txt` and `requirements.txt` are supported.
* `--output (-o)`: The name of the output file. If omitted, print to standard output.
* `--without`: The dependency groups to ignore when exporting.
* `--with`: The optional dependency groups to include when exporting.
* `--only`: The only dependency groups to include when exporting.
* `--default`: Only export the main dependencies. (**Deprecated**)
* `--with`: The optional and non-optional dependency groups to include. By default, only the main dependencies are included.
* `--only`: The only dependency groups to include.
* {{< option name="without" deprecated=true >}}The dependency groups to ignore.{{< /option >}}
* {{< option name="default" deprecated=true >}}Only export the main dependencies.{{< /option >}}
* {{< option name="dev" deprecated=true >}}Include development dependencies.{{< /option >}}
* `--extras (-E)`: Extra sets of dependencies to include.
* `--without-hashes`: Exclude hashes from the exported file.
Expand Down
27 changes: 26 additions & 1 deletion src/poetry_plugin_export/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,32 @@ class ExportCommand(GroupCommand):
None,
"Include development dependencies. (<warning>Deprecated</warning>)",
),
*GroupCommand._group_dependency_options(),
option(
"with",
None,
# note: unlike poetry install, the default excludes non-optional groups
(
"The optional and non-optional dependency groups to include."
" By default, only the main dependencies are included."
),
flag=False,
multiple=True,
),
option(
"only",
None,
"The only dependency groups to include.",
flag=False,
multiple=True,
),
option(
"without",
None,
# deprecated: groups are always excluded by default
"The dependency groups to ignore. (<warning>Deprecated</warning>)",
flag=False,
multiple=True,
),
option(
"extras",
"E",
Expand Down