跳到主要内容

Project Management Command: project

List all projects: ls

Entrance:

lbg project ls

Summary:

usage: lbg project ls [-h] [-q] [-s] [-o] [--csv] [--json] [--yaml] [--table]
[--noheader]

options:
-h, --help show this help message and exit
-q, --quiet only show project id
-s, --self only show project belong to current user
-o, --other only show project not belong to current user
--csv output with csv format
--json output with json format
--yaml output with yaml format
--table output with table format
--noheader does not print header information

Parameter description:

ParameterAbbreviationDescriptionRequired
--quiet-qOnly show project idNo
--self-sOnly show projects created by yourselfNo
--other-oOnly show projects not created by yourselfNo

Example:

$ lbg project ls --yaml # View all projects and output in yaml format
$ lbg project ls -s -q # View the id of your own created projects

Switch default project: switch

Entrance:

lbg project switch <project_id>

Summary:

usage: lbg project switch [-h] <pgid>

positional arguments:
<pgid> project id

options:
-h, --help show this help message and exit

Parameter description:

ParameterAbbreviationDescriptionRequired
project_id-The project id to switch toYes

Example:

$ lbg project switch 123 # Switch the default project to 123

View current project: current

Entrance:

lbg project current

Summary:

usage: lbg project current [-h]

options:
-h, --help show this help message and exit