Metadata-Version: 2.4
Name: ign8google
Version: 0.2.0
Summary: Google Cloud integration for the ign8 ecosystem — manage API keys and other GCP resources from the CLI.
License: MIT
Keywords: google-cloud,gcp,api-keys,infrastructure,ign8
Author: Jakob Holst
Author-email: lyngknuden@gmail.com
Requires-Python: >=3.9
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Systems Administration
Provides-Extra: dev
Requires-Dist: google-auth (>=2.29)
Requires-Dist: google-cloud-api-keys (>=0.5)
Requires-Dist: google-cloud-billing (>=1.13)
Requires-Dist: google-cloud-resource-manager (>=1.12)
Requires-Dist: mypy (>=1.10) ; extra == "dev"
Requires-Dist: pydantic (>=2)
Requires-Dist: pydantic-settings (>=2)
Requires-Dist: pytest (>=8) ; extra == "dev"
Requires-Dist: rich (>=13)
Requires-Dist: ruff (>=0.4) ; extra == "dev"
Requires-Dist: textual (>=0.60)
Requires-Dist: typer (>=0.12)
Project-URL: Homepage, https://github.com/team-nine/ign8google
Project-URL: Repository, https://github.com/team-nine/ign8google
Description-Content-Type: text/markdown

# ign8google

Google Cloud integration for the [ign8](https://github.com/team-nine/ign8) ecosystem.
Manage GCP projects and API keys from the CLI or a full-screen TUI.

## Install

```bash
pip install ign8google
```

## Authenticate

`ign8google` uses Application Default Credentials. Authenticate once with:

```bash
gcloud auth application-default login
```

The caller needs the `roles/serviceusage.apiKeysAdmin` role (or equivalent) on the target project, and the `apikeys.googleapis.com` service must be enabled.

## Usage

### Pick a project

```bash
ign8google projects list
ign8google projects use my-gcp-project
# or create a new one
ign8google projects create my-gcp-project --billing AAAAAA-BBBBBB-CCCCCC --use
```

Selection persists to `.ign8google/state.json`. `IGN8_GOOGLE_PROJECT` in `.env` or `--project` on any command overrides it.

### Manage API keys

```bash
# Create a server-restricted key for Google Maps backend usage
ign8google keys create maps-server \
    --allow-ip 203.0.113.10 \
    --allow-ip 198.51.100.7 \
    --allow-api directions.googleapis.com \
    --allow-api distancematrix.googleapis.com \
    --allow-api geocoding-backend.googleapis.com \
    --write-env GOOGLE_MAPS_API_KEY_SERVER

ign8google keys list
ign8google keys show   maps-server
ign8google keys delete maps-server
```

### TUI

```bash
ign8google tui
```

Bindings:
- `↑/↓` move within the focused pane, `Tab` switches panes
- `Enter` on a project — load its keys
- `u` set the highlighted project as active
- `n` new (project or key, depending on focused pane), `e` edit key, `d` delete, `r` reveal key string
- `F5` refresh, `q` quit

