@simplysf/simply-gitlab 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -150,6 +150,7 @@ exitCode, status?, body?}}` — and nothing to stdout. Exit codes are identical
150
150
  - [`simply gitlab mr list`](#simply-gitlab-mr-list)
151
151
  - [`simply gitlab mr update`](#simply-gitlab-mr-update)
152
152
  - [`simply gitlab mr view`](#simply-gitlab-mr-view)
153
+ - [`simply gitlab project create`](#simply-gitlab-project-create)
153
154
  - [`simply gitlab project list`](#simply-gitlab-project-list)
154
155
  - [`simply gitlab project view`](#simply-gitlab-project-view)
155
156
  - [`simply gitlab release list`](#simply-gitlab-release-list)
@@ -197,7 +198,7 @@ FLAG DESCRIPTIONS
197
198
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
198
199
  ```
199
200
 
200
- _See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/branch/create.js)_
201
+ _See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/branch/create.js)_
201
202
 
202
203
  ## `simply gitlab branch list`
203
204
 
@@ -240,7 +241,7 @@ FLAG DESCRIPTIONS
240
241
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
241
242
  ```
242
243
 
243
- _See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/branch/list.js)_
244
+ _See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/branch/list.js)_
244
245
 
245
246
  ## `simply gitlab ci environment list`
246
247
 
@@ -286,7 +287,7 @@ FLAG DESCRIPTIONS
286
287
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
287
288
  ```
288
289
 
289
- _See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/ci/environment/list.js)_
290
+ _See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/environment/list.js)_
290
291
 
291
292
  ## `simply gitlab ci job list`
292
293
 
@@ -330,7 +331,7 @@ FLAG DESCRIPTIONS
330
331
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
331
332
  ```
332
333
 
333
- _See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/list.js)_
334
+ _See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/list.js)_
334
335
 
335
336
  ## `simply gitlab ci job log`
336
337
 
@@ -375,7 +376,7 @@ FLAG DESCRIPTIONS
375
376
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
376
377
  ```
377
378
 
378
- _See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/log.js)_
379
+ _See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/log.js)_
379
380
 
380
381
  ## `simply gitlab ci variable list`
381
382
 
@@ -426,7 +427,7 @@ FLAG DESCRIPTIONS
426
427
  where this output is going.
427
428
  ```
428
429
 
429
- _See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/ci/variable/list.js)_
430
+ _See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/variable/list.js)_
430
431
 
431
432
  ## `simply gitlab commit create`
432
433
 
@@ -486,7 +487,7 @@ FLAG DESCRIPTIONS
486
487
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
487
488
  ```
488
489
 
489
- _See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/commit/create.js)_
490
+ _See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/create.js)_
490
491
 
491
492
  ## `simply gitlab commit diff`
492
493
 
@@ -528,7 +529,7 @@ FLAG DESCRIPTIONS
528
529
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
529
530
  ```
530
531
 
531
- _See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/commit/diff.js)_
532
+ _See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/diff.js)_
532
533
 
533
534
  ## `simply gitlab commit list`
534
535
 
@@ -579,7 +580,7 @@ FLAG DESCRIPTIONS
579
580
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
580
581
  ```
581
582
 
582
- _See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/commit/list.js)_
583
+ _See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/list.js)_
583
584
 
584
585
  ## `simply gitlab commit view`
585
586
 
@@ -620,7 +621,7 @@ FLAG DESCRIPTIONS
620
621
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
621
622
  ```
622
623
 
623
- _See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/commit/view.js)_
624
+ _See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/view.js)_
624
625
 
625
626
  ## `simply gitlab config apply`
626
627
 
@@ -687,7 +688,7 @@ FLAG DESCRIPTIONS
687
688
  the config does not target is an error rather than a silent no-op.
688
689
  ```
689
690
 
690
- _See code: [lib/commands/gitlab/config/apply.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/config/apply.js)_
691
+ _See code: [lib/commands/gitlab/config/apply.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/apply.js)_
691
692
 
692
693
  ## `simply gitlab config export`
