Gjalla CLI — architecture guardrails for AI coding agents
Project description
Gjalla Pre-commit CLI
Pre-commit analysis CLI for validating changes against team rules.
Installation
pip install -e .
Commands
| Command | Description |
|---|---|
init |
Initialize gjalla in a repository |
commit |
Analyze staged changes before commit |
bypass |
Bypass analysis for a commit |
status |
Show current status |
hook |
Manage git hooks (install/uninstall) |
caps |
Show available capabilities |
sync |
Sync configuration |
auth |
Authentication management |
impact |
Show impact analysis |
mcp |
MCP server mode |
User Guide
Initial Setup
-
Configure API key:
gjalla init- Prompts for API key (or set
GJALLA_API_KEYenv var) - Discovers available projects from API
- Links current repository to a project
- Prompts for API key (or set
-
Install pre-commit hook (optional):
gjalla hook install
Daily Usage
Automatic (via pre-commit hook):
- Hook runs
gjalla commitautomatically on eachgit commit - Blocks commit if violations are found
Manual:
git add <files>
gjalla commit
git commit -m "message"
Analysis Flow
When gjalla commit runs:
- Opens WebSocket connection to analysis service
- Sends staged changes for analysis
- Executes tool calls from the service (file reads, searches)
- Displays results: violations, warnings, suggestions
- Stores analysis receipt on successful analysis
Reading Output
- Violations (red): Must fix before commit proceeds
- Warnings (yellow): Should review, won't block commit
- Suggestions (blue): Optional improvements
- Receipt: Analysis ID stored for audit trail
Bypassing Analysis
When you need to skip analysis:
gjalla bypass -m "reason for bypass"
git commit -m "message"
Logs bypass with timestamp and reason.
Checking Status
gjalla status
Shows: project linkage, hook status, last analysis receipt.
Hook Management
gjalla hook install # Install pre-commit hook
gjalla hook uninstall # Remove pre-commit hook
gjalla hook status # Check hook installation
Configuration
Global config: ~/.gjalla/config.yaml
api_key: "your-api-key"
api_url: "https://api.gjalla.io"
projects:
/path/to/repo: "project-id"
Project config: .gjalla.yaml (in repo root)
- Project-specific rules and settings
Environment variables:
GJALLA_API_KEY- Overrides config file api_keyGJALLA_API_URL- Overrides config file api_url
Development Guide
Setup
git clone <repo-url>
cd gjalla-precommit
python3 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
pre-commit install # Install hooks after cloning
Running Tests
python3 -m pytest tests/ -v
Project Structure
gjalla_precommit/
cli.py # Entry point, command group
commands/ # CLI command implementations
init.py # gjalla init
commit.py # gjalla commit
bypass.py # gjalla bypass
status.py # gjalla status
hook.py # gjalla hook install/uninstall
caps.py # gjalla caps
sync.py # gjalla sync
auth.py # gjalla auth
impact.py # gjalla impact
mcp.py # gjalla mcp
config/ # Configuration management
settings.py # Settings loading, config paths
protocol/ # WebSocket protocol handling
display/ # Terminal output formatting (rich)
tools/ # Tool implementations for analysis
tests/ # Test suite
Dependencies
click- CLI frameworkrich- Terminal formattingwebsockets- WebSocket clientgitpython- Git operationspyyaml- Config file parsingpydantic- Settings validationhttpx- HTTP clientpathspec- Gitignore-style pattern matching
Dev Dependencies
pytest- Test runnerpytest-asyncio- Async test support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gjalla-0.4.20.tar.gz.
File metadata
- Download URL: gjalla-0.4.20.tar.gz
- Upload date:
- Size: 99.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89660a209374d8f94e3fa60041d6ca4670e3daafb2fad73c316be609a877f011
|
|
| MD5 |
8661a412ddebe18e633d62ca4c915659
|
|
| BLAKE2b-256 |
4ebb10cc2d0d6ab759499c0d306486d7a4c4d5849dfa74f317230d8db8e76192
|
Provenance
The following attestation bundles were made for gjalla-0.4.20.tar.gz:
Publisher:
ci-publish.yml on elliemdaw/gjalla-precommit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gjalla-0.4.20.tar.gz -
Subject digest:
89660a209374d8f94e3fa60041d6ca4670e3daafb2fad73c316be609a877f011 - Sigstore transparency entry: 963068375
- Sigstore integration time:
-
Permalink:
elliemdaw/gjalla-precommit@a3183f211716febf24b4c61f8263ad81dc652dfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/elliemdaw
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-publish.yml@a3183f211716febf24b4c61f8263ad81dc652dfb -
Trigger Event:
push
-
Statement type:
File details
Details for the file gjalla-0.4.20-py3-none-any.whl.
File metadata
- Download URL: gjalla-0.4.20-py3-none-any.whl
- Upload date:
- Size: 71.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fceae2060a68accfc156e14d5b3198603edc7f154b6a85734ff229a9b769916
|
|
| MD5 |
c4595065fdcba2b3b6ad66ce1b8bf5b0
|
|
| BLAKE2b-256 |
f01cb2bd23255e7a852010b978ae9d81dda80965a84ee56458e0bf9886d85d69
|
Provenance
The following attestation bundles were made for gjalla-0.4.20-py3-none-any.whl:
Publisher:
ci-publish.yml on elliemdaw/gjalla-precommit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gjalla-0.4.20-py3-none-any.whl -
Subject digest:
3fceae2060a68accfc156e14d5b3198603edc7f154b6a85734ff229a9b769916 - Sigstore transparency entry: 963068377
- Sigstore integration time:
-
Permalink:
elliemdaw/gjalla-precommit@a3183f211716febf24b4c61f8263ad81dc652dfb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/elliemdaw
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-publish.yml@a3183f211716febf24b4c61f8263ad81dc652dfb -
Trigger Event:
push
-
Statement type: