qodev-gitlab-cli 0.1.1__tar.gz → 0.2.0__tar.gz

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.
Files changed (38) hide show
  1. qodev_gitlab_cli-0.2.0/LICENSE +21 -0
  2. qodev_gitlab_cli-0.2.0/PKG-INFO +147 -0
  3. qodev_gitlab_cli-0.2.0/README.md +117 -0
  4. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/pyproject.toml +16 -1
  5. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/mrs.py +1 -0
  6. qodev_gitlab_cli-0.1.1/PKG-INFO +0 -15
  7. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/.github/workflows/ci.yml +0 -0
  8. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/.github/workflows/publish.yml +0 -0
  9. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/.gitignore +0 -0
  10. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/__init__.py +0 -0
  11. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/__main__.py +0 -0
  12. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/app.py +0 -0
  13. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/__init__.py +0 -0
  14. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/issues.py +0 -0
  15. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/jobs.py +0 -0
  16. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/pipelines.py +0 -0
  17. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/projects.py +0 -0
  18. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/releases.py +0 -0
  19. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/commands/variables.py +0 -0
  20. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/context.py +0 -0
  21. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/__init__.py +0 -0
  22. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/generic.py +0 -0
  23. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/issues.py +0 -0
  24. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/jobs.py +0 -0
  25. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/mrs.py +0 -0
  26. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/pipelines.py +0 -0
  27. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/projects.py +0 -0
  28. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/releases.py +0 -0
  29. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/formatters/variables.py +0 -0
  30. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/output.py +0 -0
  31. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/src/qodev_gitlab_cli/project.py +0 -0
  32. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/__init__.py +0 -0
  33. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/conftest.py +0 -0
  34. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/test_commands.py +0 -0
  35. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/test_context.py +0 -0
  36. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/test_formatters.py +0 -0
  37. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/test_output.py +0 -0
  38. {qodev_gitlab_cli-0.1.1 → qodev_gitlab_cli-0.2.0}/tests/test_project.py +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 qodev GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.4
