@simplysf/simply-gitlab 0.1.0 → 0.2.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/LICENSE.txt +206 -0
- package/README.md +1203 -1203
- package/bin/run.js +9 -9
- package/package.json +244 -243
package/README.md
CHANGED
|
@@ -1,1203 +1,1203 @@
|
|
|
1
|
-
# @simplysf/simply-gitlab
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.com/@simplysf/simply-gitlab) [](https://raw.githubusercontent.com/SimplySF/simply-gitlab/main/LICENSE.txt)
|
|
4
|
-
|
|
5
|
-
Command-line interface for working with GitLab, built by [SimplySF](https://github.com/SimplySF).
|
|
6
|
-
|
|
7
|
-
Covers projects, repository files, branches, tags, releases, commits and diffs, merge requests,
|
|
8
|
-
CI/CD jobs and their logs, CI variables, deployment environments, and search. Output is
|
|
9
|
-
human-readable by default and raw JSON with `--json`, and every command that changes data takes
|
|
10
|
-
`--dry-run`, so it is usable both at a terminal and by a script or agent. See
|
|
11
|
-
[Commands](#commands) below for the full reference.
|
|
12
|
-
|
|
13
|
-
The same capabilities are available to AI agents through
|
|
14
|
-
[`@simplysf/simply-gitlab-mcp`](https://github.com/SimplySF/simply-gitlab/tree/main/packages/simply-gitlab-mcp).
|
|
15
|
-
|
|
16
|
-
## Install
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install -g @simplysf/simply-gitlab
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Issues
|
|
23
|
-
|
|
24
|
-
Please report any issues at https://github.com/SimplySF/simply-gitlab/issues
|
|
25
|
-
|
|
26
|
-
## Contributing
|
|
27
|
-
|
|
28
|
-
This package is part of the [`@simplysf/simply-gitlab`](https://github.com/SimplySF/simply-gitlab) monorepo. See the repo's [CONTRIBUTING.md](https://github.com/SimplySF/simply-gitlab/blob/main/CONTRIBUTING.md) for the repo structure, how to set up and build the project, our commit conventions, and how to submit a pull request. Please also read our [Code of Conduct](https://github.com/SimplySF/simply-gitlab/blob/main/CODE_OF_CONDUCT.md).
|
|
29
|
-
|
|
30
|
-
## Credentials
|
|
31
|
-
|
|
32
|
-
Connection settings come from environment variables, from flags, or from a `.env` file named with
|
|
33
|
-
`-e/--env-file`. Only GitLab connection variables are read from that file; anything else in it is
|
|
34
|
-
ignored.
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
GITLAB_URL=https://gitlab.example.com # omit for gitlab.com
|
|
38
|
-
GITLAB_TOKEN=glpat-...
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
The token is a personal, project, or group access token, created under **Preferences › Access
|
|
42
|
-
tokens**. `read_api` is enough for every read command; `api` is needed to write.
|
|
43
|
-
|
|
44
|
-
Explicit flags beat the environment, which beats the file's contents. Certificate verification is
|
|
45
|
-
always on: for an instance behind an internal or agency CA, trust that CA with
|
|
46
|
-
`NODE_EXTRA_CA_CERTS=/path/to/ca.pem` rather than disabling verification —
|
|
47
|
-
`GITLAB_SSL_VERIFY=false` is refused with an error rather than ignored.
|
|
48
|
-
|
|
49
|
-
`GITLAB_PROJECT` sets the default for `-p/--project`, so a shell in one repository's context need
|
|
50
|
-
not repeat it.
|
|
51
|
-
|
|
52
|
-
## Naming a project
|
|
53
|
-
|
|
54
|
-
Every project-scoped command takes `-p/--project`, which accepts either the numeric id or the full
|
|
55
|
-
path:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
simply gitlab mr list --project 1234
|
|
59
|
-
simply gitlab mr list --project group/subgroup/project
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
The path is URL-encoded for you. Do not encode it yourself.
|
|
63
|
-
|
|
64
|
-
Merge requests are addressed by their project-scoped **iid** — the number in the web URL — not by the
|
|
65
|
-
instance-wide `id` that also appears in the API payload. Both are bare integers, and passing the
|
|
66
|
-
wrong one does not fail: it addresses a different merge request in a different project.
|
|
67
|
-
|
|
68
|
-
## Write safety
|
|
69
|
-
|
|
70
|
-
Six commands change data: `branch create`, `file create`, `file update`, `commit create`,
|
|
71
|
-
`mr create`, and `mr update`. Nothing here deletes anything.
|
|
72
|
-
|
|
73
|
-
**`--dry-run`** is on every one of them. It prints the exact request body that would be sent and
|
|
74
|
-
sends nothing, which is the cheapest way to check a command before running it for real.
|
|
75
|
-
|
|
76
|
-
**`GITLAB_READ_ONLY=1`** refuses every write before any request is made. It is a guardrail against
|
|
77
|
-
running against the wrong project or with the wrong credentials, not a security boundary — anyone
|
|
78
|
-
who can set the variable can unset it.
|
|
79
|
-
|
|
80
|
-
**A `read_api`-scoped token** is the boundary that actually binds, because GitLab enforces it
|
|
81
|
-
server-side. Use one whenever you only mean to read.
|
|
82
|
-
|
|
83
|
-
There is deliberately no `--confirm` flag. Every write here creates something or edits a merge
|
|
84
|
-
request, and both are recoverable; requiring a confirmation for those would train you to pass it
|
|
85
|
-
always, at which point it protects nothing while still implying that it does. The first command that
|
|
86
|
-
deletes something is the one that brings the flag back.
|
|
87
|
-
|
|
88
|
-
## Reading untrusted text
|
|
89
|
-
|
|
90
|
-
Merge request titles and descriptions, commit messages, repository file contents, and CI job traces
|
|
91
|
-
are all written by whoever can push to a project or open a merge request. Control characters are
|
|
92
|
-
stripped from them before anything is printed, so an escape sequence cannot make your terminal show
|
|
93
|
-
something other than what the API returned. Your token is redacted from every error message and
|
|
94
|
-
response body.
|
|
95
|
-
|
|
96
|
-
## Exit codes
|
|
97
|
-
|
|
98
|
-
| Code | Meaning |
|
|
99
|
-
| ---- | ---------------------------- |
|
|
100
|
-
| 0 | Success |
|
|
101
|
-
| 1 | Request or network failure |
|
|
102
|
-
| 2 | Configuration or usage error |
|
|
103
|
-
| 3 | Authentication or permission |
|
|
104
|
-
|
|
105
|
-
Under `--json`, a failure writes a single JSON object to **stderr** — `{"error":{name, message,
|
|
106
|
-
exitCode, status?, body?}}` — and nothing to stdout. Exit codes are identical with and without
|
|
107
|
-
`--json`.
|
|
108
|
-
|
|
109
|
-
<!-- commands -->
|
|
110
|
-
|
|
111
|
-
- [`simply gitlab branch create`](#simply-gitlab-branch-create)
|
|
112
|
-
- [`simply gitlab branch list`](#simply-gitlab-branch-list)
|
|
113
|
-
- [`simply gitlab ci environment list`](#simply-gitlab-ci-environment-list)
|
|
114
|
-
- [`simply gitlab ci job list`](#simply-gitlab-ci-job-list)
|
|
115
|
-
- [`simply gitlab ci job log`](#simply-gitlab-ci-job-log)
|
|
116
|
-
- [`simply gitlab ci variable list`](#simply-gitlab-ci-variable-list)
|
|
117
|
-
- [`simply gitlab commit create`](#simply-gitlab-commit-create)
|
|
118
|
-
- [`simply gitlab commit diff`](#simply-gitlab-commit-diff)
|
|
119
|
-
- [`simply gitlab commit list`](#simply-gitlab-commit-list)
|
|
120
|
-
- [`simply gitlab commit view`](#simply-gitlab-commit-view)
|
|
121
|
-
- [`simply gitlab file create`](#simply-gitlab-file-create)
|
|
122
|
-
- [`simply gitlab file update`](#simply-gitlab-file-update)
|
|
123
|
-
- [`simply gitlab file view`](#simply-gitlab-file-view)
|
|
124
|
-
- [`simply gitlab mr create`](#simply-gitlab-mr-create)
|
|
125
|
-
- [`simply gitlab mr list`](#simply-gitlab-mr-list)
|
|
126
|
-
- [`simply gitlab mr update`](#simply-gitlab-mr-update)
|
|
127
|
-
- [`simply gitlab mr view`](#simply-gitlab-mr-view)
|
|
128
|
-
- [`simply gitlab project list`](#simply-gitlab-project-list)
|
|
129
|
-
- [`simply gitlab project view`](#simply-gitlab-project-view)
|
|
130
|
-
- [`simply gitlab release list`](#simply-gitlab-release-list)
|
|
131
|
-
- [`simply gitlab search`](#simply-gitlab-search)
|
|
132
|
-
- [`simply gitlab tag list`](#simply-gitlab-tag-list)
|
|
133
|
-
|
|
134
|
-
## `simply gitlab branch create`
|
|
135
|
-
|
|
136
|
-
Create a branch.
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
USAGE
|
|
140
|
-
$ simply gitlab branch create -p <value> --branch <value> --ref <value> [--json] [-e <value>] [--gitlab-url <value>]
|
|
141
|
-
[--gitlab-token <value>] [--dry-run]
|
|
142
|
-
|
|
143
|
-
FLAGS
|
|
144
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
145
|
-
--branch=<value> (required) Name of the new branch.
|
|
146
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
147
|
-
--ref=<value> (required) Branch, tag, or commit SHA to branch from.
|
|
148
|
-
|
|
149
|
-
CONNECTION FLAGS
|
|
150
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
151
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
152
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
153
|
-
|
|
154
|
-
GLOBAL FLAGS
|
|
155
|
-
--json Format output as json.
|
|
156
|
-
|
|
157
|
-
DESCRIPTION
|
|
158
|
-
Create a branch.
|
|
159
|
-
|
|
160
|
-
Points a new branch at an existing branch, tag, or commit SHA. GitLab refuses a name that already exists rather than
|
|
161
|
-
moving it, so this can never rewrite a branch someone else is using.
|
|
162
|
-
|
|
163
|
-
EXAMPLES
|
|
164
|
-
$ simply gitlab branch create --project group/project --branch feature/thing --ref main
|
|
165
|
-
|
|
166
|
-
$ simply gitlab branch create --project group/project --branch hotfix --ref v1.2.0
|
|
167
|
-
|
|
168
|
-
FLAG DESCRIPTIONS
|
|
169
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
170
|
-
|
|
171
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
172
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
_See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/branch/create.js)_
|
|
176
|
-
|
|
177
|
-
## `simply gitlab branch list`
|
|
178
|
-
|
|
179
|
-
List repository branches.
|
|
180
|
-
|
|
181
|
-
```
|
|
182
|
-
USAGE
|
|
183
|
-
$ simply gitlab branch list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
184
|
-
<value>] [--search <value>]
|
|
185
|
-
|
|
186
|
-
FLAGS
|
|
187
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
188
|
-
--limit=<value> [default: 20] Maximum number of branches to return across all pages.
|
|
189
|
-
--search=<value> Return only branches whose name contains this term.
|
|
190
|
-
|
|
191
|
-
CONNECTION FLAGS
|
|
192
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
193
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
194
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
195
|
-
|
|
196
|
-
GLOBAL FLAGS
|
|
197
|
-
--json Format output as json.
|
|
198
|
-
|
|
199
|
-
DESCRIPTION
|
|
200
|
-
List repository branches.
|
|
201
|
-
|
|
202
|
-
Branches come back in GitLab order, which is alphabetical rather than by recency, so on a busy repository --search is
|
|
203
|
-
usually what you want. The MERGED column reflects whether the branch is merged into the default branch, not into
|
|
204
|
-
whatever you are working on.
|
|
205
|
-
|
|
206
|
-
EXAMPLES
|
|
207
|
-
$ simply gitlab branch list --project group/project
|
|
208
|
-
|
|
209
|
-
$ simply gitlab branch list --project group/project --search release --limit 50
|
|
210
|
-
|
|
211
|
-
FLAG DESCRIPTIONS
|
|
212
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
213
|
-
|
|
214
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
215
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
_See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/branch/list.js)_
|
|
219
|
-
|
|
220
|
-
## `simply gitlab ci environment list`
|
|
221
|
-
|
|
222
|
-
List a project deployment environments.
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
USAGE
|
|
226
|
-
$ simply gitlab ci environment list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
227
|
-
<value>] [--name <value>] [--search <value>] [--state available|stopped]
|
|
228
|
-
|
|
229
|
-
FLAGS
|
|
230
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
231
|
-
--limit=<value> [default: 20] Maximum number of environments to return across all pages.
|
|
232
|
-
--name=<value> Return the environment with exactly this name.
|
|
233
|
-
--search=<value> Return environments whose name contains this term.
|
|
234
|
-
--state=<option> Environment state.
|
|
235
|
-
<options: available|stopped>
|
|
236
|
-
|
|
237
|
-
CONNECTION FLAGS
|
|
238
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
239
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
240
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
241
|
-
|
|
242
|
-
GLOBAL FLAGS
|
|
243
|
-
--json Format output as json.
|
|
244
|
-
|
|
245
|
-
DESCRIPTION
|
|
246
|
-
List a project deployment environments.
|
|
247
|
-
|
|
248
|
-
Environments are what CI deploys to and what review apps create. Both available and stopped ones are listed; --state
|
|
249
|
-
narrows to one. Use --json for the last deployment on each, which is the field worth having when you are answering
|
|
250
|
-
"what is running where".
|
|
251
|
-
|
|
252
|
-
EXAMPLES
|
|
253
|
-
$ simply gitlab ci environment list --project group/project
|
|
254
|
-
|
|
255
|
-
$ simply gitlab ci environment list --project group/project --state available --search prod
|
|
256
|
-
|
|
257
|
-
FLAG DESCRIPTIONS
|
|
258
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
259
|
-
|
|
260
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
261
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
_See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/environment/list.js)_
|
|
265
|
-
|
|
266
|
-
## `simply gitlab ci job list`
|
|
267
|
-
|
|
268
|
-
List CI jobs for a project.
|
|
269
|
-
|
|
270
|
-
```
|
|
271
|
-
USAGE
|
|
272
|
-
$ simply gitlab ci job list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
273
|
-
<value>] [--scope created|pending|running|failed|success|canceled|skipped|waiting_for_resource|manual...]
|
|
274
|
-
|
|
275
|
-
FLAGS
|
|
276
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
277
|
-
--limit=<value> [default: 20] Maximum number of jobs to return across all pages.
|
|
278
|
-
--scope=<option>... Job states to include. Repeatable.
|
|
279
|
-
<options:
|
|
280
|
-
created|pending|running|failed|success|canceled|skipped|waiting_for_resource|manual>
|
|
281
|
-
|
|
282
|
-
CONNECTION FLAGS
|
|
283
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
284
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
285
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
286
|
-
|
|
287
|
-
GLOBAL FLAGS
|
|
288
|
-
--json Format output as json.
|
|
289
|
-
|
|
290
|
-
DESCRIPTION
|
|
291
|
-
List CI jobs for a project.
|
|
292
|
-
|
|
293
|
-
Jobs across every pipeline, newest first. --scope is repeatable and the scopes are ORed, so --scope failed --scope
|
|
294
|
-
running is "either". The ID column is what ci job log takes.
|
|
295
|
-
|
|
296
|
-
EXAMPLES
|
|
297
|
-
$ simply gitlab ci job list --project group/project --scope failed --limit 10
|
|
298
|
-
|
|
299
|
-
$ simply gitlab ci job list --project group/project --scope running --scope pending
|
|
300
|
-
|
|
301
|
-
FLAG DESCRIPTIONS
|
|
302
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
303
|
-
|
|
304
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
305
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
_See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/list.js)_
|
|
309
|
-
|
|
310
|
-
## `simply gitlab ci job log`
|
|
311
|
-
|
|
312
|
-
Print a job log.
|
|
313
|
-
|
|
314
|
-
```
|
|
315
|
-
USAGE
|
|
316
|
-
$ simply gitlab ci job log -p <value> --job <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
317
|
-
<value>] [--tail <value>]
|
|
318
|
-
|
|
319
|
-
FLAGS
|
|
320
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
321
|
-
--job=<value> (required) Job id, as listed by ci job list.
|
|
322
|
-
--tail=<value> [default: 200] Print only the last N lines. 0 prints the whole trace.
|
|
323
|
-
|
|
324
|
-
CONNECTION FLAGS
|
|
325
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
326
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
327
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
328
|
-
|
|
329
|
-
GLOBAL FLAGS
|
|
330
|
-
--json Format output as json.
|
|
331
|
-
|
|
332
|
-
DESCRIPTION
|
|
333
|
-
Print a job log.
|
|
334
|
-
|
|
335
|
-
A job trace regularly runs to tens of megabytes, and what matters about a failed job is at the end, so only the last
|
|
336
|
-
200 lines are printed. --tail changes that number and --tail 0 prints the whole thing.
|
|
337
|
-
|
|
338
|
-
The trace is written by whatever the job ran, which means it is arbitrary text from an untrusted source. Control
|
|
339
|
-
characters are stripped before it is printed, so the coloured output a runner emits arrives here plain.
|
|
340
|
-
|
|
341
|
-
EXAMPLES
|
|
342
|
-
$ simply gitlab ci job log --project group/project --job 12345
|
|
343
|
-
|
|
344
|
-
$ simply gitlab ci job log --project group/project --job 12345 --tail 0
|
|
345
|
-
|
|
346
|
-
FLAG DESCRIPTIONS
|
|
347
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
348
|
-
|
|
349
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
350
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
_See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/log.js)_
|
|
354
|
-
|
|
355
|
-
## `simply gitlab ci variable list`
|
|
356
|
-
|
|
357
|
-
List a project CI/CD variables.
|
|
358
|
-
|
|
359
|
-
```
|
|
360
|
-
USAGE
|
|
361
|
-
$ simply gitlab ci variable list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
362
|
-
<value>] [--reveal]
|
|
363
|
-
|
|
364
|
-
FLAGS
|
|
365
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
366
|
-
--limit=<value> [default: 50] Maximum number of variables to return across all pages.
|
|
367
|
-
--reveal Print the variable values in clear text.
|
|
368
|
-
|
|
369
|
-
CONNECTION FLAGS
|
|
370
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
371
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
372
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
373
|
-
|
|
374
|
-
GLOBAL FLAGS
|
|
375
|
-
--json Format output as json.
|
|
376
|
-
|
|
377
|
-
DESCRIPTION
|
|
378
|
-
List a project CI/CD variables.
|
|
379
|
-
|
|
380
|
-
Variable values are hidden by default, including under --json. GitLab returns every value in clear text on this
|
|
381
|
-
endpoint — the "masked" attribute only hides a value in job logs, not from the API — and those values are deploy keys
|
|
382
|
-
and production credentials.
|
|
383
|
-
|
|
384
|
-
Pass --reveal to print them. Doing so puts live secrets on stdout, into your shell history if you redirect it, and
|
|
385
|
-
into the context of anything reading this output, so it is a deliberate step rather than the default.
|
|
386
|
-
|
|
387
|
-
EXAMPLES
|
|
388
|
-
$ simply gitlab ci variable list --project group/project
|
|
389
|
-
|
|
390
|
-
$ simply gitlab ci variable list --project group/project --reveal
|
|
391
|
-
|
|
392
|
-
FLAG DESCRIPTIONS
|
|
393
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
394
|
-
|
|
395
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
396
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
397
|
-
|
|
398
|
-
--reveal Print the variable values in clear text.
|
|
399
|
-
|
|
400
|
-
Off by default. Every value on this endpoint is a live secret, so revealing them is worth a moment of thought about
|
|
401
|
-
where this output is going.
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
_See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/variable/list.js)_
|
|
405
|
-
|
|
406
|
-
## `simply gitlab commit create`
|
|
407
|
-
|
|
408
|
-
Commit several file changes at once.
|
|
409
|
-
|
|
410
|
-
```
|
|
411
|
-
USAGE
|
|
412
|
-
$ simply gitlab commit create -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
413
|
-
[--dry-run] [--branch <value>] [--message <value>] [--actions <value>] [--start-branch <value>] [--start-sha
|
|
414
|
-
<value>] [--author-email <value>] [--author-name <value>] [--force] [--body <value> | --body-file <value>]
|
|
415
|
-
|
|
416
|
-
FLAGS
|
|
417
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
418
|
-
group/subgroup/project.
|
|
419
|
-
--actions=<value> JSON array of file actions.
|
|
420
|
-
--author-email=<value> Commit author email.
|
|
421
|
-
--author-name=<value> Commit author name.
|
|
422
|
-
--body=<value> Raw JSON request body.
|
|
423
|
-
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
424
|
-
--branch=<value> Branch to commit to.
|
|
425
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
426
|
-
--force Overwrite the branch with the new commit.
|
|
427
|
-
--message=<value> Commit message.
|
|
428
|
-
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
429
|
-
--start-sha=<value> Commit SHA to start the new commit from.
|
|
430
|
-
|
|
431
|
-
CONNECTION FLAGS
|
|
432
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
433
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
434
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
435
|
-
|
|
436
|
-
GLOBAL FLAGS
|
|
437
|
-
--json Format output as json.
|
|
438
|
-
|
|
439
|
-
DESCRIPTION
|
|
440
|
-
Commit several file changes at once.
|
|
441
|
-
|
|
442
|
-
Sends one commit containing a batch of actions — create, update, delete, move, chmod — which is how GitLab writes more
|
|
443
|
-
than one file atomically. The actions are JSON, supplied with --actions or inside a --body-file, because there is no
|
|
444
|
-
readable flag form for a list of file operations.
|
|
445
|
-
|
|
446
|
-
Each action is an object with an "action" and a "file_path"; create and update also need "content", move needs
|
|
447
|
-
"previous_path", and chmod needs "execute_filemode". Those rules are checked before anything is sent, so a bad entry
|
|
448
|
-
names its own index.
|
|
449
|
-
|
|
450
|
-
Use --dry-run to see exactly what would be sent.
|
|
451
|
-
|
|
452
|
-
EXAMPLES
|
|
453
|
-
$ simply gitlab commit create --project group/project --branch main --message "chore: tidy" --actions '[{"action":"delete","file_path":"old.txt"}]'
|
|
454
|
-
|
|
455
|
-
$ simply gitlab commit create --project group/project --branch main --message "feat: batch" --body-file ./commit.json --dry-run
|
|
456
|
-
|
|
457
|
-
FLAG DESCRIPTIONS
|
|
458
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
459
|
-
|
|
460
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
461
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
_See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/create.js)_
|
|
465
|
-
|
|
466
|
-
## `simply gitlab commit diff`
|
|
467
|
-
|
|
468
|
-
Show the changes a commit made.
|
|
469
|
-
|
|
470
|
-
```
|
|
471
|
-
USAGE
|
|
472
|
-
$ simply gitlab commit diff -p <value> --sha <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
473
|
-
<value>] [--stat]
|
|
474
|
-
|
|
475
|
-
FLAGS
|
|
476
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
477
|
-
--sha=<value> (required) Commit SHA, or the name of a branch or tag.
|
|
478
|
-
--stat List the changed files without printing the hunks.
|
|
479
|
-
|
|
480
|
-
CONNECTION FLAGS
|
|
481
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
482
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
483
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
484
|
-
|
|
485
|
-
GLOBAL FLAGS
|
|
486
|
-
--json Format output as json.
|
|
487
|
-
|
|
488
|
-
DESCRIPTION
|
|
489
|
-
Show the changes a commit made.
|
|
490
|
-
|
|
491
|
-
Prints the unified diff for each file the commit touched. GitLab truncates very large diffs server-side and says so in
|
|
492
|
-
the payload, so --stat is worth reaching for first on a big commit: it lists the files without any hunks.
|
|
493
|
-
|
|
494
|
-
EXAMPLES
|
|
495
|
-
$ simply gitlab commit diff --project group/project --sha 9a1b2c3
|
|
496
|
-
|
|
497
|
-
$ simply gitlab commit diff --project group/project --sha 9a1b2c3 --stat
|
|
498
|
-
|
|
499
|
-
FLAG DESCRIPTIONS
|
|
500
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
501
|
-
|
|
502
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
503
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
_See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/diff.js)_
|
|
507
|
-
|
|
508
|
-
## `simply gitlab commit list`
|
|
509
|
-
|
|
510
|
-
List repository commits.
|
|
511
|
-
|
|
512
|
-
```
|
|
513
|
-
USAGE
|
|
514
|
-
$ simply gitlab commit list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
515
|
-
<value>] [--ref <value>] [--path <value>] [--since <value>] [--until <value>] [--author <value>] [--stats]
|
|
516
|
-
|
|
517
|
-
FLAGS
|
|
518
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
519
|
-
--author=<value> Only commits by this author name or email.
|
|
520
|
-
--limit=<value> [default: 20] Maximum number of commits to return across all pages.
|
|
521
|
-
--path=<value> Only commits that touched this file or directory.
|
|
522
|
-
--ref=<value> Branch, tag, or SHA to list from. Defaults to the default branch.
|
|
523
|
-
--since=<value> Only commits on or after this ISO 8601 timestamp.
|
|
524
|
-
--stats Include per-commit line counts in the JSON payload.
|
|
525
|
-
--until=<value> Only commits on or before this ISO 8601 timestamp.
|
|
526
|
-
|
|
527
|
-
CONNECTION FLAGS
|
|
528
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
529
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
530
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
531
|
-
|
|
532
|
-
GLOBAL FLAGS
|
|
533
|
-
--json Format output as json.
|
|
534
|
-
|
|
535
|
-
DESCRIPTION
|
|
536
|
-
List repository commits.
|
|
537
|
-
|
|
538
|
-
Walks the history of a ref, newest first. --path narrows to commits that touched one file or directory, which is the
|
|
539
|
-
fastest way to answer "when did this change and who changed it".
|
|
540
|
-
|
|
541
|
-
--since and --until take ISO 8601 timestamps (2026-01-31T00:00:00Z); a bare date works too.
|
|
542
|
-
|
|
543
|
-
EXAMPLES
|
|
544
|
-
$ simply gitlab commit list --project group/project --ref main --limit 10
|
|
545
|
-
|
|
546
|
-
$ simply gitlab commit list --project group/project --path src/index.ts
|
|
547
|
-
|
|
548
|
-
$ simply gitlab commit list --project group/project --since 2026-01-01 --until 2026-02-01
|
|
549
|
-
|
|
550
|
-
FLAG DESCRIPTIONS
|
|
551
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
552
|
-
|
|
553
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
554
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
_See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/list.js)_
|
|
558
|
-
|
|
559
|
-
## `simply gitlab commit view`
|
|
560
|
-
|
|
561
|
-
Show one commit.
|
|
562
|
-
|
|
563
|
-
```
|
|
564
|
-
USAGE
|
|
565
|
-
$ simply gitlab commit view -p <value> --sha <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
566
|
-
<value>]
|
|
567
|
-
|
|
568
|
-
FLAGS
|
|
569
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
570
|
-
--sha=<value> (required) Commit SHA, or the name of a branch or tag.
|
|
571
|
-
|
|
572
|
-
CONNECTION FLAGS
|
|
573
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
574
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
575
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
576
|
-
|
|
577
|
-
GLOBAL FLAGS
|
|
578
|
-
--json Format output as json.
|
|
579
|
-
|
|
580
|
-
DESCRIPTION
|
|
581
|
-
Show one commit.
|
|
582
|
-
|
|
583
|
-
Accepts a full or short SHA, or the name of a branch or tag — in which case the commit at its tip is shown, so the
|
|
584
|
-
answer changes as the branch moves. Use commit diff for the changes themselves.
|
|
585
|
-
|
|
586
|
-
EXAMPLES
|
|
587
|
-
$ simply gitlab commit view --project group/project --sha 9a1b2c3
|
|
588
|
-
|
|
589
|
-
$ simply gitlab commit view --project group/project --sha main --json
|
|
590
|
-
|
|
591
|
-
FLAG DESCRIPTIONS
|
|
592
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
593
|
-
|
|
594
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
595
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
596
|
-
```
|
|
597
|
-
|
|
598
|
-
_See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/view.js)_
|
|
599
|
-
|
|
600
|
-
## `simply gitlab file create`
|
|
601
|
-
|
|
602
|
-
Create a file in a repository.
|
|
603
|
-
|
|
604
|
-
```
|
|
605
|
-
USAGE
|
|
606
|
-
$ simply gitlab file create -p <value> --path <value> --branch <value> --message <value> [--json] [-e <value>]
|
|
607
|
-
[--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--content <value> | --content-file <value>]
|
|
608
|
-
[--start-branch <value>] [--author-email <value>] [--author-name <value>]
|
|
609
|
-
|
|
610
|
-
FLAGS
|
|
611
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
612
|
-
group/subgroup/project.
|
|
613
|
-
--author-email=<value> Commit author email.
|
|
614
|
-
--author-name=<value> Commit author name.
|
|
615
|
-
--branch=<value> (required) Branch to commit to.
|
|
616
|
-
--content=<value> File contents.
|
|
617
|
-
--content-file=<value> Path to a local file holding the contents.
|
|
618
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
619
|
-
--message=<value> (required) Commit message.
|
|
620
|
-
--path=<value> (required) Path the file will have in the repository.
|
|
621
|
-
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
622
|
-
|
|
623
|
-
CONNECTION FLAGS
|
|
624
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
625
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
626
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
627
|
-
|
|
628
|
-
GLOBAL FLAGS
|
|
629
|
-
--json Format output as json.
|
|
630
|
-
|
|
631
|
-
DESCRIPTION
|
|
632
|
-
Create a file in a repository.
|
|
633
|
-
|
|
634
|
-
Commits one new file to a branch. GitLab refuses the request if the file already exists — use file update for that —
|
|
635
|
-
and refuses it if the branch is protected and the token lacks the role to push to it. Use --dry-run to see exactly
|
|
636
|
-
what would be sent.
|
|
637
|
-
|
|
638
|
-
EXAMPLES
|
|
639
|
-
$ simply gitlab file create --project group/project --path docs/new.md --branch main --content-file ./new.md --message "docs: add page"
|
|
640
|
-
|
|
641
|
-
$ simply gitlab file create --project group/project --path src/config.json --branch feature --content-file ./config.json --message "feat: add config" --dry-run
|
|
642
|
-
|
|
643
|
-
FLAG DESCRIPTIONS
|
|
644
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
645
|
-
|
|
646
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
647
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
_See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/create.js)_
|
|
651
|
-
|
|
652
|
-
## `simply gitlab file update`
|
|
653
|
-
|
|
654
|
-
Replace a file in a repository.
|
|
655
|
-
|
|
656
|
-
```
|
|
657
|
-
USAGE
|
|
658
|
-
$ simply gitlab file update -p <value> --path <value> --branch <value> --message <value> [--json] [-e <value>]
|
|
659
|
-
[--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--content <value> | --content-file <value>]
|
|
660
|
-
[--start-branch <value>] [--last-commit-id <value>] [--author-email <value>] [--author-name <value>]
|
|
661
|
-
|
|
662
|
-
FLAGS
|
|
663
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
664
|
-
group/subgroup/project.
|
|
665
|
-
--author-email=<value> Commit author email.
|
|
666
|
-
--author-name=<value> Commit author name.
|
|
667
|
-
--branch=<value> (required) Branch to commit to.
|
|
668
|
-
--content=<value> New file contents.
|
|
669
|
-
--content-file=<value> Path to a local file holding the new contents.
|
|
670
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
671
|
-
--last-commit-id=<value> Reject the write if the file changed since this commit.
|
|
672
|
-
--message=<value> (required) Commit message.
|
|
673
|
-
--path=<value> (required) Path to the file within the repository.
|
|
674
|
-
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
675
|
-
|
|
676
|
-
CONNECTION FLAGS
|
|
677
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
678
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
679
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
680
|
-
|
|
681
|
-
GLOBAL FLAGS
|
|
682
|
-
--json Format output as json.
|
|
683
|
-
|
|
684
|
-
DESCRIPTION
|
|
685
|
-
Replace a file in a repository.
|
|
686
|
-
|
|
687
|
-
Commits new contents over an existing file. The whole file is replaced; there is no partial edit. Pass
|
|
688
|
-
--last-commit-id with the value file view reported to have GitLab reject the write if someone else changed the file
|
|
689
|
-
meanwhile, instead of silently overwriting them.
|
|
690
|
-
|
|
691
|
-
EXAMPLES
|
|
692
|
-
$ simply gitlab file update --project group/project --path README.md --branch main --content-file ./README.md --message "docs: refresh readme"
|
|
693
|
-
|
|
694
|
-
$ simply gitlab file update --project group/project --path README.md --branch main --content-file ./README.md --message "docs: refresh" --last-commit-id 9a1b2c3
|
|
695
|
-
|
|
696
|
-
FLAG DESCRIPTIONS
|
|
697
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
698
|
-
|
|
699
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
700
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
701
|
-
```
|
|
702
|
-
|
|
703
|
-
_See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/update.js)_
|
|
704
|
-
|
|
705
|
-
## `simply gitlab file view`
|
|
706
|
-
|
|
707
|
-
Print a file from a repository.
|
|
708
|
-
|
|
709
|
-
```
|
|
710
|
-
USAGE
|
|
711
|
-
$ simply gitlab file view -p <value> --path <value> --ref <value> [--json] [-e <value>] [--gitlab-url <value>]
|
|
712
|
-
[--gitlab-token <value>] [--raw]
|
|
713
|
-
|
|
714
|
-
FLAGS
|
|
715
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
716
|
-
--path=<value> (required) Path to the file within the repository.
|
|
717
|
-
--raw Print only the file contents, with no metadata header.
|
|
718
|
-
--ref=<value> (required) Branch, tag, or commit SHA to read from.
|
|
719
|
-
|
|
720
|
-
CONNECTION FLAGS
|
|
721
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
722
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
723
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
724
|
-
|
|
725
|
-
GLOBAL FLAGS
|
|
726
|
-
--json Format output as json.
|
|
727
|
-
|
|
728
|
-
DESCRIPTION
|
|
729
|
-
Print a file from a repository.
|
|
730
|
-
|
|
731
|
-
Reads one file at a ref and writes its decoded contents to stdout, under a short metadata header. Use --raw for the
|
|
732
|
-
contents alone, or --json for the API payload, whose "content" is base64 exactly as GitLab sends it.
|
|
733
|
-
|
|
734
|
-
A binary file is not printed: its bytes would emit escape sequences to a terminal and noise to whatever reads this
|
|
735
|
-
stream. The metadata still is, so you can see what was found.
|
|
736
|
-
|
|
737
|
-
EXAMPLES
|
|
738
|
-
$ simply gitlab file view --project group/project --path src/index.ts --ref main
|
|
739
|
-
|
|
740
|
-
$ simply gitlab file view --project group/project --path README.md --ref v1.2.0 --raw
|
|
741
|
-
|
|
742
|
-
FLAG DESCRIPTIONS
|
|
743
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
744
|
-
|
|
745
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
746
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
747
|
-
```
|
|
748
|
-
|
|
749
|
-
_See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/view.js)_
|
|
750
|
-
|
|
751
|
-
## `simply gitlab mr create`
|
|
752
|
-
|
|
753
|
-
Open a merge request.
|
|
754
|
-
|
|
755
|
-
```
|
|
756
|
-
USAGE
|
|
757
|
-
$ simply gitlab mr create -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
758
|
-
[--dry-run] [--source-branch <value>] [--target-branch <value>] [--title <value>] [--description <value>] [--draft]
|
|
759
|
-
[--squash] [--remove-source-branch] [--assignee-id <value>...] [--reviewer-id <value>...] [--labels <value>]
|
|
760
|
-
[--milestone-id <value>] [--body <value> | --body-file <value>]
|
|
761
|
-
|
|
762
|
-
FLAGS
|
|
763
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
764
|
-
group/subgroup/project.
|
|
765
|
-
--assignee-id=<value>... User id to assign. Repeatable.
|
|
766
|
-
--body=<value> Raw JSON request body.
|
|
767
|
-
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
768
|
-
--description=<value> Merge request description, as Markdown.
|
|
769
|
-
--draft Open it as a draft.
|
|
770
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
771
|
-
--labels=<value> Comma-separated labels to apply.
|
|
772
|
-
--milestone-id=<value> Milestone id to attach.
|
|
773
|
-
--remove-source-branch Delete the source branch on merge.
|
|
774
|
-
--reviewer-id=<value>... User id to request review from. Repeatable.
|
|
775
|
-
--source-branch=<value> Branch holding the changes.
|
|
776
|
-
--squash Squash the commits when it merges.
|
|
777
|
-
--target-branch=<value> Branch the changes are proposed for.
|
|
778
|
-
--title=<value> Merge request title.
|
|
779
|
-
|
|
780
|
-
CONNECTION FLAGS
|
|
781
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
782
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
783
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
784
|
-
|
|
785
|
-
GLOBAL FLAGS
|
|
786
|
-
--json Format output as json.
|
|
787
|
-
|
|
788
|
-
DESCRIPTION
|
|
789
|
-
Open a merge request.
|
|
790
|
-
|
|
791
|
-
Both branches must already exist on the project. --draft prefixes the title with "Draft: ", which is how GitLab itself
|
|
792
|
-
marks a draft; there is no separate field for it.
|
|
793
|
-
|
|
794
|
-
Assignees and reviewers are numeric user ids, not usernames — GitLab accepts only ids here. --body or --body-file
|
|
795
|
-
supplies raw JSON for anything the flags do not cover, such as approval rules. Use --dry-run to see exactly what would
|
|
796
|
-
be sent.
|
|
797
|
-
|
|
798
|
-
EXAMPLES
|
|
799
|
-
$ simply gitlab mr create --project group/project --source-branch feature --target-branch main --title "feat: the thing"
|
|
800
|
-
|
|
801
|
-
$ simply gitlab mr create --project group/project --source-branch feature --target-branch main --title wip --draft --squash
|
|
802
|
-
|
|
803
|
-
FLAG DESCRIPTIONS
|
|
804
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
805
|
-
|
|
806
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
807
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
808
|
-
```
|
|
809
|
-
|
|
810
|
-
_See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/create.js)_
|
|
811
|
-
|
|
812
|
-
## `simply gitlab mr list`
|
|
813
|
-
|
|
814
|
-
List merge requests for a project.
|
|
815
|
-
|
|
816
|
-
```
|
|
817
|
-
USAGE
|
|
818
|
-
$ simply gitlab mr list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
819
|
-
<value>] [--state opened|closed|locked|merged|all] [--source-branch <value>] [--target-branch <value>]
|
|
820
|
-
[--author-username <value>] [--reviewer-username <value>] [--labels <value>] [--search <value>]
|
|
821
|
-
|
|
822
|
-
FLAGS
|
|
823
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
824
|
-
group/subgroup/project.
|
|
825
|
-
--author-username=<value> Only merge requests opened by this username.
|
|
826
|
-
--labels=<value> Comma-separated labels every result must carry.
|
|
827
|
-
--limit=<value> [default: 20] Maximum number of merge requests to return across all pages.
|
|
828
|
-
--reviewer-username=<value> Only merge requests this username is reviewing.
|
|
829
|
-
--search=<value> Match against the title and description.
|
|
830
|
-
--source-branch=<value> Only merge requests from this source branch.
|
|
831
|
-
--state=<option> [default: opened] Merge request state to return.
|
|
832
|
-
<options: opened|closed|locked|merged|all>
|
|
833
|
-
--target-branch=<value> Only merge requests into this target branch.
|
|
834
|
-
|
|
835
|
-
CONNECTION FLAGS
|
|
836
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
837
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
838
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
839
|
-
|
|
840
|
-
GLOBAL FLAGS
|
|
841
|
-
--json Format output as json.
|
|
842
|
-
|
|
843
|
-
DESCRIPTION
|
|
844
|
-
List merge requests for a project.
|
|
845
|
-
|
|
846
|
-
Defaults to open merge requests, which is what a list is nearly always for; pass --state all to include closed and
|
|
847
|
-
merged ones. The IID column is the number to pass to the other mr commands — it is per-project, and is not the "id"
|
|
848
|
-
field in the JSON payload.
|
|
849
|
-
|
|
850
|
-
EXAMPLES
|
|
851
|
-
$ simply gitlab mr list --project group/project
|
|
852
|
-
|
|
853
|
-
$ simply gitlab mr list --project group/project --state merged --target-branch main --limit 10
|
|
854
|
-
|
|
855
|
-
$ simply gitlab mr list --project group/project --author-username someone --json
|
|
856
|
-
|
|
857
|
-
FLAG DESCRIPTIONS
|
|
858
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
859
|
-
|
|
860
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
861
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
862
|
-
```
|
|
863
|
-
|
|
864
|
-
_See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/list.js)_
|
|
865
|
-
|
|
866
|
-
## `simply gitlab mr update`
|
|
867
|
-
|
|
868
|
-
Change an existing merge request.
|
|
869
|
-
|
|
870
|
-
```
|
|
871
|
-
USAGE
|
|
872
|
-
$ simply gitlab mr update -p <value> --mr <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
873
|
-
<value>] [--dry-run] [--title <value>] [--description <value>] [--target-branch <value>] [--state close|reopen]
|
|
874
|
-
[--squash] [--remove-source-branch] [--assignee-id <value>...] [--reviewer-id <value>...] [--labels <value>]
|
|
875
|
-
[--milestone-id <value>] [--body <value> | --body-file <value>]
|
|
876
|
-
|
|
877
|
-
FLAGS
|
|
878
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
879
|
-
group/subgroup/project.
|
|
880
|
-
--assignee-id=<value>... User id to assign, replacing the set. Repeatable.
|
|
881
|
-
--body=<value> Raw JSON request body.
|
|
882
|
-
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
883
|
-
--description=<value> New description, as Markdown.
|
|
884
|
-
--dry-run Print the request that would be sent and exit without sending it.
|
|
885
|
-
--labels=<value> Comma-separated labels, replacing the existing set.
|
|
886
|
-
--milestone-id=<value> Milestone id to attach.
|
|
887
|
-
--mr=<value> (required) Merge request iid.
|
|
888
|
-
--[no-]remove-source-branch Delete the source branch on merge.
|
|
889
|
-
--reviewer-id=<value>... User id to review, replacing the set. Repeatable.
|
|
890
|
-
--[no-]squash Squash the commits when it merges.
|
|
891
|
-
--state=<option> Close or reopen the merge request.
|
|
892
|
-
<options: close|reopen>
|
|
893
|
-
--target-branch=<value> New target branch.
|
|
894
|
-
--title=<value> New title.
|
|
895
|
-
|
|
896
|
-
CONNECTION FLAGS
|
|
897
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
898
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
899
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
900
|
-
|
|
901
|
-
GLOBAL FLAGS
|
|
902
|
-
--json Format output as json.
|
|
903
|
-
|
|
904
|
-
DESCRIPTION
|
|
905
|
-
Change an existing merge request.
|
|
906
|
-
|
|
907
|
-
Only the attributes you name are changed, with one exception worth knowing: --labels replaces the whole label set
|
|
908
|
-
rather than adding to it.
|
|
909
|
-
|
|
910
|
-
Naming nothing to change is refused rather than sent, because GitLab answers an empty update with a cheerful 200 and
|
|
911
|
-
an unchanged merge request. --state close and --state reopen do what the buttons of those names do; neither merges
|
|
912
|
-
anything.
|
|
913
|
-
|
|
914
|
-
EXAMPLES
|
|
915
|
-
$ simply gitlab mr update --project group/project --mr 42 --title "feat: renamed"
|
|
916
|
-
|
|
917
|
-
$ simply gitlab mr update --project group/project --mr 42 --state close
|
|
918
|
-
|
|
919
|
-
$ simply gitlab mr update --project group/project --mr 42 --labels backend,urgent --dry-run
|
|
920
|
-
|
|
921
|
-
FLAG DESCRIPTIONS
|
|
922
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
923
|
-
|
|
924
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
925
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
926
|
-
```
|
|
927
|
-
|
|
928
|
-
_See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/update.js)_
|
|
929
|
-
|
|
930
|
-
## `simply gitlab mr view`
|
|
931
|
-
|
|
932
|
-
Show one merge request.
|
|
933
|
-
|
|
934
|
-
```
|
|
935
|
-
USAGE
|
|
936
|
-
$ simply gitlab mr view -p <value> --mr <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
937
|
-
<value>]
|
|
938
|
-
|
|
939
|
-
FLAGS
|
|
940
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
941
|
-
--mr=<value> (required) Merge request iid.
|
|
942
|
-
|
|
943
|
-
CONNECTION FLAGS
|
|
944
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
945
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
946
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
947
|
-
|
|
948
|
-
GLOBAL FLAGS
|
|
949
|
-
--json Format output as json.
|
|
950
|
-
|
|
951
|
-
DESCRIPTION
|
|
952
|
-
Show one merge request.
|
|
953
|
-
|
|
954
|
-
Takes the project-scoped iid — the number in the merge request URL — not the instance-wide id. Use --json for the full
|
|
955
|
-
payload, which carries the pipeline status, approvals, and diff refs the summary below leaves out.
|
|
956
|
-
|
|
957
|
-
EXAMPLES
|
|
958
|
-
$ simply gitlab mr view --project group/project --mr 42
|
|
959
|
-
|
|
960
|
-
$ simply gitlab mr view --project group/project --mr 42 --json
|
|
961
|
-
|
|
962
|
-
FLAG DESCRIPTIONS
|
|
963
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
964
|
-
|
|
965
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
966
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
967
|
-
```
|
|
968
|
-
|
|
969
|
-
_See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/view.js)_
|
|
970
|
-
|
|
971
|
-
## `simply gitlab project list`
|
|
972
|
-
|
|
973
|
-
List projects you can see.
|
|
974
|
-
|
|
975
|
-
```
|
|
976
|
-
USAGE
|
|
977
|
-
$ simply gitlab project list [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit <value>]
|
|
978
|
-
[--search <value>] [--membership] [--owned] [--simple]
|
|
979
|
-
|
|
980
|
-
FLAGS
|
|
981
|
-
--limit=<value> [default: 20] Maximum number of projects to return across all pages.
|
|
982
|
-
--membership Only projects you are a member of.
|
|
983
|
-
--owned Only projects you own.
|
|
984
|
-
--search=<value> Match against the project name and path.
|
|
985
|
-
--simple Return only the core fields, for a much smaller payload.
|
|
986
|
-
|
|
987
|
-
CONNECTION FLAGS
|
|
988
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
989
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
990
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
991
|
-
|
|
992
|
-
GLOBAL FLAGS
|
|
993
|
-
--json Format output as json.
|
|
994
|
-
|
|
995
|
-
DESCRIPTION
|
|
996
|
-
List projects you can see.
|
|
997
|
-
|
|
998
|
-
Without --search this lists every project the token can reach, newest activity first, which on a large instance is not
|
|
999
|
-
a useful answer — narrow it with --search or --membership. Use --simple for a much smaller payload when you only need
|
|
1000
|
-
ids and paths.
|
|
1001
|
-
|
|
1002
|
-
EXAMPLES
|
|
1003
|
-
$ simply gitlab project list --membership
|
|
1004
|
-
|
|
1005
|
-
$ simply gitlab project list --search platform --limit 10
|
|
1006
|
-
|
|
1007
|
-
$ simply gitlab project list --search platform --simple --json
|
|
1008
|
-
|
|
1009
|
-
FLAG DESCRIPTIONS
|
|
1010
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1011
|
-
|
|
1012
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1013
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1014
|
-
```
|
|
1015
|
-
|
|
1016
|
-
_See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/project/list.js)_
|
|
1017
|
-
|
|
1018
|
-
## `simply gitlab project view`
|
|
1019
|
-
|
|
1020
|
-
Show one project.
|
|
1021
|
-
|
|
1022
|
-
```
|
|
1023
|
-
USAGE
|
|
1024
|
-
$ simply gitlab project view -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
1025
|
-
|
|
1026
|
-
FLAGS
|
|
1027
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1028
|
-
|
|
1029
|
-
CONNECTION FLAGS
|
|
1030
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1031
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1032
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1033
|
-
|
|
1034
|
-
GLOBAL FLAGS
|
|
1035
|
-
--json Format output as json.
|
|
1036
|
-
|
|
1037
|
-
DESCRIPTION
|
|
1038
|
-
Show one project.
|
|
1039
|
-
|
|
1040
|
-
Accepts either the numeric id or the full path. Use --json for the complete, unmodified API payload, which carries far
|
|
1041
|
-
more than the summary below — permissions, statistics, and every feature toggle on the project.
|
|
1042
|
-
|
|
1043
|
-
EXAMPLES
|
|
1044
|
-
$ simply gitlab project view --project group/project
|
|
1045
|
-
|
|
1046
|
-
$ simply gitlab project view --project 1234 --json
|
|
1047
|
-
|
|
1048
|
-
FLAG DESCRIPTIONS
|
|
1049
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1050
|
-
|
|
1051
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1052
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1053
|
-
```
|
|
1054
|
-
|
|
1055
|
-
_See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/project/view.js)_
|
|
1056
|
-
|
|
1057
|
-
## `simply gitlab release list`
|
|
1058
|
-
|
|
1059
|
-
List releases for a project.
|
|
1060
|
-
|
|
1061
|
-
```
|
|
1062
|
-
USAGE
|
|
1063
|
-
$ simply gitlab release list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
1064
|
-
<value>]
|
|
1065
|
-
|
|
1066
|
-
FLAGS
|
|
1067
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1068
|
-
--limit=<value> [default: 20] Maximum number of releases to return across all pages.
|
|
1069
|
-
|
|
1070
|
-
CONNECTION FLAGS
|
|
1071
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1072
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1073
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1074
|
-
|
|
1075
|
-
GLOBAL FLAGS
|
|
1076
|
-
--json Format output as json.
|
|
1077
|
-
|
|
1078
|
-
DESCRIPTION
|
|
1079
|
-
List releases for a project.
|
|
1080
|
-
|
|
1081
|
-
Releases are tags with notes and assets attached, so a project can have many tags and no releases at all. Use --json
|
|
1082
|
-
for the release notes, asset links, and the commit each release points at.
|
|
1083
|
-
|
|
1084
|
-
EXAMPLES
|
|
1085
|
-
$ simply gitlab release list --project group/project
|
|
1086
|
-
|
|
1087
|
-
$ simply gitlab release list --project group/project --limit 5 --json
|
|
1088
|
-
|
|
1089
|
-
FLAG DESCRIPTIONS
|
|
1090
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1091
|
-
|
|
1092
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1093
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1094
|
-
```
|
|
1095
|
-
|
|
1096
|
-
_See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/release/list.js)_
|
|
1097
|
-
|
|
1098
|
-
## `simply gitlab search`
|
|
1099
|
-
|
|
1100
|
-
Search GitLab.
|
|
1101
|
-
|
|
1102
|
-
```
|
|
1103
|
-
USAGE
|
|
1104
|
-
$ simply gitlab search --scope
|
|
1105
|
-
projects|issues|merge_requests|milestones|wiki_blobs|commits|blobs|notes|users|snippet_titles --query <value>
|
|
1106
|
-
[--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit <value>] [--project <value> | --group
|
|
1107
|
-
<value>]
|
|
1108
|
-
|
|
1109
|
-
FLAGS
|
|
1110
|
-
--group=<value> Search within this group id or path.
|
|
1111
|
-
--limit=<value> [default: 20] Maximum number of results to return across all pages.
|
|
1112
|
-
--project=<value> Search within this project id or path.
|
|
1113
|
-
--query=<value> (required) The search term.
|
|
1114
|
-
--scope=<option> (required) What to search.
|
|
1115
|
-
<options:
|
|
1116
|
-
projects|issues|merge_requests|milestones|wiki_blobs|commits|blobs|notes|users|snippet_titles>
|
|
1117
|
-
|
|
1118
|
-
CONNECTION FLAGS
|
|
1119
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1120
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1121
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1122
|
-
|
|
1123
|
-
GLOBAL FLAGS
|
|
1124
|
-
--json Format output as json.
|
|
1125
|
-
|
|
1126
|
-
DESCRIPTION
|
|
1127
|
-
Search GitLab.
|
|
1128
|
-
|
|
1129
|
-
Searches the whole instance by default, or one project with --project, or one group with --group. These are three
|
|
1130
|
-
different GitLab endpoints, and they do not accept the same scopes: projects and users are instance-wide only, while a
|
|
1131
|
-
project search can look at notes.
|
|
1132
|
-
|
|
1133
|
-
The blobs, commits, wiki_blobs, notes, and snippet_titles scopes need Advanced Search (Elasticsearch) enabled on the
|
|
1134
|
-
instance. Where it is not, GitLab answers with an empty list and a 200 rather than an error, so an empty result for
|
|
1135
|
-
one of those scopes is reported here as possibly meaning "not enabled" rather than "no matches".
|
|
1136
|
-
|
|
1137
|
-
EXAMPLES
|
|
1138
|
-
$ simply gitlab search --scope projects --query platform
|
|
1139
|
-
|
|
1140
|
-
$ simply gitlab search --scope blobs --query UMCN_Account --project group/project
|
|
1141
|
-
|
|
1142
|
-
$ simply gitlab search --scope merge_requests --query "flaky test" --group my-group --json
|
|
1143
|
-
|
|
1144
|
-
FLAG DESCRIPTIONS
|
|
1145
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1146
|
-
|
|
1147
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1148
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1149
|
-
```
|
|
1150
|
-
|
|
1151
|
-
_See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/search.js)_
|
|
1152
|
-
|
|
1153
|
-
## `simply gitlab tag list`
|
|
1154
|
-
|
|
1155
|
-
List repository tags.
|
|
1156
|
-
|
|
1157
|
-
```
|
|
1158
|
-
USAGE
|
|
1159
|
-
$ simply gitlab tag list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
1160
|
-
<value>] [--search <value>] [--order-by name|updated|version] [--sort asc|desc]
|
|
1161
|
-
|
|
1162
|
-
FLAGS
|
|
1163
|
-
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1164
|
-
--limit=<value> [default: 20] Maximum number of tags to return across all pages.
|
|
1165
|
-
--order-by=<option> Field to sort by.
|
|
1166
|
-
<options: name|updated|version>
|
|
1167
|
-
--search=<value> Return only tags whose name contains this term.
|
|
1168
|
-
--sort=<option> Sort direction.
|
|
1169
|
-
<options: asc|desc>
|
|
1170
|
-
|
|
1171
|
-
CONNECTION FLAGS
|
|
1172
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1173
|
-
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1174
|
-
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1175
|
-
|
|
1176
|
-
GLOBAL FLAGS
|
|
1177
|
-
--json Format output as json.
|
|
1178
|
-
|
|
1179
|
-
DESCRIPTION
|
|
1180
|
-
List repository tags.
|
|
1181
|
-
|
|
1182
|
-
Tags come back newest first by the commit date they point at. That is the commit date, not the tag creation date, so a
|
|
1183
|
-
tag cut today on an old commit sorts by the old commit — use --order-by name if you need a deterministic order
|
|
1184
|
-
instead.
|
|
1185
|
-
|
|
1186
|
-
EXAMPLES
|
|
1187
|
-
$ simply gitlab tag list --project group/project
|
|
1188
|
-
|
|
1189
|
-
$ simply gitlab tag list --project group/project --search v1. --limit 50
|
|
1190
|
-
|
|
1191
|
-
FLAG DESCRIPTIONS
|
|
1192
|
-
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1193
|
-
|
|
1194
|
-
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1195
|
-
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1196
|
-
```
|
|
1197
|
-
|
|
1198
|
-
_See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/tag/list.js)_
|
|
1199
|
-
<!-- commandsstop -->
|
|
1200
|
-
|
|
1201
|
-
## License
|
|
1202
|
-
|
|
1203
|
-
Apache-2.0.
|
|
1
|
+
# @simplysf/simply-gitlab
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/@simplysf/simply-gitlab) [](https://raw.githubusercontent.com/SimplySF/simply-gitlab/main/LICENSE.txt)
|
|
4
|
+
|
|
5
|
+
Command-line interface for working with GitLab, built by [SimplySF](https://github.com/SimplySF).
|
|
6
|
+
|
|
7
|
+
Covers projects, repository files, branches, tags, releases, commits and diffs, merge requests,
|
|
8
|
+
CI/CD jobs and their logs, CI variables, deployment environments, and search. Output is
|
|
9
|
+
human-readable by default and raw JSON with `--json`, and every command that changes data takes
|
|
10
|
+
`--dry-run`, so it is usable both at a terminal and by a script or agent. See
|
|
11
|
+
[Commands](#commands) below for the full reference.
|
|
12
|
+
|
|
13
|
+
The same capabilities are available to AI agents through
|
|
14
|
+
[`@simplysf/simply-gitlab-mcp`](https://github.com/SimplySF/simply-gitlab/tree/main/packages/simply-gitlab-mcp).
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @simplysf/simply-gitlab
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Issues
|
|
23
|
+
|
|
24
|
+
Please report any issues at https://github.com/SimplySF/simply-gitlab/issues
|
|
25
|
+
|
|
26
|
+
## Contributing
|
|
27
|
+
|
|
28
|
+
This package is part of the [`@simplysf/simply-gitlab`](https://github.com/SimplySF/simply-gitlab) monorepo. See the repo's [CONTRIBUTING.md](https://github.com/SimplySF/simply-gitlab/blob/main/CONTRIBUTING.md) for the repo structure, how to set up and build the project, our commit conventions, and how to submit a pull request. Please also read our [Code of Conduct](https://github.com/SimplySF/simply-gitlab/blob/main/CODE_OF_CONDUCT.md).
|
|
29
|
+
|
|
30
|
+
## Credentials
|
|
31
|
+
|
|
32
|
+
Connection settings come from environment variables, from flags, or from a `.env` file named with
|
|
33
|
+
`-e/--env-file`. Only GitLab connection variables are read from that file; anything else in it is
|
|
34
|
+
ignored.
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
GITLAB_URL=https://gitlab.example.com # omit for gitlab.com
|
|
38
|
+
GITLAB_TOKEN=glpat-...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The token is a personal, project, or group access token, created under **Preferences › Access
|
|
42
|
+
tokens**. `read_api` is enough for every read command; `api` is needed to write.
|
|
43
|
+
|
|
44
|
+
Explicit flags beat the environment, which beats the file's contents. Certificate verification is
|
|
45
|
+
always on: for an instance behind an internal or agency CA, trust that CA with
|
|
46
|
+
`NODE_EXTRA_CA_CERTS=/path/to/ca.pem` rather than disabling verification —
|
|
47
|
+
`GITLAB_SSL_VERIFY=false` is refused with an error rather than ignored.
|
|
48
|
+
|
|
49
|
+
`GITLAB_PROJECT` sets the default for `-p/--project`, so a shell in one repository's context need
|
|
50
|
+
not repeat it.
|
|
51
|
+
|
|
52
|
+
## Naming a project
|
|
53
|
+
|
|
54
|
+
Every project-scoped command takes `-p/--project`, which accepts either the numeric id or the full
|
|
55
|
+
path:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
simply gitlab mr list --project 1234
|
|
59
|
+
simply gitlab mr list --project group/subgroup/project
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The path is URL-encoded for you. Do not encode it yourself.
|
|
63
|
+
|
|
64
|
+
Merge requests are addressed by their project-scoped **iid** — the number in the web URL — not by the
|
|
65
|
+
instance-wide `id` that also appears in the API payload. Both are bare integers, and passing the
|
|
66
|
+
wrong one does not fail: it addresses a different merge request in a different project.
|
|
67
|
+
|
|
68
|
+
## Write safety
|
|
69
|
+
|
|
70
|
+
Six commands change data: `branch create`, `file create`, `file update`, `commit create`,
|
|
71
|
+
`mr create`, and `mr update`. Nothing here deletes anything.
|
|
72
|
+
|
|
73
|
+
**`--dry-run`** is on every one of them. It prints the exact request body that would be sent and
|
|
74
|
+
sends nothing, which is the cheapest way to check a command before running it for real.
|
|
75
|
+
|
|
76
|
+
**`GITLAB_READ_ONLY=1`** refuses every write before any request is made. It is a guardrail against
|
|
77
|
+
running against the wrong project or with the wrong credentials, not a security boundary — anyone
|
|
78
|
+
who can set the variable can unset it.
|
|
79
|
+
|
|
80
|
+
**A `read_api`-scoped token** is the boundary that actually binds, because GitLab enforces it
|
|
81
|
+
server-side. Use one whenever you only mean to read.
|
|
82
|
+
|
|
83
|
+
There is deliberately no `--confirm` flag. Every write here creates something or edits a merge
|
|
84
|
+
request, and both are recoverable; requiring a confirmation for those would train you to pass it
|
|
85
|
+
always, at which point it protects nothing while still implying that it does. The first command that
|
|
86
|
+
deletes something is the one that brings the flag back.
|
|
87
|
+
|
|
88
|
+
## Reading untrusted text
|
|
89
|
+
|
|
90
|
+
Merge request titles and descriptions, commit messages, repository file contents, and CI job traces
|
|
91
|
+
are all written by whoever can push to a project or open a merge request. Control characters are
|
|
92
|
+
stripped from them before anything is printed, so an escape sequence cannot make your terminal show
|
|
93
|
+
something other than what the API returned. Your token is redacted from every error message and
|
|
94
|
+
response body.
|
|
95
|
+
|
|
96
|
+
## Exit codes
|
|
97
|
+
|
|
98
|
+
| Code | Meaning |
|
|
99
|
+
| ---- | ---------------------------- |
|
|
100
|
+
| 0 | Success |
|
|
101
|
+
| 1 | Request or network failure |
|
|
102
|
+
| 2 | Configuration or usage error |
|
|
103
|
+
| 3 | Authentication or permission |
|
|
104
|
+
|
|
105
|
+
Under `--json`, a failure writes a single JSON object to **stderr** — `{"error":{name, message,
|
|
106
|
+
exitCode, status?, body?}}` — and nothing to stdout. Exit codes are identical with and without
|
|
107
|
+
`--json`.
|
|
108
|
+
|
|
109
|
+
<!-- commands -->
|
|
110
|
+
|
|
111
|
+
- [`simply gitlab branch create`](#simply-gitlab-branch-create)
|
|
112
|
+
- [`simply gitlab branch list`](#simply-gitlab-branch-list)
|
|
113
|
+
- [`simply gitlab ci environment list`](#simply-gitlab-ci-environment-list)
|
|
114
|
+
- [`simply gitlab ci job list`](#simply-gitlab-ci-job-list)
|
|
115
|
+
- [`simply gitlab ci job log`](#simply-gitlab-ci-job-log)
|
|
116
|
+
- [`simply gitlab ci variable list`](#simply-gitlab-ci-variable-list)
|
|
117
|
+
- [`simply gitlab commit create`](#simply-gitlab-commit-create)
|
|
118
|
+
- [`simply gitlab commit diff`](#simply-gitlab-commit-diff)
|
|
119
|
+
- [`simply gitlab commit list`](#simply-gitlab-commit-list)
|
|
120
|
+
- [`simply gitlab commit view`](#simply-gitlab-commit-view)
|
|
121
|
+
- [`simply gitlab file create`](#simply-gitlab-file-create)
|
|
122
|
+
- [`simply gitlab file update`](#simply-gitlab-file-update)
|
|
123
|
+
- [`simply gitlab file view`](#simply-gitlab-file-view)
|
|
124
|
+
- [`simply gitlab mr create`](#simply-gitlab-mr-create)
|
|
125
|
+
- [`simply gitlab mr list`](#simply-gitlab-mr-list)
|
|
126
|
+
- [`simply gitlab mr update`](#simply-gitlab-mr-update)
|
|
127
|
+
- [`simply gitlab mr view`](#simply-gitlab-mr-view)
|
|
128
|
+
- [`simply gitlab project list`](#simply-gitlab-project-list)
|
|
129
|
+
- [`simply gitlab project view`](#simply-gitlab-project-view)
|
|
130
|
+
- [`simply gitlab release list`](#simply-gitlab-release-list)
|
|
131
|
+
- [`simply gitlab search`](#simply-gitlab-search)
|
|
132
|
+
- [`simply gitlab tag list`](#simply-gitlab-tag-list)
|
|
133
|
+
|
|
134
|
+
## `simply gitlab branch create`
|
|
135
|
+
|
|
136
|
+
Create a branch.
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
USAGE
|
|
140
|
+
$ simply gitlab branch create -p <value> --branch <value> --ref <value> [--json] [-e <value>] [--gitlab-url <value>]
|
|
141
|
+
[--gitlab-token <value>] [--dry-run]
|
|
142
|
+
|
|
143
|
+
FLAGS
|
|
144
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
145
|
+
--branch=<value> (required) Name of the new branch.
|
|
146
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
147
|
+
--ref=<value> (required) Branch, tag, or commit SHA to branch from.
|
|
148
|
+
|
|
149
|
+
CONNECTION FLAGS
|
|
150
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
151
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
152
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
153
|
+
|
|
154
|
+
GLOBAL FLAGS
|
|
155
|
+
--json Format output as json.
|
|
156
|
+
|
|
157
|
+
DESCRIPTION
|
|
158
|
+
Create a branch.
|
|
159
|
+
|
|
160
|
+
Points a new branch at an existing branch, tag, or commit SHA. GitLab refuses a name that already exists rather than
|
|
161
|
+
moving it, so this can never rewrite a branch someone else is using.
|
|
162
|
+
|
|
163
|
+
EXAMPLES
|
|
164
|
+
$ simply gitlab branch create --project group/project --branch feature/thing --ref main
|
|
165
|
+
|
|
166
|
+
$ simply gitlab branch create --project group/project --branch hotfix --ref v1.2.0
|
|
167
|
+
|
|
168
|
+
FLAG DESCRIPTIONS
|
|
169
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
170
|
+
|
|
171
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
172
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
_See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/branch/create.js)_
|
|
176
|
+
|
|
177
|
+
## `simply gitlab branch list`
|
|
178
|
+
|
|
179
|
+
List repository branches.
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
USAGE
|
|
183
|
+
$ simply gitlab branch list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
184
|
+
<value>] [--search <value>]
|
|
185
|
+
|
|
186
|
+
FLAGS
|
|
187
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
188
|
+
--limit=<value> [default: 20] Maximum number of branches to return across all pages.
|
|
189
|
+
--search=<value> Return only branches whose name contains this term.
|
|
190
|
+
|
|
191
|
+
CONNECTION FLAGS
|
|
192
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
193
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
194
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
195
|
+
|
|
196
|
+
GLOBAL FLAGS
|
|
197
|
+
--json Format output as json.
|
|
198
|
+
|
|
199
|
+
DESCRIPTION
|
|
200
|
+
List repository branches.
|
|
201
|
+
|
|
202
|
+
Branches come back in GitLab order, which is alphabetical rather than by recency, so on a busy repository --search is
|
|
203
|
+
usually what you want. The MERGED column reflects whether the branch is merged into the default branch, not into
|
|
204
|
+
whatever you are working on.
|
|
205
|
+
|
|
206
|
+
EXAMPLES
|
|
207
|
+
$ simply gitlab branch list --project group/project
|
|
208
|
+
|
|
209
|
+
$ simply gitlab branch list --project group/project --search release --limit 50
|
|
210
|
+
|
|
211
|
+
FLAG DESCRIPTIONS
|
|
212
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
213
|
+
|
|
214
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
215
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
_See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/branch/list.js)_
|
|
219
|
+
|
|
220
|
+
## `simply gitlab ci environment list`
|
|
221
|
+
|
|
222
|
+
List a project deployment environments.
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
USAGE
|
|
226
|
+
$ simply gitlab ci environment list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
227
|
+
<value>] [--name <value>] [--search <value>] [--state available|stopped]
|
|
228
|
+
|
|
229
|
+
FLAGS
|
|
230
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
231
|
+
--limit=<value> [default: 20] Maximum number of environments to return across all pages.
|
|
232
|
+
--name=<value> Return the environment with exactly this name.
|
|
233
|
+
--search=<value> Return environments whose name contains this term.
|
|
234
|
+
--state=<option> Environment state.
|
|
235
|
+
<options: available|stopped>
|
|
236
|
+
|
|
237
|
+
CONNECTION FLAGS
|
|
238
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
239
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
240
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
241
|
+
|
|
242
|
+
GLOBAL FLAGS
|
|
243
|
+
--json Format output as json.
|
|
244
|
+
|
|
245
|
+
DESCRIPTION
|
|
246
|
+
List a project deployment environments.
|
|
247
|
+
|
|
248
|
+
Environments are what CI deploys to and what review apps create. Both available and stopped ones are listed; --state
|
|
249
|
+
narrows to one. Use --json for the last deployment on each, which is the field worth having when you are answering
|
|
250
|
+
"what is running where".
|
|
251
|
+
|
|
252
|
+
EXAMPLES
|
|
253
|
+
$ simply gitlab ci environment list --project group/project
|
|
254
|
+
|
|
255
|
+
$ simply gitlab ci environment list --project group/project --state available --search prod
|
|
256
|
+
|
|
257
|
+
FLAG DESCRIPTIONS
|
|
258
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
259
|
+
|
|
260
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
261
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
_See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/environment/list.js)_
|
|
265
|
+
|
|
266
|
+
## `simply gitlab ci job list`
|
|
267
|
+
|
|
268
|
+
List CI jobs for a project.
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
USAGE
|
|
272
|
+
$ simply gitlab ci job list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
273
|
+
<value>] [--scope created|pending|running|failed|success|canceled|skipped|waiting_for_resource|manual...]
|
|
274
|
+
|
|
275
|
+
FLAGS
|
|
276
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
277
|
+
--limit=<value> [default: 20] Maximum number of jobs to return across all pages.
|
|
278
|
+
--scope=<option>... Job states to include. Repeatable.
|
|
279
|
+
<options:
|
|
280
|
+
created|pending|running|failed|success|canceled|skipped|waiting_for_resource|manual>
|
|
281
|
+
|
|
282
|
+
CONNECTION FLAGS
|
|
283
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
284
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
285
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
286
|
+
|
|
287
|
+
GLOBAL FLAGS
|
|
288
|
+
--json Format output as json.
|
|
289
|
+
|
|
290
|
+
DESCRIPTION
|
|
291
|
+
List CI jobs for a project.
|
|
292
|
+
|
|
293
|
+
Jobs across every pipeline, newest first. --scope is repeatable and the scopes are ORed, so --scope failed --scope
|
|
294
|
+
running is "either". The ID column is what ci job log takes.
|
|
295
|
+
|
|
296
|
+
EXAMPLES
|
|
297
|
+
$ simply gitlab ci job list --project group/project --scope failed --limit 10
|
|
298
|
+
|
|
299
|
+
$ simply gitlab ci job list --project group/project --scope running --scope pending
|
|
300
|
+
|
|
301
|
+
FLAG DESCRIPTIONS
|
|
302
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
303
|
+
|
|
304
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
305
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
_See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/list.js)_
|
|
309
|
+
|
|
310
|
+
## `simply gitlab ci job log`
|
|
311
|
+
|
|
312
|
+
Print a job log.
|
|
313
|
+
|
|
314
|
+
```
|
|
315
|
+
USAGE
|
|
316
|
+
$ simply gitlab ci job log -p <value> --job <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
317
|
+
<value>] [--tail <value>]
|
|
318
|
+
|
|
319
|
+
FLAGS
|
|
320
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
321
|
+
--job=<value> (required) Job id, as listed by ci job list.
|
|
322
|
+
--tail=<value> [default: 200] Print only the last N lines. 0 prints the whole trace.
|
|
323
|
+
|
|
324
|
+
CONNECTION FLAGS
|
|
325
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
326
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
327
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
328
|
+
|
|
329
|
+
GLOBAL FLAGS
|
|
330
|
+
--json Format output as json.
|
|
331
|
+
|
|
332
|
+
DESCRIPTION
|
|
333
|
+
Print a job log.
|
|
334
|
+
|
|
335
|
+
A job trace regularly runs to tens of megabytes, and what matters about a failed job is at the end, so only the last
|
|
336
|
+
200 lines are printed. --tail changes that number and --tail 0 prints the whole thing.
|
|
337
|
+
|
|
338
|
+
The trace is written by whatever the job ran, which means it is arbitrary text from an untrusted source. Control
|
|
339
|
+
characters are stripped before it is printed, so the coloured output a runner emits arrives here plain.
|
|
340
|
+
|
|
341
|
+
EXAMPLES
|
|
342
|
+
$ simply gitlab ci job log --project group/project --job 12345
|
|
343
|
+
|
|
344
|
+
$ simply gitlab ci job log --project group/project --job 12345 --tail 0
|
|
345
|
+
|
|
346
|
+
FLAG DESCRIPTIONS
|
|
347
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
348
|
+
|
|
349
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
350
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
_See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/log.js)_
|
|
354
|
+
|
|
355
|
+
## `simply gitlab ci variable list`
|
|
356
|
+
|
|
357
|
+
List a project CI/CD variables.
|
|
358
|
+
|
|
359
|
+
```
|
|
360
|
+
USAGE
|
|
361
|
+
$ simply gitlab ci variable list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
362
|
+
<value>] [--reveal]
|
|
363
|
+
|
|
364
|
+
FLAGS
|
|
365
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
366
|
+
--limit=<value> [default: 50] Maximum number of variables to return across all pages.
|
|
367
|
+
--reveal Print the variable values in clear text.
|
|
368
|
+
|
|
369
|
+
CONNECTION FLAGS
|
|
370
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
371
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
372
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
373
|
+
|
|
374
|
+
GLOBAL FLAGS
|
|
375
|
+
--json Format output as json.
|
|
376
|
+
|
|
377
|
+
DESCRIPTION
|
|
378
|
+
List a project CI/CD variables.
|
|
379
|
+
|
|
380
|
+
Variable values are hidden by default, including under --json. GitLab returns every value in clear text on this
|
|
381
|
+
endpoint — the "masked" attribute only hides a value in job logs, not from the API — and those values are deploy keys
|
|
382
|
+
and production credentials.
|
|
383
|
+
|
|
384
|
+
Pass --reveal to print them. Doing so puts live secrets on stdout, into your shell history if you redirect it, and
|
|
385
|
+
into the context of anything reading this output, so it is a deliberate step rather than the default.
|
|
386
|
+
|
|
387
|
+
EXAMPLES
|
|
388
|
+
$ simply gitlab ci variable list --project group/project
|
|
389
|
+
|
|
390
|
+
$ simply gitlab ci variable list --project group/project --reveal
|
|
391
|
+
|
|
392
|
+
FLAG DESCRIPTIONS
|
|
393
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
394
|
+
|
|
395
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
396
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
397
|
+
|
|
398
|
+
--reveal Print the variable values in clear text.
|
|
399
|
+
|
|
400
|
+
Off by default. Every value on this endpoint is a live secret, so revealing them is worth a moment of thought about
|
|
401
|
+
where this output is going.
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
_See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/ci/variable/list.js)_
|
|
405
|
+
|
|
406
|
+
## `simply gitlab commit create`
|
|
407
|
+
|
|
408
|
+
Commit several file changes at once.
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
USAGE
|
|
412
|
+
$ simply gitlab commit create -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
413
|
+
[--dry-run] [--branch <value>] [--message <value>] [--actions <value>] [--start-branch <value>] [--start-sha
|
|
414
|
+
<value>] [--author-email <value>] [--author-name <value>] [--force] [--body <value> | --body-file <value>]
|
|
415
|
+
|
|
416
|
+
FLAGS
|
|
417
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
418
|
+
group/subgroup/project.
|
|
419
|
+
--actions=<value> JSON array of file actions.
|
|
420
|
+
--author-email=<value> Commit author email.
|
|
421
|
+
--author-name=<value> Commit author name.
|
|
422
|
+
--body=<value> Raw JSON request body.
|
|
423
|
+
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
424
|
+
--branch=<value> Branch to commit to.
|
|
425
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
426
|
+
--force Overwrite the branch with the new commit.
|
|
427
|
+
--message=<value> Commit message.
|
|
428
|
+
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
429
|
+
--start-sha=<value> Commit SHA to start the new commit from.
|
|
430
|
+
|
|
431
|
+
CONNECTION FLAGS
|
|
432
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
433
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
434
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
435
|
+
|
|
436
|
+
GLOBAL FLAGS
|
|
437
|
+
--json Format output as json.
|
|
438
|
+
|
|
439
|
+
DESCRIPTION
|
|
440
|
+
Commit several file changes at once.
|
|
441
|
+
|
|
442
|
+
Sends one commit containing a batch of actions — create, update, delete, move, chmod — which is how GitLab writes more
|
|
443
|
+
than one file atomically. The actions are JSON, supplied with --actions or inside a --body-file, because there is no
|
|
444
|
+
readable flag form for a list of file operations.
|
|
445
|
+
|
|
446
|
+
Each action is an object with an "action" and a "file_path"; create and update also need "content", move needs
|
|
447
|
+
"previous_path", and chmod needs "execute_filemode". Those rules are checked before anything is sent, so a bad entry
|
|
448
|
+
names its own index.
|
|
449
|
+
|
|
450
|
+
Use --dry-run to see exactly what would be sent.
|
|
451
|
+
|
|
452
|
+
EXAMPLES
|
|
453
|
+
$ simply gitlab commit create --project group/project --branch main --message "chore: tidy" --actions '[{"action":"delete","file_path":"old.txt"}]'
|
|
454
|
+
|
|
455
|
+
$ simply gitlab commit create --project group/project --branch main --message "feat: batch" --body-file ./commit.json --dry-run
|
|
456
|
+
|
|
457
|
+
FLAG DESCRIPTIONS
|
|
458
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
459
|
+
|
|
460
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
461
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
_See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/create.js)_
|
|
465
|
+
|
|
466
|
+
## `simply gitlab commit diff`
|
|
467
|
+
|
|
468
|
+
Show the changes a commit made.
|
|
469
|
+
|
|
470
|
+
```
|
|
471
|
+
USAGE
|
|
472
|
+
$ simply gitlab commit diff -p <value> --sha <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
473
|
+
<value>] [--stat]
|
|
474
|
+
|
|
475
|
+
FLAGS
|
|
476
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
477
|
+
--sha=<value> (required) Commit SHA, or the name of a branch or tag.
|
|
478
|
+
--stat List the changed files without printing the hunks.
|
|
479
|
+
|
|
480
|
+
CONNECTION FLAGS
|
|
481
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
482
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
483
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
484
|
+
|
|
485
|
+
GLOBAL FLAGS
|
|
486
|
+
--json Format output as json.
|
|
487
|
+
|
|
488
|
+
DESCRIPTION
|
|
489
|
+
Show the changes a commit made.
|
|
490
|
+
|
|
491
|
+
Prints the unified diff for each file the commit touched. GitLab truncates very large diffs server-side and says so in
|
|
492
|
+
the payload, so --stat is worth reaching for first on a big commit: it lists the files without any hunks.
|
|
493
|
+
|
|
494
|
+
EXAMPLES
|
|
495
|
+
$ simply gitlab commit diff --project group/project --sha 9a1b2c3
|
|
496
|
+
|
|
497
|
+
$ simply gitlab commit diff --project group/project --sha 9a1b2c3 --stat
|
|
498
|
+
|
|
499
|
+
FLAG DESCRIPTIONS
|
|
500
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
501
|
+
|
|
502
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
503
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
_See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/diff.js)_
|
|
507
|
+
|
|
508
|
+
## `simply gitlab commit list`
|
|
509
|
+
|
|
510
|
+
List repository commits.
|
|
511
|
+
|
|
512
|
+
```
|
|
513
|
+
USAGE
|
|
514
|
+
$ simply gitlab commit list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
515
|
+
<value>] [--ref <value>] [--path <value>] [--since <value>] [--until <value>] [--author <value>] [--stats]
|
|
516
|
+
|
|
517
|
+
FLAGS
|
|
518
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
519
|
+
--author=<value> Only commits by this author name or email.
|
|
520
|
+
--limit=<value> [default: 20] Maximum number of commits to return across all pages.
|
|
521
|
+
--path=<value> Only commits that touched this file or directory.
|
|
522
|
+
--ref=<value> Branch, tag, or SHA to list from. Defaults to the default branch.
|
|
523
|
+
--since=<value> Only commits on or after this ISO 8601 timestamp.
|
|
524
|
+
--stats Include per-commit line counts in the JSON payload.
|
|
525
|
+
--until=<value> Only commits on or before this ISO 8601 timestamp.
|
|
526
|
+
|
|
527
|
+
CONNECTION FLAGS
|
|
528
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
529
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
530
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
531
|
+
|
|
532
|
+
GLOBAL FLAGS
|
|
533
|
+
--json Format output as json.
|
|
534
|
+
|
|
535
|
+
DESCRIPTION
|
|
536
|
+
List repository commits.
|
|
537
|
+
|
|
538
|
+
Walks the history of a ref, newest first. --path narrows to commits that touched one file or directory, which is the
|
|
539
|
+
fastest way to answer "when did this change and who changed it".
|
|
540
|
+
|
|
541
|
+
--since and --until take ISO 8601 timestamps (2026-01-31T00:00:00Z); a bare date works too.
|
|
542
|
+
|
|
543
|
+
EXAMPLES
|
|
544
|
+
$ simply gitlab commit list --project group/project --ref main --limit 10
|
|
545
|
+
|
|
546
|
+
$ simply gitlab commit list --project group/project --path src/index.ts
|
|
547
|
+
|
|
548
|
+
$ simply gitlab commit list --project group/project --since 2026-01-01 --until 2026-02-01
|
|
549
|
+
|
|
550
|
+
FLAG DESCRIPTIONS
|
|
551
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
552
|
+
|
|
553
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
554
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
_See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/list.js)_
|
|
558
|
+
|
|
559
|
+
## `simply gitlab commit view`
|
|
560
|
+
|
|
561
|
+
Show one commit.
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
USAGE
|
|
565
|
+
$ simply gitlab commit view -p <value> --sha <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
566
|
+
<value>]
|
|
567
|
+
|
|
568
|
+
FLAGS
|
|
569
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
570
|
+
--sha=<value> (required) Commit SHA, or the name of a branch or tag.
|
|
571
|
+
|
|
572
|
+
CONNECTION FLAGS
|
|
573
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
574
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
575
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
576
|
+
|
|
577
|
+
GLOBAL FLAGS
|
|
578
|
+
--json Format output as json.
|
|
579
|
+
|
|
580
|
+
DESCRIPTION
|
|
581
|
+
Show one commit.
|
|
582
|
+
|
|
583
|
+
Accepts a full or short SHA, or the name of a branch or tag — in which case the commit at its tip is shown, so the
|
|
584
|
+
answer changes as the branch moves. Use commit diff for the changes themselves.
|
|
585
|
+
|
|
586
|
+
EXAMPLES
|
|
587
|
+
$ simply gitlab commit view --project group/project --sha 9a1b2c3
|
|
588
|
+
|
|
589
|
+
$ simply gitlab commit view --project group/project --sha main --json
|
|
590
|
+
|
|
591
|
+
FLAG DESCRIPTIONS
|
|
592
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
593
|
+
|
|
594
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
595
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
_See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/commit/view.js)_
|
|
599
|
+
|
|
600
|
+
## `simply gitlab file create`
|
|
601
|
+
|
|
602
|
+
Create a file in a repository.
|
|
603
|
+
|
|
604
|
+
```
|
|
605
|
+
USAGE
|
|
606
|
+
$ simply gitlab file create -p <value> --path <value> --branch <value> --message <value> [--json] [-e <value>]
|
|
607
|
+
[--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--content <value> | --content-file <value>]
|
|
608
|
+
[--start-branch <value>] [--author-email <value>] [--author-name <value>]
|
|
609
|
+
|
|
610
|
+
FLAGS
|
|
611
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
612
|
+
group/subgroup/project.
|
|
613
|
+
--author-email=<value> Commit author email.
|
|
614
|
+
--author-name=<value> Commit author name.
|
|
615
|
+
--branch=<value> (required) Branch to commit to.
|
|
616
|
+
--content=<value> File contents.
|
|
617
|
+
--content-file=<value> Path to a local file holding the contents.
|
|
618
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
619
|
+
--message=<value> (required) Commit message.
|
|
620
|
+
--path=<value> (required) Path the file will have in the repository.
|
|
621
|
+
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
622
|
+
|
|
623
|
+
CONNECTION FLAGS
|
|
624
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
625
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
626
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
627
|
+
|
|
628
|
+
GLOBAL FLAGS
|
|
629
|
+
--json Format output as json.
|
|
630
|
+
|
|
631
|
+
DESCRIPTION
|
|
632
|
+
Create a file in a repository.
|
|
633
|
+
|
|
634
|
+
Commits one new file to a branch. GitLab refuses the request if the file already exists — use file update for that —
|
|
635
|
+
and refuses it if the branch is protected and the token lacks the role to push to it. Use --dry-run to see exactly
|
|
636
|
+
what would be sent.
|
|
637
|
+
|
|
638
|
+
EXAMPLES
|
|
639
|
+
$ simply gitlab file create --project group/project --path docs/new.md --branch main --content-file ./new.md --message "docs: add page"
|
|
640
|
+
|
|
641
|
+
$ simply gitlab file create --project group/project --path src/config.json --branch feature --content-file ./config.json --message "feat: add config" --dry-run
|
|
642
|
+
|
|
643
|
+
FLAG DESCRIPTIONS
|
|
644
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
645
|
+
|
|
646
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
647
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
648
|
+
```
|
|
649
|
+
|
|
650
|
+
_See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/create.js)_
|
|
651
|
+
|
|
652
|
+
## `simply gitlab file update`
|
|
653
|
+
|
|
654
|
+
Replace a file in a repository.
|
|
655
|
+
|
|
656
|
+
```
|
|
657
|
+
USAGE
|
|
658
|
+
$ simply gitlab file update -p <value> --path <value> --branch <value> --message <value> [--json] [-e <value>]
|
|
659
|
+
[--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--content <value> | --content-file <value>]
|
|
660
|
+
[--start-branch <value>] [--last-commit-id <value>] [--author-email <value>] [--author-name <value>]
|
|
661
|
+
|
|
662
|
+
FLAGS
|
|
663
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
664
|
+
group/subgroup/project.
|
|
665
|
+
--author-email=<value> Commit author email.
|
|
666
|
+
--author-name=<value> Commit author name.
|
|
667
|
+
--branch=<value> (required) Branch to commit to.
|
|
668
|
+
--content=<value> New file contents.
|
|
669
|
+
--content-file=<value> Path to a local file holding the new contents.
|
|
670
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
671
|
+
--last-commit-id=<value> Reject the write if the file changed since this commit.
|
|
672
|
+
--message=<value> (required) Commit message.
|
|
673
|
+
--path=<value> (required) Path to the file within the repository.
|
|
674
|
+
--start-branch=<value> Branch to create --branch from, if it does not exist.
|
|
675
|
+
|
|
676
|
+
CONNECTION FLAGS
|
|
677
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
678
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
679
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
680
|
+
|
|
681
|
+
GLOBAL FLAGS
|
|
682
|
+
--json Format output as json.
|
|
683
|
+
|
|
684
|
+
DESCRIPTION
|
|
685
|
+
Replace a file in a repository.
|
|
686
|
+
|
|
687
|
+
Commits new contents over an existing file. The whole file is replaced; there is no partial edit. Pass
|
|
688
|
+
--last-commit-id with the value file view reported to have GitLab reject the write if someone else changed the file
|
|
689
|
+
meanwhile, instead of silently overwriting them.
|
|
690
|
+
|
|
691
|
+
EXAMPLES
|
|
692
|
+
$ simply gitlab file update --project group/project --path README.md --branch main --content-file ./README.md --message "docs: refresh readme"
|
|
693
|
+
|
|
694
|
+
$ simply gitlab file update --project group/project --path README.md --branch main --content-file ./README.md --message "docs: refresh" --last-commit-id 9a1b2c3
|
|
695
|
+
|
|
696
|
+
FLAG DESCRIPTIONS
|
|
697
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
698
|
+
|
|
699
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
700
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
_See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/update.js)_
|
|
704
|
+
|
|
705
|
+
## `simply gitlab file view`
|
|
706
|
+
|
|
707
|
+
Print a file from a repository.
|
|
708
|
+
|
|
709
|
+
```
|
|
710
|
+
USAGE
|
|
711
|
+
$ simply gitlab file view -p <value> --path <value> --ref <value> [--json] [-e <value>] [--gitlab-url <value>]
|
|
712
|
+
[--gitlab-token <value>] [--raw]
|
|
713
|
+
|
|
714
|
+
FLAGS
|
|
715
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
716
|
+
--path=<value> (required) Path to the file within the repository.
|
|
717
|
+
--raw Print only the file contents, with no metadata header.
|
|
718
|
+
--ref=<value> (required) Branch, tag, or commit SHA to read from.
|
|
719
|
+
|
|
720
|
+
CONNECTION FLAGS
|
|
721
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
722
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
723
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
724
|
+
|
|
725
|
+
GLOBAL FLAGS
|
|
726
|
+
--json Format output as json.
|
|
727
|
+
|
|
728
|
+
DESCRIPTION
|
|
729
|
+
Print a file from a repository.
|
|
730
|
+
|
|
731
|
+
Reads one file at a ref and writes its decoded contents to stdout, under a short metadata header. Use --raw for the
|
|
732
|
+
contents alone, or --json for the API payload, whose "content" is base64 exactly as GitLab sends it.
|
|
733
|
+
|
|
734
|
+
A binary file is not printed: its bytes would emit escape sequences to a terminal and noise to whatever reads this
|
|
735
|
+
stream. The metadata still is, so you can see what was found.
|
|
736
|
+
|
|
737
|
+
EXAMPLES
|
|
738
|
+
$ simply gitlab file view --project group/project --path src/index.ts --ref main
|
|
739
|
+
|
|
740
|
+
$ simply gitlab file view --project group/project --path README.md --ref v1.2.0 --raw
|
|
741
|
+
|
|
742
|
+
FLAG DESCRIPTIONS
|
|
743
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
744
|
+
|
|
745
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
746
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
_See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/file/view.js)_
|
|
750
|
+
|
|
751
|
+
## `simply gitlab mr create`
|
|
752
|
+
|
|
753
|
+
Open a merge request.
|
|
754
|
+
|
|
755
|
+
```
|
|
756
|
+
USAGE
|
|
757
|
+
$ simply gitlab mr create -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
758
|
+
[--dry-run] [--source-branch <value>] [--target-branch <value>] [--title <value>] [--description <value>] [--draft]
|
|
759
|
+
[--squash] [--remove-source-branch] [--assignee-id <value>...] [--reviewer-id <value>...] [--labels <value>]
|
|
760
|
+
[--milestone-id <value>] [--body <value> | --body-file <value>]
|
|
761
|
+
|
|
762
|
+
FLAGS
|
|
763
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
764
|
+
group/subgroup/project.
|
|
765
|
+
--assignee-id=<value>... User id to assign. Repeatable.
|
|
766
|
+
--body=<value> Raw JSON request body.
|
|
767
|
+
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
768
|
+
--description=<value> Merge request description, as Markdown.
|
|
769
|
+
--draft Open it as a draft.
|
|
770
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
771
|
+
--labels=<value> Comma-separated labels to apply.
|
|
772
|
+
--milestone-id=<value> Milestone id to attach.
|
|
773
|
+
--remove-source-branch Delete the source branch on merge.
|
|
774
|
+
--reviewer-id=<value>... User id to request review from. Repeatable.
|
|
775
|
+
--source-branch=<value> Branch holding the changes.
|
|
776
|
+
--squash Squash the commits when it merges.
|
|
777
|
+
--target-branch=<value> Branch the changes are proposed for.
|
|
778
|
+
--title=<value> Merge request title.
|
|
779
|
+
|
|
780
|
+
CONNECTION FLAGS
|
|
781
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
782
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
783
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
784
|
+
|
|
785
|
+
GLOBAL FLAGS
|
|
786
|
+
--json Format output as json.
|
|
787
|
+
|
|
788
|
+
DESCRIPTION
|
|
789
|
+
Open a merge request.
|
|
790
|
+
|
|
791
|
+
Both branches must already exist on the project. --draft prefixes the title with "Draft: ", which is how GitLab itself
|
|
792
|
+
marks a draft; there is no separate field for it.
|
|
793
|
+
|
|
794
|
+
Assignees and reviewers are numeric user ids, not usernames — GitLab accepts only ids here. --body or --body-file
|
|
795
|
+
supplies raw JSON for anything the flags do not cover, such as approval rules. Use --dry-run to see exactly what would
|
|
796
|
+
be sent.
|
|
797
|
+
|
|
798
|
+
EXAMPLES
|
|
799
|
+
$ simply gitlab mr create --project group/project --source-branch feature --target-branch main --title "feat: the thing"
|
|
800
|
+
|
|
801
|
+
$ simply gitlab mr create --project group/project --source-branch feature --target-branch main --title wip --draft --squash
|
|
802
|
+
|
|
803
|
+
FLAG DESCRIPTIONS
|
|
804
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
805
|
+
|
|
806
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
807
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
808
|
+
```
|
|
809
|
+
|
|
810
|
+
_See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/create.js)_
|
|
811
|
+
|
|
812
|
+
## `simply gitlab mr list`
|
|
813
|
+
|
|
814
|
+
List merge requests for a project.
|
|
815
|
+
|
|
816
|
+
```
|
|
817
|
+
USAGE
|
|
818
|
+
$ simply gitlab mr list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
819
|
+
<value>] [--state opened|closed|locked|merged|all] [--source-branch <value>] [--target-branch <value>]
|
|
820
|
+
[--author-username <value>] [--reviewer-username <value>] [--labels <value>] [--search <value>]
|
|
821
|
+
|
|
822
|
+
FLAGS
|
|
823
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
824
|
+
group/subgroup/project.
|
|
825
|
+
--author-username=<value> Only merge requests opened by this username.
|
|
826
|
+
--labels=<value> Comma-separated labels every result must carry.
|
|
827
|
+
--limit=<value> [default: 20] Maximum number of merge requests to return across all pages.
|
|
828
|
+
--reviewer-username=<value> Only merge requests this username is reviewing.
|
|
829
|
+
--search=<value> Match against the title and description.
|
|
830
|
+
--source-branch=<value> Only merge requests from this source branch.
|
|
831
|
+
--state=<option> [default: opened] Merge request state to return.
|
|
832
|
+
<options: opened|closed|locked|merged|all>
|
|
833
|
+
--target-branch=<value> Only merge requests into this target branch.
|
|
834
|
+
|
|
835
|
+
CONNECTION FLAGS
|
|
836
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
837
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
838
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
839
|
+
|
|
840
|
+
GLOBAL FLAGS
|
|
841
|
+
--json Format output as json.
|
|
842
|
+
|
|
843
|
+
DESCRIPTION
|
|
844
|
+
List merge requests for a project.
|
|
845
|
+
|
|
846
|
+
Defaults to open merge requests, which is what a list is nearly always for; pass --state all to include closed and
|
|
847
|
+
merged ones. The IID column is the number to pass to the other mr commands — it is per-project, and is not the "id"
|
|
848
|
+
field in the JSON payload.
|
|
849
|
+
|
|
850
|
+
EXAMPLES
|
|
851
|
+
$ simply gitlab mr list --project group/project
|
|
852
|
+
|
|
853
|
+
$ simply gitlab mr list --project group/project --state merged --target-branch main --limit 10
|
|
854
|
+
|
|
855
|
+
$ simply gitlab mr list --project group/project --author-username someone --json
|
|
856
|
+
|
|
857
|
+
FLAG DESCRIPTIONS
|
|
858
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
859
|
+
|
|
860
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
861
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
_See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/list.js)_
|
|
865
|
+
|
|
866
|
+
## `simply gitlab mr update`
|
|
867
|
+
|
|
868
|
+
Change an existing merge request.
|
|
869
|
+
|
|
870
|
+
```
|
|
871
|
+
USAGE
|
|
872
|
+
$ simply gitlab mr update -p <value> --mr <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
873
|
+
<value>] [--dry-run] [--title <value>] [--description <value>] [--target-branch <value>] [--state close|reopen]
|
|
874
|
+
[--squash] [--remove-source-branch] [--assignee-id <value>...] [--reviewer-id <value>...] [--labels <value>]
|
|
875
|
+
[--milestone-id <value>] [--body <value> | --body-file <value>]
|
|
876
|
+
|
|
877
|
+
FLAGS
|
|
878
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as
|
|
879
|
+
group/subgroup/project.
|
|
880
|
+
--assignee-id=<value>... User id to assign, replacing the set. Repeatable.
|
|
881
|
+
--body=<value> Raw JSON request body.
|
|
882
|
+
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
883
|
+
--description=<value> New description, as Markdown.
|
|
884
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
885
|
+
--labels=<value> Comma-separated labels, replacing the existing set.
|
|
886
|
+
--milestone-id=<value> Milestone id to attach.
|
|
887
|
+
--mr=<value> (required) Merge request iid.
|
|
888
|
+
--[no-]remove-source-branch Delete the source branch on merge.
|
|
889
|
+
--reviewer-id=<value>... User id to review, replacing the set. Repeatable.
|
|
890
|
+
--[no-]squash Squash the commits when it merges.
|
|
891
|
+
--state=<option> Close or reopen the merge request.
|
|
892
|
+
<options: close|reopen>
|
|
893
|
+
--target-branch=<value> New target branch.
|
|
894
|
+
--title=<value> New title.
|
|
895
|
+
|
|
896
|
+
CONNECTION FLAGS
|
|
897
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
898
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
899
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
900
|
+
|
|
901
|
+
GLOBAL FLAGS
|
|
902
|
+
--json Format output as json.
|
|
903
|
+
|
|
904
|
+
DESCRIPTION
|
|
905
|
+
Change an existing merge request.
|
|
906
|
+
|
|
907
|
+
Only the attributes you name are changed, with one exception worth knowing: --labels replaces the whole label set
|
|
908
|
+
rather than adding to it.
|
|
909
|
+
|
|
910
|
+
Naming nothing to change is refused rather than sent, because GitLab answers an empty update with a cheerful 200 and
|
|
911
|
+
an unchanged merge request. --state close and --state reopen do what the buttons of those names do; neither merges
|
|
912
|
+
anything.
|
|
913
|
+
|
|
914
|
+
EXAMPLES
|
|
915
|
+
$ simply gitlab mr update --project group/project --mr 42 --title "feat: renamed"
|
|
916
|
+
|
|
917
|
+
$ simply gitlab mr update --project group/project --mr 42 --state close
|
|
918
|
+
|
|
919
|
+
$ simply gitlab mr update --project group/project --mr 42 --labels backend,urgent --dry-run
|
|
920
|
+
|
|
921
|
+
FLAG DESCRIPTIONS
|
|
922
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
923
|
+
|
|
924
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
925
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
_See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/update.js)_
|
|
929
|
+
|
|
930
|
+
## `simply gitlab mr view`
|
|
931
|
+
|
|
932
|
+
Show one merge request.
|
|
933
|
+
|
|
934
|
+
```
|
|
935
|
+
USAGE
|
|
936
|
+
$ simply gitlab mr view -p <value> --mr <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token
|
|
937
|
+
<value>]
|
|
938
|
+
|
|
939
|
+
FLAGS
|
|
940
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
941
|
+
--mr=<value> (required) Merge request iid.
|
|
942
|
+
|
|
943
|
+
CONNECTION FLAGS
|
|
944
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
945
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
946
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
947
|
+
|
|
948
|
+
GLOBAL FLAGS
|
|
949
|
+
--json Format output as json.
|
|
950
|
+
|
|
951
|
+
DESCRIPTION
|
|
952
|
+
Show one merge request.
|
|
953
|
+
|
|
954
|
+
Takes the project-scoped iid — the number in the merge request URL — not the instance-wide id. Use --json for the full
|
|
955
|
+
payload, which carries the pipeline status, approvals, and diff refs the summary below leaves out.
|
|
956
|
+
|
|
957
|
+
EXAMPLES
|
|
958
|
+
$ simply gitlab mr view --project group/project --mr 42
|
|
959
|
+
|
|
960
|
+
$ simply gitlab mr view --project group/project --mr 42 --json
|
|
961
|
+
|
|
962
|
+
FLAG DESCRIPTIONS
|
|
963
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
964
|
+
|
|
965
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
966
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
_See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/mr/view.js)_
|
|
970
|
+
|
|
971
|
+
## `simply gitlab project list`
|
|
972
|
+
|
|
973
|
+
List projects you can see.
|
|
974
|
+
|
|
975
|
+
```
|
|
976
|
+
USAGE
|
|
977
|
+
$ simply gitlab project list [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit <value>]
|
|
978
|
+
[--search <value>] [--membership] [--owned] [--simple]
|
|
979
|
+
|
|
980
|
+
FLAGS
|
|
981
|
+
--limit=<value> [default: 20] Maximum number of projects to return across all pages.
|
|
982
|
+
--membership Only projects you are a member of.
|
|
983
|
+
--owned Only projects you own.
|
|
984
|
+
--search=<value> Match against the project name and path.
|
|
985
|
+
--simple Return only the core fields, for a much smaller payload.
|
|
986
|
+
|
|
987
|
+
CONNECTION FLAGS
|
|
988
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
989
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
990
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
991
|
+
|
|
992
|
+
GLOBAL FLAGS
|
|
993
|
+
--json Format output as json.
|
|
994
|
+
|
|
995
|
+
DESCRIPTION
|
|
996
|
+
List projects you can see.
|
|
997
|
+
|
|
998
|
+
Without --search this lists every project the token can reach, newest activity first, which on a large instance is not
|
|
999
|
+
a useful answer — narrow it with --search or --membership. Use --simple for a much smaller payload when you only need
|
|
1000
|
+
ids and paths.
|
|
1001
|
+
|
|
1002
|
+
EXAMPLES
|
|
1003
|
+
$ simply gitlab project list --membership
|
|
1004
|
+
|
|
1005
|
+
$ simply gitlab project list --search platform --limit 10
|
|
1006
|
+
|
|
1007
|
+
$ simply gitlab project list --search platform --simple --json
|
|
1008
|
+
|
|
1009
|
+
FLAG DESCRIPTIONS
|
|
1010
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1011
|
+
|
|
1012
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1013
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
_See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/project/list.js)_
|
|
1017
|
+
|
|
1018
|
+
## `simply gitlab project view`
|
|
1019
|
+
|
|
1020
|
+
Show one project.
|
|
1021
|
+
|
|
1022
|
+
```
|
|
1023
|
+
USAGE
|
|
1024
|
+
$ simply gitlab project view -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>]
|
|
1025
|
+
|
|
1026
|
+
FLAGS
|
|
1027
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1028
|
+
|
|
1029
|
+
CONNECTION FLAGS
|
|
1030
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1031
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1032
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1033
|
+
|
|
1034
|
+
GLOBAL FLAGS
|
|
1035
|
+
--json Format output as json.
|
|
1036
|
+
|
|
1037
|
+
DESCRIPTION
|
|
1038
|
+
Show one project.
|
|
1039
|
+
|
|
1040
|
+
Accepts either the numeric id or the full path. Use --json for the complete, unmodified API payload, which carries far
|
|
1041
|
+
more than the summary below — permissions, statistics, and every feature toggle on the project.
|
|
1042
|
+
|
|
1043
|
+
EXAMPLES
|
|
1044
|
+
$ simply gitlab project view --project group/project
|
|
1045
|
+
|
|
1046
|
+
$ simply gitlab project view --project 1234 --json
|
|
1047
|
+
|
|
1048
|
+
FLAG DESCRIPTIONS
|
|
1049
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1050
|
+
|
|
1051
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1052
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
_See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/project/view.js)_
|
|
1056
|
+
|
|
1057
|
+
## `simply gitlab release list`
|
|
1058
|
+
|
|
1059
|
+
List releases for a project.
|
|
1060
|
+
|
|
1061
|
+
```
|
|
1062
|
+
USAGE
|
|
1063
|
+
$ simply gitlab release list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
1064
|
+
<value>]
|
|
1065
|
+
|
|
1066
|
+
FLAGS
|
|
1067
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1068
|
+
--limit=<value> [default: 20] Maximum number of releases to return across all pages.
|
|
1069
|
+
|
|
1070
|
+
CONNECTION FLAGS
|
|
1071
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1072
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1073
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1074
|
+
|
|
1075
|
+
GLOBAL FLAGS
|
|
1076
|
+
--json Format output as json.
|
|
1077
|
+
|
|
1078
|
+
DESCRIPTION
|
|
1079
|
+
List releases for a project.
|
|
1080
|
+
|
|
1081
|
+
Releases are tags with notes and assets attached, so a project can have many tags and no releases at all. Use --json
|
|
1082
|
+
for the release notes, asset links, and the commit each release points at.
|
|
1083
|
+
|
|
1084
|
+
EXAMPLES
|
|
1085
|
+
$ simply gitlab release list --project group/project
|
|
1086
|
+
|
|
1087
|
+
$ simply gitlab release list --project group/project --limit 5 --json
|
|
1088
|
+
|
|
1089
|
+
FLAG DESCRIPTIONS
|
|
1090
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1091
|
+
|
|
1092
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1093
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1094
|
+
```
|
|
1095
|
+
|
|
1096
|
+
_See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/release/list.js)_
|
|
1097
|
+
|
|
1098
|
+
## `simply gitlab search`
|
|
1099
|
+
|
|
1100
|
+
Search GitLab.
|
|
1101
|
+
|
|
1102
|
+
```
|
|
1103
|
+
USAGE
|
|
1104
|
+
$ simply gitlab search --scope
|
|
1105
|
+
projects|issues|merge_requests|milestones|wiki_blobs|commits|blobs|notes|users|snippet_titles --query <value>
|
|
1106
|
+
[--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit <value>] [--project <value> | --group
|
|
1107
|
+
<value>]
|
|
1108
|
+
|
|
1109
|
+
FLAGS
|
|
1110
|
+
--group=<value> Search within this group id or path.
|
|
1111
|
+
--limit=<value> [default: 20] Maximum number of results to return across all pages.
|
|
1112
|
+
--project=<value> Search within this project id or path.
|
|
1113
|
+
--query=<value> (required) The search term.
|
|
1114
|
+
--scope=<option> (required) What to search.
|
|
1115
|
+
<options:
|
|
1116
|
+
projects|issues|merge_requests|milestones|wiki_blobs|commits|blobs|notes|users|snippet_titles>
|
|
1117
|
+
|
|
1118
|
+
CONNECTION FLAGS
|
|
1119
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1120
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1121
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1122
|
+
|
|
1123
|
+
GLOBAL FLAGS
|
|
1124
|
+
--json Format output as json.
|
|
1125
|
+
|
|
1126
|
+
DESCRIPTION
|
|
1127
|
+
Search GitLab.
|
|
1128
|
+
|
|
1129
|
+
Searches the whole instance by default, or one project with --project, or one group with --group. These are three
|
|
1130
|
+
different GitLab endpoints, and they do not accept the same scopes: projects and users are instance-wide only, while a
|
|
1131
|
+
project search can look at notes.
|
|
1132
|
+
|
|
1133
|
+
The blobs, commits, wiki_blobs, notes, and snippet_titles scopes need Advanced Search (Elasticsearch) enabled on the
|
|
1134
|
+
instance. Where it is not, GitLab answers with an empty list and a 200 rather than an error, so an empty result for
|
|
1135
|
+
one of those scopes is reported here as possibly meaning "not enabled" rather than "no matches".
|
|
1136
|
+
|
|
1137
|
+
EXAMPLES
|
|
1138
|
+
$ simply gitlab search --scope projects --query platform
|
|
1139
|
+
|
|
1140
|
+
$ simply gitlab search --scope blobs --query UMCN_Account --project group/project
|
|
1141
|
+
|
|
1142
|
+
$ simply gitlab search --scope merge_requests --query "flaky test" --group my-group --json
|
|
1143
|
+
|
|
1144
|
+
FLAG DESCRIPTIONS
|
|
1145
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1146
|
+
|
|
1147
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1148
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1149
|
+
```
|
|
1150
|
+
|
|
1151
|
+
_See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/search.js)_
|
|
1152
|
+
|
|
1153
|
+
## `simply gitlab tag list`
|
|
1154
|
+
|
|
1155
|
+
List repository tags.
|
|
1156
|
+
|
|
1157
|
+
```
|
|
1158
|
+
USAGE
|
|
1159
|
+
$ simply gitlab tag list -p <value> [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--limit
|
|
1160
|
+
<value>] [--search <value>] [--order-by name|updated|version] [--sort asc|desc]
|
|
1161
|
+
|
|
1162
|
+
FLAGS
|
|
1163
|
+
-p, --project=<value> (required) [env: GITLAB_PROJECT] Project id, or its full path such as group/subgroup/project.
|
|
1164
|
+
--limit=<value> [default: 20] Maximum number of tags to return across all pages.
|
|
1165
|
+
--order-by=<option> Field to sort by.
|
|
1166
|
+
<options: name|updated|version>
|
|
1167
|
+
--search=<value> Return only tags whose name contains this term.
|
|
1168
|
+
--sort=<option> Sort direction.
|
|
1169
|
+
<options: asc|desc>
|
|
1170
|
+
|
|
1171
|
+
CONNECTION FLAGS
|
|
1172
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1173
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1174
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1175
|
+
|
|
1176
|
+
GLOBAL FLAGS
|
|
1177
|
+
--json Format output as json.
|
|
1178
|
+
|
|
1179
|
+
DESCRIPTION
|
|
1180
|
+
List repository tags.
|
|
1181
|
+
|
|
1182
|
+
Tags come back newest first by the commit date they point at. That is the commit date, not the tag creation date, so a
|
|
1183
|
+
tag cut today on an old commit sorts by the old commit — use --order-by name if you need a deterministic order
|
|
1184
|
+
instead.
|
|
1185
|
+
|
|
1186
|
+
EXAMPLES
|
|
1187
|
+
$ simply gitlab tag list --project group/project
|
|
1188
|
+
|
|
1189
|
+
$ simply gitlab tag list --project group/project --search v1. --limit 50
|
|
1190
|
+
|
|
1191
|
+
FLAG DESCRIPTIONS
|
|
1192
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1193
|
+
|
|
1194
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1195
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1198
|
+
_See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.1.0/packages/simply-gitlab/lib/commands/gitlab/tag/list.js)_
|
|
1199
|
+
<!-- commandsstop -->
|
|
1200
|
+
|
|
1201
|
+
## License
|
|
1202
|
+
|
|
1203
|
+
Apache-2.0.
|