693
694
 
@@ -738,7 +739,7 @@ FLAG DESCRIPTIONS
738
739
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
739
740
  ```
740
741
 
741
- _See code: [lib/commands/gitlab/config/export.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/config/export.js)_
742
+ _See code: [lib/commands/gitlab/config/export.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/export.js)_
742
743
 
743
744
  ## `simply gitlab config plan`
744
745
 
@@ -806,7 +807,7 @@ FLAG DESCRIPTIONS
806
807
  the config does not target is an error rather than a silent no-op.
807
808
  ```
808
809
 
809
- _See code: [lib/commands/gitlab/config/plan.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/config/plan.js)_
810
+ _See code: [lib/commands/gitlab/config/plan.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/plan.js)_
810
811
 
811
812
  ## `simply gitlab file create`
812
813
 
@@ -858,7 +859,7 @@ FLAG DESCRIPTIONS
858
859
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
859
860
  ```
860
861
 
861
- _See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/file/create.js)_
862
+ _See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/create.js)_
862
863
 
863
864
  ## `simply gitlab file update`
864
865
 
@@ -911,7 +912,7 @@ FLAG DESCRIPTIONS
911
912
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
912
913
  ```
913
914
 
914
- _See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/file/update.js)_
915
+ _See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/update.js)_
915
916
 
916
917
  ## `simply gitlab file view`
917
918
 
@@ -957,7 +958,7 @@ FLAG DESCRIPTIONS
957
958
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
958
959
  ```
959
960
 
960
- _See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/file/view.js)_
961
+ _See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/view.js)_
961
962
 
962
963
  ## `simply gitlab mr create`
963
964
 
@@ -1018,7 +1019,7 @@ FLAG DESCRIPTIONS
1018
1019
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1019
1020
  ```
1020
1021
 
1021
- _See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/mr/create.js)_
1022
+ _See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/create.js)_
1022
1023
 
1023
1024
  ## `simply gitlab mr list`
1024
1025
 
@@ -1072,7 +1073,7 @@ FLAG DESCRIPTIONS
1072
1073
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1073
1074
  ```
1074
1075
 
1075
- _See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/mr/list.js)_
1076
+ _See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/list.js)_
1076
1077
 
1077
1078
  ## `simply gitlab mr update`
1078
1079
 
@@ -1136,7 +1137,7 @@ FLAG DESCRIPTIONS
1136
1137
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1137
1138
  ```
1138
1139
 
1139
- _See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/mr/update.js)_
1140
+ _See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/update.js)_
1140
1141
 
1141
1142
  ## `simply gitlab mr view`
1142
1143
 