2
+ Name: qodev-gitlab-cli
3
+ Version: 0.2.0
4
+ Summary: Agent-friendly CLI for the GitLab API
5
+ Project-URL: Homepage, https://github.com/qodevai/gitlab-cli
6
+ Project-URL: Repository, https://github.com/qodevai/gitlab-cli
7
+ Project-URL: Issues, https://github.com/qodevai/gitlab-cli/issues
8
+ Author-email: Jan Scheffler <jan.scheffler@qodev.ai>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: api,cli,devops,gitlab
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: cyclopts>=3.0
22
+ Requires-Dist: qodev-gitlab-api>=0.1.0
23
+ Requires-Dist: rich>=13.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: mypy>=1.13.0; extra == 'dev'
26
+ Requires-Dist: pytest-mock>=3.15; extra == 'dev'
27
+ Requires-Dist: pytest>=9.0; extra == 'dev'
28
+ Requires-Dist: ruff>=0.15; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # qodev-gitlab-cli
32
+
33
+ Agent-friendly CLI for the GitLab API. Designed for both human and AI-agent workflows, with structured JSON output, consistent flags, and predictable error codes.
34
+
35
+ ## Installation
36
+
37
+ ```bash
38
+ pip install qodev-gitlab-cli
39
+ ```
40
+
41
+ Or run directly without installing:
42
+
43
+ ```bash
44
+ uvx qodev-gitlab-cli
45
+ ```
46
+
47
+ ## Quick Start
48
+
49
+ ```bash
50
+ # Set your GitLab token
51
+ export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
52
+
53
+ # List open merge requests for a project
54
+ qodev-gitlab mrs list --project mygroup/myproject
55
+
56
+ # Get details of a specific issue
57
+ qodev-gitlab issues get 42 --project mygroup/myproject
58
+
59
+ # List pipelines, output as JSON for scripting
60
+ qodev-gitlab pipelines list --project mygroup/myproject --json
61
+
62
+ # Create a merge request from the current branch
63
+ qodev-gitlab mrs create --title "Add new feature" --project mygroup/myproject
64
+ ```
65
+
66
+ ## Commands
67
+
68
+ | Group | Subcommand | Description |
69
+ |---|---|---|
70
+ | **projects** | `list` | List projects (`--owned` for owned only) |
71
+ | | `get` | Get project details |
72
+ | **mrs** | `list` | List merge requests (`--state`) |
73
+ | | `get` | Get merge request details |
74
+ | | `create` | Create a merge request (`--title`, `--source`, `--target`, `--description`, `--labels`, `--squash`) |
75
+ | | `update` | Update a merge request (`--title`, `--description`, `--labels`, `--target`) |
76
+ | | `merge` | Merge a merge request (`--squash`, `--when-pipeline-succeeds`) |
77
+ | | `close` | Close a merge request |
78
+ | | `discussions` | List discussions on a merge request |
79
+ | | `changes` | Show diff for a merge request |
80
+ | | `commits` | List commits in a merge request |
81
+ | | `approvals` | Show approval status |
82
+ | | `comment` | Comment on a merge request (`--body`) |
83
+ | | `pipelines` | List pipelines for a merge request |
84
+ | **pipelines** | `list` | List pipelines (`--ref`, `--limit`) |
85
+ | | `get` | Get pipeline details |
86
+ | | `jobs` | List jobs for a pipeline |
87
+ | | `wait` | Wait for a pipeline to complete (`--timeout`, `--interval`) |
88
+ | **jobs** | `get` | Get job details |
89
+ | | `log` | Get job log output |
90
+ | | `retry` | Retry a failed job |
91
+ | **issues** | `list` | List issues (`--state`, `--labels`, `--milestone`) |
92
+ | | `get` | Get issue details |
93
+ | | `create` | Create an issue (`--title`, `--description`, `--labels`) |
94
+ | | `update` | Update an issue (`--title`, `--description`, `--labels`) |
95
+ | | `close` | Close an issue |
96
+ | | `comment` | Comment on an issue (`--body`) |
97
+ | | `notes` | List comments/notes on an issue |
98
+ | **releases** | `list` | List releases |
99
+ | | `get` | Get release details by tag |
100
+ | | `create` | Create a release (`--tag`, `--name`, `--description`, `--ref`) |
101
+ | **variables** | `list` | List CI/CD variables (values hidden) |
102
+ | | `get` | Get a CI/CD variable |
103
+ | | `set` | Set (create or update) a CI/CD variable (`--protected`, `--masked`) |
104
+
105
+ ## Configuration
106
+
107
+ ### Authentication
108
+
109
+ Set the `GITLAB_TOKEN` environment variable, or pass `--token` on each invocation:
110
+
111
+ ```bash
112
+ export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
113
+ ```
114
+
115
+ ### GitLab Instance
116
+
117
+ By default the CLI targets `https://gitlab.com`. Override with the `GITLAB_URL` environment variable or the `--url` flag:
118
+
119
+ ```bash
120
+ export GITLAB_URL="https://gitlab.example.com"
121
+ ```
122
+
123
+ ### Global Options
124
+
125
+ | Flag | Description | Default |
126
+ |---|---|---|
127
+ | `--json` | Output as JSON (for scripting / agents) | `false` |
128
+ | `--project`, `-p` | Project ID or path | auto-detected from git remote |
129
+ | `--limit` | Results per page | `25` |
130
+ | `--page` | Page number | `1` |
131
+ | `--token` | GitLab token (overrides `GITLAB_TOKEN`) | |
132
+ | `--url` | GitLab URL (overrides `GITLAB_URL`) | |
133
+
134
+ ### Exit Codes
135
+
136
+ | Code | Meaning |
137
+ |---|---|
138
+ | `0` | Success |
139
+ | `80` | Authentication error |
140
+ | `81` | Not found |
141
+ | `82` | API error |
142
+ | `83` | Validation error |
143
+ | `84` | Configuration error |
144
+
145
+ ## License
146
+
147
+ MIT -- see [LICENSE](LICENSE) for details.
@@ -0,0 +1,117 @@
1
+ # qodev-gitlab-cli
2
+
3
+ Agent-friendly CLI for the GitLab API. Designed for both human and AI-agent workflows, with structured JSON output, consistent flags, and predictable error codes.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install qodev-gitlab-cli
9
+ ```
10
+
11
+ Or run directly without installing:
12
+
13
+ ```bash
14
+ uvx qodev-gitlab-cli
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Set your GitLab token
21
+ export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
22
+
23
+ # List open merge requests for a project
24
+ qodev-gitlab mrs list --project mygroup/myproject
25
+
26
+ # Get details of a specific issue
27
+ qodev-gitlab issues get 42 --project mygroup/myproject
28
+
29
+ # List pipelines, output as JSON for scripting
30
+ qodev-gitlab pipelines list --project mygroup/myproject --json
31
+
32
+ # Create a merge request from the current branch
33
+ qodev-gitlab mrs create --title "Add new feature" --project mygroup/myproject
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ | Group | Subcommand | Description |
39
+ |---|---|---|
40
+ | **projects** | `list` | List projects (`--owned` for owned only) |
41
+ | | `get` | Get project details |
42
+ | **mrs** | `list` | List merge requests (`--state`) |
43
+ | | `get` | Get merge request details |
44
+ | | `create` | Create a merge request (`--title`, `--source`, `--target`, `--description`, `--labels`, `--squash`) |
45
+ | | `update` | Update a merge request (`--title`, `--description`, `--labels`, `--target`) |
46
+ | | `merge` | Merge a merge request (`--squash`, `--when-pipeline-succeeds`) |
47
+ | | `close` | Close a merge request |
48
+ | | `discussions` | List discussions on a merge request |
49
+ | | `changes` | Show diff for a merge request |
50
+ | | `commits` | List commits in a merge request |
51
+ | | `approvals` | Show approval status |
52
+ | | `comment` | Comment on a merge request (`--body`) |
53
+ | | `pipelines` | List pipelines for a merge request |
54
+ | **pipelines** | `list` | List pipelines (`--ref`, `--limit`) |
55
+ | | `get` | Get pipeline details |
56
+ | | `jobs` | List jobs for a pipeline |
57
+ | | `wait` | Wait for a pipeline to complete (`--timeout`, `--interval`) |
58
+ | **jobs** | `get` | Get job details |
59
+ | | `log` | Get job log output |
60
+ | | `retry` | Retry a failed job |
61
+ | **issues** | `list` | List issues (`--state`, `--labels`, `--milestone`) |
62
+ | | `get` | Get issue details |
63
+ | | `create` | Create an issue (`--title`, `--description`, `--labels`) |
64
+ | | `update` | Update an issue (`--title`, `--description`, `--labels`) |
65
+ | | `close` | Close an issue |
66
+ | | `comment` | Comment on an issue (`--body`) |
67
+ | | `notes` | List comments/notes on an issue |
68
+ | **releases** | `list` | List releases |
69
+ | | `get` | Get release details by tag |
70
+ | | `create` | Create a release (`--tag`, `--name`, `--description`, `--ref`) |
71
+ | **variables** | `list` | List CI/CD variables (values hidden) |
72
+ | | `get` | Get a CI/CD variable |
73
+ | | `set` | Set (create or update) a CI/CD variable (`--protected`, `--masked`) |
74
+
75
+ ## Configuration
76
+
77
+ ### Authentication
78
+
79
+ Set the `GITLAB_TOKEN` environment variable, or pass `--token` on each invocation:
80
+
81
+ ```bash
82
+ export GITLAB_TOKEN="glpat-xxxxxxxxxxxxxxxxxxxx"
83
+ ```
84
+
85
+ ### GitLab Instance
86
+
87
+ By default the CLI targets `https://gitlab.com`. Override with the `GITLAB_URL` environment variable or the `--url` flag:
88
+
89
+ ```bash
90
+ export GITLAB_URL="https://gitlab.example.com"
91
+ ```
92
+
93
+ ### Global Options
94
+
95
+ | Flag | Description | Default |
96
+ |---|---|---|
97
+ | `--json` | Output as JSON (for scripting / agents) | `false` |
98
+ | `--project`, `-p` | Project ID or path | auto-detected from git remote |
99
+ | `--limit` | Results per page | `25` |
100
+ | `--page` | Page number | `1` |
101
+ | `--token` | GitLab token (overrides `GITLAB_TOKEN`) | |
102
+ | `--url` | GitLab URL (overrides `GITLAB_URL`) | |
103
+
104
+ ### Exit Codes
105
+
106
+ | Code | Meaning |
107
+ |---|---|
108
+ | `0` | Success |
109
+ | `80` | Authentication error |
110
+ | `81` | Not found |
111
+ | `82` | API error |
112
+ | `83` | Validation error |
113
+ | `84` | Configuration error |
114
+
115
+ ## License
116
+
117
+ MIT -- see [LICENSE](LICENSE) for details.
@@ -1,8 +1,22 @@
1
1
  [project]
