main: rename list-images to list

Rename the `list-images` command to `list`. We don't have `-image(s)` in
our other subcommands so this is for consistency.

We keep a `list-images` alias behind for compatibility reasons.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-03-31 11:57:27 +02:00 committed by Michael Vogt
parent a963712152
commit 274a75387b
5 changed files with 27 additions and 26 deletions

View file

@ -5,7 +5,7 @@ After [installation](./00-installation.md) you probably want to use `image-build
Let's take a look at the available `x86_64` image types for Fedora 41 and build one of them.
```console
$ image-builder list-images --filter arch:x86_64 --filter distro:fedora-41
$ image-builder list --filter arch:x86_64 --filter distro:fedora-41
fedora-41 type:ami arch:x86_64
fedora-41 type:container arch:x86_64
fedora-41 type:image-installer arch:x86_64
@ -29,21 +29,21 @@ $ sudo image-builder build --distro fedora-41 qcow2
# ...
```
## `image-builder list-images`
## `image-builder list`
The `list-images` command for `image-builder` lists the available built-in image types that can be built for the [built-in distributions](./10-faq.md#built-in-distributions).
The `list` command for `image-builder` lists the available built-in image types that can be built for the [built-in distributions](./10-faq.md#built-in-distributions).
```console
$ image-builder list-images
$ image-builder list
# ... long list ...
```
### Format
The output format used by `list-images` can be swapped with the `--format` flag. Available types are `text` (for display in a terminal) and `json` which can be useful to consume programmatically:
The output format used by `list` can be swapped with the `--format` flag. Available types are `text` (for display in a terminal) and `json` which can be useful to consume programmatically:
```console
$ image-builder list-images --format=json | jq '.[0]'
$ image-builder list --format=json | jq '.[0]'
{
"distro": {
"name": "centos-9"
@ -59,14 +59,14 @@ $ image-builder list-images --format=json | jq '.[0]'
### Filtering
`list-images` output can be filtered with the `--filter` argument.
`list` output can be filtered with the `--filter` argument.
### Distribution
To filter on a given distribution, one can use `--filter` with the `distro:` prefix:
```console
$ image-builder list-images --filter distro:fedora-41
$ image-builder list --filter distro:fedora-41
# ... long list ...
```
@ -75,7 +75,7 @@ $ image-builder list-images --filter distro:fedora-41
To filter on a given [image type](./10-faq.md#image-types) the `type:` prefix:
```console
$ image-builder list-images --filter type:qcow2
$ image-builder list --filter type:qcow2
# ... long list ...
```
### Architecture
@ -83,7 +83,7 @@ $ image-builder list-images --filter type:qcow2
To filter on a given architecture use the `arch:` prefix:
```console
$ image-builder list-images --filter arch:aarch64
$ image-builder list --filter arch:aarch64
# ... long list ...
```
@ -92,7 +92,7 @@ $ image-builder list-images --filter arch:aarch64
Filters can be combined to narrow the list further.
```console
$ image-builder list-images --filter type:qcow2 --filter distro:fedora-41
$ image-builder list --filter type:qcow2 --filter distro:fedora-41
# ... list ...
```