Skip to content

Commit ef1a5b6

Browse files
jschfflrclaude
andcommitted
chore: release v0.2.0 — improve docs, packaging, and metadata
- Create README with commands reference, configuration, and examples - Add MIT LICENSE (Copyright 2026 qodev GmbH) - Update pyproject.toml with readme, authors, license, keywords, classifiers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fe8fbff commit ef1a5b6

3 files changed

Lines changed: 154 additions & 1 deletion

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

pyproject.toml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
[project]
22
name = "qodev-gitlab-cli"
3-
version = "0.1.3"
3+
version = "0.2.0"
44
description = "Agent-friendly CLI for the GitLab API"
5+
readme = "README.md"
56
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+
]
620
dependencies = [
721
"cyclopts>=3.0",
822
"rich>=13.0",
@@ -18,6 +32,7 @@ qodev-gitlab = "qodev_gitlab_cli.app:main"
1832
[project.urls]
1933
Homepage = "https://github.com/qodevai/gitlab-cli"
2034
Repository = "https://github.com/qodevai/gitlab-cli"
35+
Issues = "https://github.com/qodevai/gitlab-cli/issues"
2136

2237
[build-system]
2338
requires = ["hatchling"]

0 commit comments

Comments
 (0)