Display the list of OL Hub projects
The ol list projects command lists the names and descriptions of projects you have on your OL Hub account. You have the option to display additional properties such as project ID and the number of assets in the project.
The command is useful when you have to populate the value of the --project option in the ol generate command, and you want to know if the project already exists in the OL Hub. You can also find the command handy when you execute the ol create project command, and you don't want to name your new project with the name of an existing project.
By default, when you execute the ol list projects command, all projects in your account will be listed. However, if you have many projects, the list may be too long. To avoid that, you can paginate through the project list by using the --offset and the --limit options. In the --limit option, you set the number of projects the list will include, and in the --offset option, the list starting point.
For example, if your account contains approximately 40 projects and you want your list to start from the 21st project, type the following command: ol list projects --offset 20. If you want to limit this list to only 10 projects, type ol list projects --offset 20 --limit 10. See more examples in the Examples section below.
Rules
- Login to the OL Hub
Syntax
ol list projects [OPTIONS]
Options
--additional, -a
Display additional properties for each project in the list (project id, modified by, last modified, number of assets).
--limit, -l
Limit the number of projects listed in the project list.
--offset, -o
Set the project list starting point.
--filter, -f
The regular expression to filter the list by project name
Examples
Listing all the projects
temp> ol list projects
temp$ ol list projects
Listing the first 10 projects
temp> ol list projects --limit 10
temp$ ol list projects --limit 10
Listing the projects from the 11th project onwards
> ol list projects --offset 10
$ ol list projects --offset 10
Listing the 11th to the 20th project
> ol projects --offset 10 --limit 10
$ ol projects --offset 10 --limit 10