2
2
  name = "qodev-gitlab-cli"
3
- version = "0.1.1"
3
+ version = "0.2.0"
4
4
  description = "Agent-friendly CLI for the GitLab API"
5
+ readme = "README.md"
5
6
  requires-python = ">=3.11"
7
+ authors = [{ name = "Jan Scheffler", email = "jan.scheffler@qodev.ai" }]
8
+ license = { text = "MIT" }
9
+ keywords = ["gitlab", "cli", "api", "devops"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ "Programming Language :: Python :: 3.13",
18
+ "Typing :: Typed",
19
+ ]
6
20
  dependencies = [
7
21
  "cyclopts>=3.0",
8
22
  "rich>=13.0",
@@ -18,6 +32,7 @@ qodev-gitlab = "qodev_gitlab_cli.app:main"
18
32
  [project.urls]
19
33
  Homepage = "https://github.com/qodevai/gitlab-cli"
20
34
  Repository = "https://github.com/qodevai/gitlab-cli"
35
+ Issues = "https://github.com/qodevai/gitlab-cli/issues"
21
36
 
22
37
  [build-system]
23
38
  requires = ["hatchling"]
@@ -64,6 +64,7 @@ def create(
64
64
  from qodev_gitlab_cli.output import error
65
65
 
66
66
  error("Could not detect current branch. Use --source.", ctx=ctx)
67
+ return # unreachable, but helps mypy
67
68
 
68
69
  result = client.create_merge_request(
69
70
  project,
@@ -1,15 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: qodev-gitlab-cli
3
- Version: 0.1.1
4
- Summary: Agent-friendly CLI for the GitLab API
5
- Project-URL: Homepage, https://github.com/qodevai/gitlab-cli
6
- Project-URL: Repository, https://github.com/qodevai/gitlab-cli
7
- Requires-Python: >=3.11
8
- Requires-Dist: cyclopts>=3.0
9
- Requires-Dist: qodev-gitlab-api>=0.1.0
10
- Requires-Dist: rich>=13.0
11
- Provides-Extra: dev
12
- Requires-Dist: mypy>=1.13.0; extra == 'dev'
13
- Requires-Dist: pytest-mock>=3.15; extra == 'dev'
14
- Requires-Dist: pytest>=9.0; extra == 'dev'
15
- Requires-Dist: ruff>=0.15; extra == 'dev'