Skip to main content

XGIC GitLab CLI

License PyPI Python Release CI

GitLab product commands for the modular XGIC CLI—ops under xgic gitlab ….

Namespace: xgic.cli.gitlab · Console group: xgic gitlab … · Brand: XGIC CLI only (ADR-0005)

Standards hub: xgic/ai · README standards


Vision

Self-managed GitLab operators need a stable, public-safe command surface for versioned ops— not a grab bag of one-off scripts. This module owns the GitLab product namespace under xgic. The GraphQL client library lives in gitlab-graphql; the Compose template and orchestration image producer live in gitlab and gitlab-dev.

One brand (xgic), clear ownership, and no private hosts or tracker IDs in the package.


Why this module exists

Benefit Detail
Domain clarity Nested under xgic gitlab—no clash with core or Payload commands
Composable stack Depends on xgic-cli; optional GraphQL extra when automation lands
Public-safe by design Endpoints via env/flags—never hard-coded private inventory
AI + human parity Same command map in README and AGENTS.md
Open-source rigor Apache-2.0, Python 3.14+, RC → TestPyPI → PyPI

Ecosystem

Package / repo Role
xgic/cli Thin core framework (xgic)
xgic/gitlab-graphql GraphQL client library
This repo GitLab product module (xgic.cli.gitlab)
xgic/gitlab-dev Orchestration image producer (ghcr.io/xgic/xgic-gitlab)
xgic/gitlab End-user Docker Compose template

Architecture: ADR-0001 · ADR-0005.


Quick start

Development (editable) — current primary path

uv pip install -e ../cli
uv pip install -e ".[dev]"
xgic gitlab --help
xgic gitlab info

Optional GraphQL extra (when GraphQL-backed commands ship):

uv pip install -e ".[graphql]"

Install (PyPI)

xgic-gitlab-cli 0.1.1 is on PyPI. Further cuts follow the hub python-package-release.md path (RC → TestPyPI → PyPI).

uv pip install "xgic-gitlab-cli"
xgic gitlab --help

Requirements

  • Python 3.14+
  • xgic-cli ≥ 0.2.2
  • Docker / Docker Compose for stack ops (health / backup / restore)

Console commands

All product commands nest under xgic gitlab:

Command Purpose
xgic gitlab info Module version and status (--json supported)
xgic gitlab health Compose service checks + optional HTTP /-/health
xgic gitlab backup gitlab-backup create, then one .tar.zst pair and a .sha256 sidecar
xgic gitlab restore Restore the latest verified pair, or --archive (--yes required)

Configuration (no private host defaults)

Setting Flag Environment
Compose file --compose-file XGIC_GITLAB_COMPOSE_FILE (default docker-compose.yml)
Project name --project XGIC_GITLAB_COMPOSE_PROJECT (default xgic-gitlab)
GitLab EE service --gitlab-service XGIC_GITLAB_EE_SERVICE (default gitlab-ee)
Orchestration service --xgic-service XGIC_GITLAB_ORCH_SERVICE (default xgic-gitlab)
Backup dir hint --backup-dir XGIC_GITLAB_BACKUP_DIR
GitLab URL --url GITLAB_URL (no default)
Token --token GITLAB_TOKEN (never logged)

Shared: --dry-run, --json.

Examples

# From a checked-out xgic/gitlab template directory
export GITLAB_URL=http://localhost:8929
xgic gitlab health --json
xgic gitlab backup \
  --secrets-file ./gitlab-secrets.json \
  --config-file ./gitlab.rb \
  --dry-run
xgic gitlab restore --dry-run
xgic gitlab restore --archive gitlab.tar.zst --dry-run
# after confirmation; destinations are optional and are not written during backup:
xgic gitlab restore \
  --archive gitlab.tar.zst \
  --secrets-dest ./restore/gitlab-secrets.json \
  --config-dest ./restore/gitlab.rb \
  --yes

xgic gitlab backup reads the live secrets and config files and does not write them back. The archive contains the GitLab backup tar, those two files, and backup-manifest.json. Registry, LFS, and packages are required unless --allow-missing names a component GitLab omitted. The manifest is a Pydantic model. Its restore_validation list records REST and GraphQL checks for a later validator. Restore compares a recorded product release with the running service before it extracts the archive. An archive with no recorded release is not a mismatch.

See docs/backup.md and docs/configuration.md.


Status

0.1.7. When --allow-missing includes registry, backup creation omits the container registry. LFS and packages stay required. TestPyPI 0.1.7rc1 passed smoke.

0.1.6. Pair creation copies the application tar in 1 MiB chunks, the same buffer the hash uses. The package depends on xgic-cli ≥ 0.2.2.

0.1.5. After gitlab-backup create, the newest application tar is copied into the landing directory when that directory is not the service volume. TestPyPI 0.1.5rc1 passed smoke. PyPI 0.1.4 leaves the tar inside the volume.


AI agent guidance

  • Use xgic gitlab … for product ops; do not hardcode private GitLab hostnames in public artifacts or committed examples.
  • Prefer fictional placeholders (https://gitlab.example.com) in docs and tests.
  • Destructive restore always needs --yes; start with --dry-run.
  • Follow hub public-safe rules before any public GitHub write.

Public safety

This package is public-safe only. Do not hardcode private GitLab hosts, internal inventory, or private tracker IDs. Operators configure endpoints via environment / flags.


Publishing

Follow python-package-release.md (publish after xgic-cli for stack releases). Tags: vX.Y.ZrcN → TestPyPI; vX.Y.Z → PyPI. The release milestone is titled X.Y.Z, matching the published version. Set it on every issue and pull request in that release. GitHub does not copy the issue milestone onto the pull request. The candidate and the final publish share it. Work tracking.


License

Apache License 2.0. See LICENSE and NOTICE.
Copyright form: Copyright 2026 XGIC.

Metadata

Release files for xgic-gitlab-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xgic-gitlab-cli 0.2.0
File Size Uploaded Provenance
xgic_gitlab_cli-0.2.0.tar.gz 27.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xgic-gitlab-cli 0.2.0
File Interpreter ABI Platform
xgic_gitlab_cli-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 61.8 kB

Release files / xgic_gitlab_cli-0.2.0.tar.gz

Download URL xgic_gitlab_cli-0.2.0.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e30db00f1f1bd93ef013692b2b51e720a9de51eb311c87b7410064121be3cccc
BLAKE2b-256 checksum
How to use checksums
a7c57246db492b67bca0efeb6e952c8c9b906ab29bfd349f8444d59ddf54cc3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / xgic_gitlab_cli-0.2.0-py3-none-any.whl

Download URL xgic_gitlab_cli-0.2.0-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d09cb43619c1507c7b5a0e3578a500303887fe86534dac8aadafd5897d4b07a
BLAKE2b-256 checksum
How to use checksums
ccf08efe75927ce560fe674ee9811d4386ce48150b17cd65732caf022ff56155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for xgic-gitlab-cli 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xgic_gitlab_cli-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page