Metadata-Version: 2.4
Name: agentforge-cli
Version: 0.2.0
Summary: Registry and trust layer for AI agent skills
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: pyyaml>=6.0

# agentforge (CLI: forge)

Registry and trust layer for AI agent skills. This package provides the **forge** command so you can create, inspect, publish, and install skills from the terminal.

## Install

```bash
pip install agentforge-cli
```

**If you need `forge auth login`** (GitHub login for publish) and your installed version doesn’t list an `auth` command, install from the repo so you get the latest CLI:

```bash
cd /path/to/AgentForge
pip install -e ./cli
forge auth login -r https://agentforgeprivate-production.up.railway.app
```

You can pass the registry URL with or without `https://` (e.g. `-r agentforgeprivate-production.up.railway.app` is normalized to `https://...`).

## Use

From any directory:

```bash
forge init              # scaffold a skill (skill.yaml + example code)
forge inspect           # show permissions and risk for the skill here
forge auth login -r URL # log in with GitHub (required before publish)
forge auth logout -r URL # clear saved login for a registry
forge publish -r URL   # publish to the registry (must be logged in)
forge search -r URL    # list skills
forge install <slug> -r URL  # record an install
```

**Publish requires GitHub login**  
Every skill is attached to a user. You must log in with GitHub once per registry:

```bash
forge auth login -r https://agentforgeprivate-production.up.railway.app
# Browser opens → authorize with GitHub → token is saved
forge publish -r https://your-backend.railway.app
```

**Registry URL (what `-r` is for)**  
The **registry** is the backend API that stores and serves skills. When you deploy the AgentForge backend (e.g. on Render or Railway), you get a URL like `https://agentforge-api.onrender.com`. That URL is your **registry URL**.

- **`forge publish`** sends your skill to that API so it appears on the website (explore skills + skill detail page) and in `forge search`. You must run **`forge auth login -r <URL>`** first.
- **`forge search`** and **`forge install`** read from that same API (no login required).

If you don't pass `-r`, the CLI defaults to `http://localhost:8000` (your own API running on your machine). For the **public** registry, pass its URL:

```bash
forge auth login -r https://agentforgeprivate-production.up.railway.app
forge publish -r https://agentforgeprivate-production.up.railway.app
forge search -r https://agentforgeprivate-production.up.railway.app
forge install send-email -r https://agentforgeprivate-production.up.railway.app
```

The registry for this project is **https://agentforgeprivate-production.up.railway.app** (Railway backend).

## Releasing a new version to PyPI

1. Bump **version** in `cli/pyproject.toml` (e.g. `0.2.0` → `0.2.1`).
2. From the repo root:
   ```bash
   pip install build twine
   cd cli && python -m build && python -m twine upload dist/*
   ```
3. Users get the update with `pip install --upgrade agentforge-cli`.

See the main repo **docs/DEPLOYMENT.md** (Part 1) for full steps and Test PyPI.

## Links

- [AgentForge](https://github.com/vince13/AgentForge) — repo and docs