@@ -1177,7 +1178,85 @@ FLAG DESCRIPTIONS
1177
1178
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1178
1179
  ```
1179
1180
 
1180
- _See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/mr/view.js)_
1181
+ _See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/view.js)_
1182
+
1183
+ ## `simply gitlab project create`
1184
+
1185
+ Create a project, blank or from a template.
1186
+
1187
+ ```
1188
+ USAGE
1189
+ $ simply gitlab project create [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--name
1190
+ <value>] [--path <value>] [--namespace <value>] [--description <value>] [--visibility private|internal|public]
1191
+ [--default-branch <value>] [--initialize-with-readme] [--topics <value>] [--template <value>] [--custom-template]
1192
+ [--template-group <value>] [--template-project <value>] [--body <value> | --body-file <value>]
1193
+
1194
+ FLAGS
1195
+ --body=<value> Raw JSON request body.
1196
+ --body-file=<value> Path to a file holding the raw JSON request body.
1197
+ --custom-template Look --template up among the instance's custom project templates rather than the built-in
1198
+ ones.
1199
+ --default-branch=<value> Name of the default branch.
1200
+ --description=<value> Project description.
1201
+ --dry-run Print the request that would be sent and exit without sending it.
1202
+ --initialize-with-readme Create a first commit holding a README, so the repository is not empty.
1203
+ --name=<value> Project name. The path is derived from it when --path is not given.
1204
+ --namespace=<value> Group or user namespace to create the project in, by id or full path.
1205
+ --path=<value> Repository path, the URL slug. The name is derived from it when --name is not given.
1206
+ --template=<value> Template to create from: a built-in name, or with --custom-template or --template-group a
1207
+ custom one.
1208
+ --template-group=<value> Group whose custom project templates --template names, by id or full path.
1209
+ --template-project=<value> Custom template project to create from, by id or full path. Cannot be combined with
1210
+ --template.
1211
+ --topics=<value> Comma-separated topics to label the project with.
1212
+ --visibility=<option> Who can see the project.
1213
+ <options: private|internal|public>
1214
+
1215
+ CONNECTION FLAGS
1216
+ -e, --env-file=<value> Path to a .env file holding connection settings.
1217
+ --gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
1218
+ --gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
1219
+
1220
+ GLOBAL FLAGS
1221
+ --json Format output as json.
1222
+
1223
+ DESCRIPTION
1224
+ Create a project, blank or from a template.
1225
+
1226
+ Creates the project in --namespace, or in the namespace of the token owner when none is given. Give it --name or
1227
+ --path; GitLab derives whichever one is missing.
1228
+
1229
+ --template names one of the built-in templates GitLab ships, such as express or rails. To create from a custom
1230
+ template instead, add --custom-template for one the instance administrator registered, --template-group for one in a
1231
+ group, or use --template-project to name the template project itself by id or path — which GitLab prefers, because a
1232
+ name can be ambiguous. Custom templates need a Premium or Ultimate instance.
1233
+
1234
+ A template is applied asynchronously: this command returns as soon as the project record exists, with an import status
1235
+ of "scheduled", and the files arrive a few seconds later. Check "project view" until its import_status reads
1236
+ "finished" before writing to the repository. --dry-run prints the exact request body; a namespace or template given as
1237
+ a path is still looked up, so the printed ids are the ones that would be sent.
1238
+
1239
+ EXAMPLES
1240
+ $ simply gitlab project create --name new-service --namespace platform/apps
1241
+
1242
+ $ simply gitlab project create --name new-service --namespace platform/apps --template express --visibility internal
1243
+
1244
+ $ simply gitlab project create --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates
1245
+
1246
+ $ simply gitlab project create --path new-service --template-project platform/templates/service-skeleton --dry-run
1247
+
1248
+ FLAG DESCRIPTIONS
1249
+ -e, --env-file=<value> Path to a .env file holding connection settings.
1250
+
1251
+ Loaded before anything else. Variables already present in the environment win, so the file never overrides an
1252
+ explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1253
+
1254
+ --namespace=<value> Group or user namespace to create the project in, by id or full path.
1255
+
1256
+ Defaults to the namespace of the token owner.
1257
+ ```
1258
+
1259
+ _See code: [lib/commands/gitlab/project/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/create.js)_
1181
1260
 
1182
1261
  ## `simply gitlab project list`
1183
1262
 
@@ -1224,7 +1303,7 @@ FLAG DESCRIPTIONS
1224
1303
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1225
1304
  ```
1226
1305
 
1227
- _See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/project/list.js)_
1306
+ _See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/list.js)_
1228
1307
 
1229
1308
  ## `simply gitlab project view`
1230
1309
 
@@ -1263,7 +1342,7 @@ FLAG DESCRIPTIONS
1263
1342
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1264
1343
  ```
1265
1344
 
1266
- _See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/project/view.js)_
1345
+ _See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/view.js)_
1267
1346
 
1268
1347
  ## `simply gitlab release list`
1269
1348
 
@@ -1304,7 +1383,7 @@ FLAG DESCRIPTIONS
1304
1383
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1305
1384
  ```
1306
1385
 
1307
- _See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/release/list.js)_
1386
+ _See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/release/list.js)_
1308
1387
 
1309
1388
  ## `simply gitlab search`
1310
1389
 
