Architecture

Understand glci’s internal architecture — the mock GitLab API server, persistent runner, embedded registry, and Docker-in-Docker support.

Overview#

glci runs your .gitlab-ci.yml pipeline locally by placing a mock GitLab API server between the official gitlab-runner binary and your CI configuration. The runner believes it is talking to a real GitLab instance. Jobs execute in real containers with the same shell scripts, image pulls, and lifecycle that GitLab CI uses in production. The container engine can be either Docker or Podman, selected via [docker] engine (gitlab-runner keeps executor = "docker" in both cases).

The system has four main layers:

LayerComponentWhat it does
CLIglci run, glci show, TUIParses CI config, sends requests to daemon, renders output
DaemonBackground process (~/.glci/daemon.sock)Manages pipeline lifecycle, crash recovery, event streaming
Mock serverglci-mock containerImplements GitLab API, git HTTP, artifacts, cache, OCI registry
Runnerglci-runner containerOfficial gitlab-runner executing jobs in Docker containers

In this section#

Esc