npm package: @stainlu/rlp-cli
Description: CLI tool to sync local skills to your RLP Agent Card
Latest version: 0.1.3

# RLP CLI

**Make your local AI agent discoverable to the world.**

Local AI agents like Claude Code, Codex, and Clawdbot have powerful skills but are invisible to others. Google's A2A (Agent-to-Agent) protocol defines `/.well-known/agent-card.json` for agent discovery, but local agents can't host their own files.

Faam solves this by hosting your agent card at `https://agent-<account_id>.faam.io/.well-known/agent-card.json`, making your local agent discoverable and monetizable.

## Installation

```bash
npm install -g @stainlu/rlp-cli

# or use npx directly
npx -p @stainlu/rlp-cli rlp <command>
```

## Quick Start

1. **Get your account key** from [Faam Dashboard](https://faam.io/partner/dashboard?tab=agent)

2. **Login with your key:**
   ```bash
   rlp login --key <your_account_key>
   ```

3. **Configure your agent:**
   ```bash
   rlp init
   rlp config set name "My AI Agent"
   rlp config set description "What my agent does"
   ```

4. **Sync your skills:**
   ```bash
   rlp sync-skills
   ```

5. **View your agent card:**
   ```
   https://agent-<your_account_id>.faam.io/.well-known/agent-card.json
   ```

## Commands

### `rlp login --key <account_key>`

Store your RLP account key locally.

```bash
rlp login --key abc123def456...
```

Options:
- `-k, --key <account_key>` - Your Faam account key (required)
- `--api-url <url>` - Custom API URL (default: https://rlp-worker.stainlu.workers.dev)

### `rlp logout`

Remove stored account key.

```bash
rlp logout
```

### `rlp init`

Create a template agent-card.json configuration file.

```bash
rlp init
```

Options:
- `-f, --force` - Overwrite existing config file

### `rlp config`

Manage agent-card.json configuration.

```bash
# Show all config values
rlp config show

# Get a specific value
rlp config get name

# Set a value
rlp config set name "My AI Agent"
rlp config set provider.organization "My Company"
rlp config set capabilities.streaming true

# Delete a value
rlp config delete icon_url

# List available config keys
rlp config list
```

### `rlp sync-skills`

Sync local skills and agent card configuration to Faam.

```bash
rlp sync-skills
```

Options:
- `-n, --dry-run` - Preview changes without syncing
- `-p, --path <directory>` - Custom skills directory path
- `--no-delete` - Don't delete remote skills that are not in local

### `rlp status`

Show current account and skills sync status.

```bash
rlp status
```

## Skills Discovery

The CLI automatically discovers skills from these locations:

1. `~/.claude/skills/*/SKILL.md` (Claude Code personal)
2. `.claude/skills/*/SKILL.md` (Claude Code project)
3. `~/.codex/skills/*/SKILL.md` (Codex personal)
4. `.codex/skills/*/SKILL.md` (Codex project)

### SKILL.md Format

Each skill should have a `SKILL.md` file with YAML frontmatter:

```yaml
---
name: my-skill
description: What this skill does
tags:
  - category
  - type
---

# My Skill

Detailed instructions for the skill...

## Example

```bash
example command
```
```

## Config Files

### Account Config (`~/.rlp/config.json`)

Stores your authentication credentials:

```json
{
  "account_key": "your_account_key",
  "account_id": "your_account_uuid",
  "api_url": "https://rlp-worker.stainlu.workers.dev"
}
```

### Agent Card Config (`~/.rlp/agent-card.json`)

Defines your agent card metadata. Create with `rlp init` or edit directly:

```json
{
  "name": "My AI Agent",
  "description": "An AI agent with custom skills",
  "version": "1.0.0",
  "provider": {
    "organization": "My Company",
    "url": "https://mycompany.com"
  },
  "capabilities": {
    "streaming": false,
    "push_notifications": false
  },
  "default_modes": {
    "input": ["text/plain", "application/json"],
    "output": ["text/plain", "application/json"]
  },
  "is_public": true,
  "skills": [
    {
      "id": "my-skill",
      "name": "My Skill",
      "description": "What this skill does",
      "tags": ["category"]
    }
  ]
}
```

Skills can be defined in agent-card.json OR as SKILL.md files. If a skill ID exists in both, the SKILL.md file takes precedence.

## License

MIT

---

## Optional: rlp-sync Skill for AI Agents

**This section is completely optional.** You can always run `npx -p @stainlu/rlp-cli rlp sync-skills` directly without any additional setup.

If you want your AI agent (Claude Code, Codex, Clawdbot, etc.) to automatically know how to sync skills when you say "sync my skills to Faam", you can install a helper skill:

1. Create `~/.claude/skills/rlp-sync/SKILL.md`:

```yaml
---
name: rlp-sync
description: Sync local skills to your Faam Agent Card
---

# Sync Skills to Faam

Run the RLP CLI to sync your local skills:

\`\`\`bash
npx -p @stainlu/rlp-cli rlp sync-skills
\`\`\`

If not logged in yet, ask the user for their account key and run:
\`\`\`bash
npx -p @stainlu/rlp-cli rlp login --key <ACCOUNT_KEY>
\`\`\`

Get your account key from: https://faam.io/partner/dashboard?tab=agent
```

2. Tell your agent: "sync my skills to Faam"

This is purely for convenience - the CLI works exactly the same whether or not you have this skill installed.