Metadata-Version: 2.5
Name: gl-pipeline-watcher
Version: 0.1.3
Summary: Terminal UI that shows GitLab CI pipelines
Project-URL: Repository, https://gitlab.com/alexandra.tapkova/gl-pipeline-watcher
Author-email: Alexandra Ťapková <git@ouppy.space>
License: AGPL-3.0-or-later
Keywords: ci,curses,devops,gitlab,pipeline,tui
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console :: Curses
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# gl-pipeline-watcher

A terminal UI that shows GitLab CI pipelines for one branch. For each pipeline, it shows:

- the pipeline status
- the status of each job
- the last log lines of each running or failed job
- the Docker build progress of each running or failed job

## Install

```
pip install gl-pipeline-watcher
```

The tool uses only the Python standard library.

## Usage

Run the tool in a git repository:

```
wp [branch]
```

If you do not give a branch, the tool uses the current branch. The tool reads the GitLab URL and the project path from `git remote get-url origin`. SSH remotes (`git@host:group/repo`) and HTTPS remotes both work.

## Token setup

You need a GitLab personal access token with the `read_api` scope. Use one of these two methods:

1. **One host:** Set the `GITLAB_TOKEN` environment variable.
2. **More than one host:** Create the file `~/.config/gitlab-pipeline-tokens.json`. Each key is a hostname. Each value is the path to a file that contains the token for that host:

   ```json
   {
     "gitlab.example.com": "/path/to/token-file"
   }
   ```

If you set `GITLAB_TOKEN`, the tool ignores the token file.

## Environment variables

| Variable | Default | Description |
|---|---|---|
| `GITLAB_TOKEN` | | Token. This variable has priority over the token file. |
| `GITLAB_URL` | From the git remote | Base URL, for example `https://gitlab.com`. |
| `GITLAB_PROJECT` | From the git remote | Project path, for example `mygroup/myrepo`. |
| `REFRESH` | `10` | Time between polls, in seconds. |
| `LOG_LINES` | `5` | Number of log lines to show for each running or failed job. |

## Keys

| Key | Action |
|---|---|
| `j` / `k`, arrow keys | Scroll one line. |
| `PgUp` / `PgDn` | Scroll one page. |
| `Home` / `End` | Go to the top or the bottom. |
| `r` | Refresh now. |
| `q`, `Esc` | Quit. |

## License

AGPL-3.0-or-later
