You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CircleCI CLI is used for some advanced features during job runs, for example xref:optimize:use-the-circleci-cli-to-split-tests.adoc[test splitting] for build time optimization.
332
332
333
+
[#project-management]
334
+
== Project management
335
+
336
+
The CircleCI CLI allows you to execute several project-oriented actions.
337
+
338
+
=== Create a new project
339
+
340
+
NOTE: This command only applies to GitLab or GitHub App organizations (Organization slug starts with `circleci` followed by a UUID. For example, `circleci/34R3kN5RtfEE7v4sa4nWAU`. You can find your organization slug under menu:Organization Settings[Overview]).
341
+
342
+
Use the `create` sub-command to create a new project.
- `<vcs-type>` depends on the type of integration for your organization. This command only supports the `circleci` VCS type.
350
+
351
+
- `<org-id>` is the ID of the organization associated with the project. You can find it from the CircleCI web app under menu:Organization Settings[Overview].
352
+
353
+
- `--name` is the flag that allows you to provide the project name. If not provided, you will be prompted to enter it.
354
+
355
+
For full details on the `create` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_project_create.html[CLI docs].
356
+
357
+
358
+
=== Create an environment variable for a project
359
+
360
+
Use the `secret create` sub-command to create an environment variable for a project:
- `<vcs-type>` depends on the type of integration for your organization. For projects that use GitLab or GitHub App, use `circleci` as `vcs-type`.
368
+
369
+
- `<org-id>` is the ID of the organization associated with the project. You can find it from the CircleCI web app under menu:Organization Settings[Overview].
370
+
371
+
- `<project-id>` is the ID of the project associated with the project. You can find it from the CircleCI web app under menu:Project Settings[Overview].
372
+
373
+
- `<env-name>` is the name of the environment variable to create.
374
+
375
+
- `--env-value` is the flag that allows you to provide the value of the environment variable. If not provided, you will be prompted to enter it.
376
+
377
+
For full details on the `secret create` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_project_secret_create.html[CLI docs].
378
+
379
+
=== List all environment variables for a project
380
+
381
+
Use the `secret list` sub-command to list all environment variables for a project:
382
+
383
+
[,shell]
384
+
----
385
+
circleci project secret list <vcs-type> <org-id> <project-id>
386
+
----
387
+
388
+
- `<vcs-type>` depends on the type of integration for your organization. For projects that use GitLab or GitHub App, use `circleci` as `vcs-type`.
389
+
390
+
- `<org-id>` is the ID of the organization associated with the project. You can find it from the CircleCI web app under menu:Organization Settings[Overview].
391
+
392
+
- `<project-id>` is the ID of the project associated with the project. You can find it from the CircleCI web app under menu:Project Settings[Overview].
393
+
394
+
For full details on the `secret list` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_project_secret_list.html[CLI docs].
395
+
396
+
=== Purge Docker Layer Cache for a project
397
+
398
+
Purging the xref:optimize:docker-layer-caching.adoc[Docker Layer Cache] means removing previously stored Docker image layers so that future builds will not reuse those cached layers. This forces CircleCI to rebuild Docker images from scratch, rather than leveraging layers from earlier builds to speed up the process.
399
+
400
+
Use the `dlc purge` sub-command to purge Docker Layer Cache for a project:
- `<vcs-type>` depends on the type of integration for your organization. For projects that use GitLab or GitHub App, use `circleci` as `vcs-type`.
408
+
409
+
- `<org-id>` is the ID of the organization associated with the project. You can find it from the CircleCI web app under menu:Organization Settings[Overview].
410
+
411
+
- `<project-id>` is the ID of the project associated with the project. You can find it from the CircleCI web app under menu:Project Settings[Overview].
412
+
413
+
For full details on the `dlc purge` sub-command, refer to the link:https://circleci-public.github.io/circleci-cli/circleci_project_dlc.html[CLI docs].
414
+
333
415
[#context-management]
334
416
== Context management
335
417
@@ -342,7 +424,7 @@ xref:security:contexts.adoc[Contexts] provide a mechanism for securing and shari
342
424
- `show` - Show a context
343
425
- `store-secret` - Store a new environment variable in the named context
344
426
345
-
The above list are "sub-commands" in the CLI, which would be executed like so:
427
+
The above list are "sub-commands" in the CLI, which are executed like so:
0 commit comments