@@ -1359,7 +1438,7 @@ FLAG DESCRIPTIONS
1359
1438
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1360
1439
  ```
1361
1440
 
1362
- _See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/search.js)_
1441
+ _See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/search.js)_
1363
1442
 
1364
1443
  ## `simply gitlab tag list`
1365
1444
 
@@ -1406,7 +1485,7 @@ FLAG DESCRIPTIONS
1406
1485
  explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
1407
1486
  ```
1408
1487
 
1409
- _See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.2.0/packages/simply-gitlab/lib/commands/gitlab/tag/list.js)_
1488
+ _See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/tag/list.js)_
1410
1489
  <!-- commandsstop -->
1411
1490
 
1412
1491
  ## License
@@ -3,9 +3,9 @@ title: Write safety
3
3
  description: The layers between a Simply GitLab command and a change to your repository, which of them is a real boundary, and why CI variable values are hidden by default.
4
4
  ---
5
5
 
6
- Six commands change data — `branch create`, `file create`, `file update`, `commit create`,
7
- `mr create`, and `mr update`. Nothing in this CLI deletes anything. Those six sit behind several
8
- layers, and only the last is a real boundary.
6
+ Seven commands change data — `project create`, `branch create`, `file create`, `file update`,
7
+ `commit create`, `mr create`, and `mr update`. Nothing in this CLI deletes anything. Those seven sit
8
+ behind several layers, and only the last is a real boundary.
9
9
 
10
10
  ## No `--confirm`, deliberately
11
11
 
@@ -19,8 +19,9 @@ something is the one that brings it back.
19
19
 
20
20
  ## `--dry-run`
21
21
 
22
- Accepted by all six. It prints the exact request body that would be sent and sends nothing, which
23
- is the cheapest way to see what is about to happen:
22
+ Accepted by all seven. It prints the exact request body that would be sent and sends nothing, which
23
+ is the cheapest way to see what is about to happen. The one nuance is `project create`: a namespace
24
+ or template given as a path is still looked up, so the printed ids are the ones that would be sent.
24
25
 
