mix workspace.list (Workspace v0.2.1)
View SourceShows workspace project info
$ mix workspace.list
By default the following are displayed:
- the project app name
- the project path with respect to workspace path
- the description if set
- the project tags
Command line options
Filtering options
--dependency
(string
) - If set, only projects that have the given dependency will be considered.--dependent
(string
) - If set, only projects that are dependencies of the given project are considered.-e, --exclude...
(string
) - Ignore the given projects [values can be grouped with the,
separator]--exclude-tag...
(string
) - If set, any projects with any of the given tag(s) will be excluded. For scoped tags you should provide a colon separated string (examples:shared
,scope:api
,type:utils
). For selecting a specific tag use--tag
[values can be grouped with the,
separator]--maintainer
(string
) - Search for projects with the given maintainer. A partial case insensitive string search is performed so you can provide only part of the maintainer's name.--path...
(string
) - A path under which projects will be considered. Paths should be relative with respect to the workspace root. All other projects can be ignored. Can be set multiple times.-p, --project...
(string
) - The project name, can be defined multiple times. If not set all projects are considered [values can be grouped with the,
separator]--tag...
(string
) - If set, only projects with the given tag(s) will be considered. For scoped tags you should provide a colon separated string (examples:shared
,scope:api
,type:utils
). For excluding a specific tag use--exclude-tag
[values can be grouped with the,
separator]
Display options
--show-status
(boolean
) - If set the status of each project will be included in the output graph [default:false
]
Export options
--json
(boolean
) - If set ajson
file will be generated with the list of workspace projects and associated metadata. By default it will be saved inworkspace.json
in the current directory. You can override the output path by setting the--output
option. [default:false
]--output
(string
) - The output file. Applicable only if--json
is set. [default:workspace.json
]--relative-paths
(boolean
) - If set the paths in the exported json file will be relative with respect to the workspace path. Applicable only if--json
is set. [default:false
]
Global workspace options
--config-path
(string
) - The path to the workspace config to be used, relative to the workspace path [default:.workspace.exs
]--workspace-path
(string
) - If set it specifies the root workspace path, defaults to current directory
Filtering projects
Several command line options can limit the returned projects and filter the workspace.
You can list only projects with a specific tag:
$ mix workspace.list --tag core
Or exclude projects with a specific tag:
$ mix workspace.list --exclude-tag deprecated
If your monorepo has a nested structure you can list projects only under one or more specific paths.
$ mix workspace.list --path packages/shared --path packages/infra
In large monorepos you may want to get all projects depending on a specific package. You
can achieve this through the --dependency
option:
$ mix workspace.list --dependency foo
Additionally you can specify the --dependent
flag to consider only dependencies of a
given project:
$ mix workspace.list --dependent foo
You can also filter by the project's maintainer. The search is case insensitive. The
maintainers are expected to be defined under package
:
def project do
[
package: [
maintainers: ["Jack Sparrow"]
],
# rest project options
]
In order to get all projects associated with a specific maintainer:
$ mix workspace.list --maintainer "Jack Sparrow"
# notice that the search is case insensitive, this works as well
$ mix workspace.list --maintainer sparrow