Metadata-Version: 2.5
Name: mforge
Version: 0.1.2
Summary: Sync issues and pull requests from your git forges into a local store, then browse and manage them offline from the CLI or an interactive TUI.
Project-URL: Homepage, https://codeberg.org/fleax/mforge
Project-URL: Issues, https://codeberg.org/fleax/mforge/issues
Author-email: fleax <ybonatakis@proton.me>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: fastapi>=0.141.1
Requires-Dist: httpx>=0.28.1
Requires-Dist: keyring>=25.7.0
Requires-Dist: pydantic-settings>=2.14.2
Requires-Dist: textual>=8.2.8
Requires-Dist: typer>=0.27.1
Description-Content-Type: text/markdown

# mforge

![Status: WIP](https://img.shields.io/badge/status-WIP-orange)
![License: GPL--3.0--or--later](https://img.shields.io/badge/license-GPL--3.0--or--later-blue)

> **Work in progress.** Early development — several commands listed below are not
> implemented yet, and the CLI surface may change without notice between releases.

Sync issues and pull requests from your git forges into a local store, then browse
and manage them offline from the CLI or an interactive TUI.

mforge keeps a local SQLite mirror of the repositories you care about. Once synced,
listing and reading issues and pull requests needs no network round-trip — useful on
a slow connection, on a plane, or when you simply do not want to wait on a web UI.

## Install

```bash
uv tool install mforge
```

or with pip:

```bash
pip install mforge
```

Requires Python 3.13 or newer.

## Authentication

mforge reads your forge token from the OS keyring, falling back to environment
variables when no keyring entry is present (headless machines, CI).

Store it in the keyring under service `mforge`:

```bash
keyring set mforge github
```

Or export it instead:

```bash
export GH_TOKEN="your-token"      # or MFORGE_GITHUB_TOKEN
```

GitHub is currently the only implemented provider.

## Quick start

```bash
mforge repo add owner/name       # track a repository
mforge sync                      # pull issues and PRs into the local store
mforge issues all                # list what you fetched
mforge ui                        # browse everything in the TUI
```

## Commands

### Top level

| Command | Description |
| --- | --- |
| `mforge sync [SLUG]` | Sync all tracked repositories, or just `SLUG` |
| `mforge ui` | Open the interactive TUI |
| `mforge version` | Print the installed version |

### Repositories

| Command | Description |
| --- | --- |
| `mforge repo add SLUG [--provider-key github]` | Track a repository |
| `mforge repo list [--provider-key KEY]` | List tracked repositories |
| `mforge repo remove REPO` | Stop tracking a repository |

### Issues

Not implemented yet.

### Pull requests

| Command | Description |
| --- | --- |
| `mforge pr list` | List stored pull requests |

## Global options

| Option | Description |
| --- | --- |
| `--db PATH` | Path to the SQLite store (default `mforge.db`) |

The database location resolves as `--db` > `DB_PATH` in `.env` > `mforge.db` in the
working directory.

## License

GPL-3.0-or-later. See [LICENSE](LICENSE).