25
26
  ```sh
26
27
  simply gitlab mr create --project group/project \
@@ -0,0 +1,25 @@
1
+ import { GitLabCommand } from '../../../shared/base-command.js';
2
+ export default class GitlabProjectCreate extends GitLabCommand<typeof GitlabProjectCreate> {
3
+ static isWrite: boolean;
4
+ static readonly summary = "Create a project, blank or from a template.";
5
+ static readonly description: string;
6
+ static readonly examples: string[];
7
+ static readonly flags: {
8
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ path: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ namespace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ visibility: import("@oclif/core/interfaces").OptionFlag<"private" | "internal" | "public" | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ 'default-branch': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ 'initialize-with-readme': import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
+ topics: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'custom-template': import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
+ 'template-group': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ 'template-project': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ 'body-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ 'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
23
+ };
24
+ run(): Promise<unknown>;
25
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Flags } from '@oclif/core';
17
+ import { formatKeyValue, parseBodyInput, prepareProjectCreate } from '@simplysf/simply-gitlab-core';
18
+ import { GitLabCommand, parseList, writeFlags } from '../../../shared/base-command.js';
19
+ export default class GitlabProjectCreate extends GitLabCommand {
20
+ static isWrite = true;
21
+ static summary = 'Create a project, blank or from a template.';
22
+ static description = 'Creates the project in --namespace, or in the namespace of the token owner when none is ' +
23
+ 'given. Give it --name or --path; GitLab derives whichever one is missing.\n\n' +
24
+ '--template names one of the built-in templates GitLab ships, such as express or rails. To ' +
25
+ 'create from a custom template instead, add --custom-template for one the instance ' +
26
+ 'administrator registered, --template-group for one in a group, or use --template-project ' +
27
+ 'to name the template project itself by id or path — which GitLab prefers, because a name ' +
28
+ 'can be ambiguous. Custom templates need a Premium or Ultimate instance.\n\n' +
29
+ 'A template is applied asynchronously: this command returns as soon as the project record ' +
30
+ 'exists, with an import status of "scheduled", and the files arrive a few seconds later. ' +
31
+ 'Check "project view" until its import_status reads "finished" before writing to the ' +
32
+ 'repository. --dry-run prints the exact request body; a namespace or template given as a ' +
33
+ 'path is still looked up, so the printed ids are the ones that would be sent.';
34
+ static examples = [
35
+ '<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps',
36
+ '<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template express --visibility internal',
37
+ '<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates',
38
+ '<%= config.bin %> <%= command.id %> --path new-service --template-project platform/templates/service-skeleton --dry-run',
39
+ ];
40
+ static flags = {
41
+ ...writeFlags,
42
+ name: Flags.string({ summary: 'Project name. The path is derived from it when --path is not given.' }),
43
+ path: Flags.string({
44
+ summary: 'Repository path, the URL slug. The name is derived from it when --name is not given.',
45
+ }),
46
+ namespace: Flags.string({
47
+ summary: 'Group or user namespace to create the project in, by id or full path.',
48
+ description: 'Defaults to the namespace of the token owner.',
49
+ }),
50
+ description: Flags.string({ summary: 'Project description.' }),
51
+ visibility: Flags.option({
52
+ summary: 'Who can see the project.',
53
+ options: ['private', 'internal', 'public'],
54
+ })(),
55
+ 'default-branch': Flags.string({ summary: 'Name of the default branch.' }),
56
+ 'initialize-with-readme': Flags.boolean({
57
+ summary: 'Create a first commit holding a README, so the repository is not empty.',
58
+ default: false,
59
+ }),
60
+ topics: Flags.string({ summary: 'Comma-separated topics to label the project with.' }),
61
+ template: Flags.string({
62
+ summary: 'Template to create from: a built-in name, or with --custom-template or --template-group a custom one.',
63
+ }),
64
+ 'custom-template': Flags.boolean({
65
+ summary: "Look --template up among the instance's custom project templates rather than the built-in ones.",
66
+ default: false,
67
+ }),
68
+ 'template-group': Flags.string({
69
+ summary: 'Group whose custom project templates --template names, by id or full path.',
70
+ }),
71
+ 'template-project': Flags.string({
72
+ summary: 'Custom template project to create from, by id or full path. Cannot be combined with --template.',
73
+ }),
74
+ body: Flags.string({ summary: 'Raw JSON request body.', exclusive: ['body-file'] }),
75
+ 'body-file': Flags.string({ summary: 'Path to a file holding the raw JSON request body.' }),
76
+ };
77
+ async run() {
78
+ const client = this.gitlab();
79
+ const request = await prepareProjectCreate(client, {
80
+ name: this.flags.name,
81
+ path: this.flags.path,
82
+ namespace: this.flags.namespace,
83
+ description: this.flags.description,
84
+ visibility: this.flags.visibility,
85
+ defaultBranch: this.flags['default-branch'],
86
+ initializeWithReadme: this.flags['initialize-with-readme'] || undefined,
87
+ topics: parseList(this.flags.topics),
88
+ template: this.flags.template,
89
+ customTemplate: this.flags['custom-template'] || undefined,
90
+ templateGroup: this.flags['template-group'],
91
+ templateProject: this.flags['template-project'],
92
+ body: parseBodyInput(this.flags.body, this.flags['body-file']),
93
+ });
94
+ if (this.flags['dry-run']) {
95
+ this.log('Dry run — not sent. Request body:');
96
+ this.logSafe(JSON.stringify(request, null, 2));
97
+ return request;
98
+ }
99
+ const created = (await client.createProject(request));
100
+ this.logSafe(formatKeyValue([
101
+ ['Created', created.path_with_namespace ?? this.flags.name ?? this.flags.path],
102
+ ['ID', created.id],
103
+ ['Visibility', created.visibility],
104
+ ['Default branch', created.default_branch],
105
+ ['Import status', created.import_status],
106
+ ['URL', created.web_url],
107
+ ]));
108
+ return created;
109
+ }
110
+ }
111
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/project/create.ts"],"names":[],"m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