Skip to content
Bitwarden Logo

project

The project command is used to access, manipulate, and create projects. The scope of access assigned to your machine account will determine what actions can be completed with the project command.

Subcommands

  • create: create a new project
  • delete: delete one or more projects
  • edit: change the name of a project
  • get: retrieves a specific project
  • list: list the projects a machine account has access to

For additional details regarding the commands available for project, use:

bws project --help

project create

Use bws project create to create a new project. This command requires a NAME.

Terminal window
bws project create <NAME>

In this example, a project will be created with the name My project.

Terminal window
bws project create "My project"

By default, bws project create will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).

Terminal window
{
"object": "project",
"id": "1c80965c-acb3-486e-ac24-b03000dc7318",
"organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41",
"name": "My project",
"creationDate": "2023-06-29T13:22:37.942559Z",
"revisionDate": "2023-06-29T13:22:37.942559Z"
}

project delete

Use bws project delete to delete one or more projects designated by the PROJECT_IDS.

Terminal window
bws project delete <PROJECT_IDS>

For a single project where f1fe5978-0aa1-4bb0-949b-b03000e0402a represents the PROJECT_ID:

Terminal window
bws project delete f1fe5978-0aa1-4bb0-949b-b03000e0402a

For multiple projects where 1c80965c-acb3-486e-ac24-b03000dc7318 and f277fd80-1bd2-4532-94b2-b03000e00c6c represent the PROJECT_IDS:

Terminal window
bws project delete 1c80965c-acb3-486e-ac24-b03000dc7318 f277fd80-1bd2-4532-94b2-b03000e00c6c

Output:

Terminal window
1 project deleted successfully.

project edit

Using the edit command you can change the name of a project with the following input:

Terminal window
bws project edit <PROJECT_ID> --name <NEW_NAME>

For example, this command will change the project name to My project 2.

Terminal window
bws project edit 1c80965c-acb3-486e-ac24-b03000dc7318 --name "My project 2"

By default, bws project edit will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).

Terminal window
{
"object": "project",
"id": "1c80965c-acb3-486e-ac24-b03000dc7318",
"organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41",
"name": "My project 2",
"creationDate": "2023-06-29T13:22:37.942559Z",
"revisionDate": "2023-06-29T13:31:07.927829Z"
}

project get

The get command retrieves a specific project which the logged-in machine account can access from your vault. Objects in your vault that the machine account does not have access to cannot be retrieved.

Terminal window
bws project get <PROJECT_ID>

To get a specific project, use the following command where e325ea69-a3ab-4dff-836f-b02e013fe530 represents a PROJECT_ID:

Terminal window
bws project get e325ea69-a3ab-4dff-836f-b02e013fe530

By default, get will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).

Terminal window
{
"object": "project",
"id": "e325ea69-a3ab-4dff-836f-b02e013fe530",
"organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41",
"name": "App 1",
"creationDate": "2023-06-27T19:24:42.181607Z",
"revisionDate": "2023-06-27T19:24:42.181607Z"
}

project list

To list the projects this machine account has access to, use the following command:

Terminal window
bws project list

By default, list will return objects as a JSON array, as in the following example. You can alter the output format using the --output flag (learn more).

Terminal window
[
{
"object": "project",
"id": "e325ea69-a3ab-4dff-836f-b02e013fe530",
"organizationId": "10e8cbfa-7bd2-4361-bd6f-b02e013f9c41",
"name": "App 1",
"creationDate": "2023-06-27T19:24:42.181607Z",
"revisionDate": "2023-06-27T19:24:42.181607Z"
}.
...
]