Metadata-Version: 2.4
Name: gjalla
Version: 0.5.0
Summary: Gjalla CLI — architecture guardrails for AI coding agents
License: Proprietary
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Quality Assurance
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: License :: Other/Proprietary License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: rich>=13.0
Requires-Dist: gitpython>=3.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic>=2.0
Requires-Dist: httpx>=0.25
Requires-Dist: pathspec>=0.11
Requires-Dist: sentry-sdk>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
Requires-Dist: vulture>=2.11; extra == "dev"
Dynamic: license-file

# Gjalla CLI

Architecture guardrails for AI coding agents.

## Installation

```bash
pip install gjalla
```

## Commands

| Command | Description |
|---------|-------------|
| `init` | Initialize gjalla in a repository (API key, project linking, guardrails, MCP) |
| `status` | Show configuration status |
| `setup` | Install attestation guardrails (hooks, scripts, agent guidance) |
| `check` | Validate commit attestation (used by pre-commit hook) |
| `attest` | Create commit attestation (interactive or programmatic) |
| `connect` | Link a Gjalla account and project to an existing local setup |
| `show` | Show cached project context (`rules`, `arch`, `state`, `capabilities`, `example`) |
| `sync` | Upload pending attestations to gjalla cloud and refresh cache |
| `mcp` | Manage MCP server integration (`mcp install`) |

---

## User Guide

### Initial Setup

```bash
gjalla init
```

Walks through a 7-step setup:
1. Check git repository
2. Configure API key (optional — skip for local-only mode)
3. Verify API key
4. Select project
5. Create `.gjalla/` project config
6. Install commit attestation guardrails
7. Install MCP server for Claude Code

Use `gjalla connect` later to link a project if you started in local-only mode.

### Daily Usage

**Automatic (via pre-commit hook):**
- `gjalla check` runs on each `git commit` and validates the attestation

**Manual / Agent workflow:**
```bash
git add <files>
gjalla attest            # interactive mode
git commit -m "message"
```

**Programmatic (for agents/scripts):**
```bash
gjalla attest \
  --staged-diff-hash $(git diff --staged | shasum -a 256 | cut -d' ' -f1) \
  --agent claude-code --provider anthropic --model claude-opus-4-6 \
  --summary "Added rate limiting to auth endpoints" \
  --rules '{"checked": true, "applicable": [...]}' \
  --arch-changes '{"architecture": {"elements": [...], ...}, "data_flows": {"changed": false}}'
```

### Viewing Project Context

```bash
gjalla show rules          # Project rules
gjalla show arch           # Architecture overview
gjalla show state          # Full cached state (JSON)
gjalla show capabilities   # Project capabilities
gjalla show example        # Attestation template
```

If the cache is stale, run `gjalla sync` to refresh it.

### Checking Status

```bash
gjalla status
```

Shows: git repo, global config, API key, project mapping, project config, guardrails, telemetry, attestation log.

### Configuration

**Global config:** `~/.gjalla/config.yaml`
```yaml
api_key: "your-api-key"
```

**Project config:** `.gjalla/config.yaml` (in repo root)

**Environment variables:**
- `GJALLA_API_KEY` — overrides config file API key

---

Requires Python >= 3.10. Questions or feedback: hello@gjalla.io
