npm package: @ikhono/cli
Description: iKhono CLI — publish and manage AI skills
Latest version: 0.3.2

# @ikhono/cli

CLI for [iKhono](https://github.com/ikhono-ai/ikhono) — publish, manage, and discover AI agent skills.

## Install

```bash
npm install -g @ikhono/cli
```

Or run directly with npx:

```bash
npx @ikhono/cli <command>
```

## Commands

### `ikh login`

Authenticate with iKhono via GitHub SSO (default) or email/password.

```bash
ikh login                                              # GitHub SSO (opens browser)
ikh login --email you@example.com --password yourpass   # email/password alternative
```

| Flag | Required | Description |
|------|----------|-------------|
| `--email <email>` | No | Email (for email/password login) |
| `--password <password>` | No | Password (for email/password login) |
| `--api-url <url>` | No | Override API URL |

Saves your token and username to `~/.ikhono/config.json`.

### `ikh whoami`

Show the currently logged-in user.

```bash
ikh whoami
# @alice
```

### `ikh skill init`

Scaffold a new skill project with `skill.yaml`, `SKILL.md`, and platform-specific config files.

```bash
ikh skill init my-skill --platform claude
```

| Argument/Flag | Required | Default | Description |
|---------------|----------|---------|-------------|
| `[name]` | No | Current directory | Skill name (creates subdirectory) |
| `--platform <platform>` | No | `claude` | Target platform: claude, cursor, windsurf, copilot, codex |

### `ikh skill publish`

Publish a skill to the iKhono registry.

```bash
ikh skill publish
ikh skill publish --dir ./my-skill --changelog "Added error handling section"
```

| Flag | Required | Description |
|------|----------|-------------|
| `--dir <path>` | No | Path to skill directory (default: cwd) |
| `--changelog <text>` | No | Changelog for this version |

Reads `skill.yaml` and `SKILL.md` from the target directory and uploads to the API. Requires authentication.

### `ikh skill delete`

Delete a skill from iKhono.

```bash
ikh skill delete @alice/my-skill
ikh skill delete @alice/my-skill --yes  # skip confirmation
```

| Argument/Flag | Required | Description |
|---------------|----------|-------------|
| `<slug>` | Yes | Skill slug (e.g., `@alice/my-skill`) |
| `--yes` | No | Skip confirmation prompt |

### `ikh stats`

View usage stats for your skills.

```bash
ikh stats                    # all your skills
ikh stats @alice/my-skill    # specific skill
```

| Argument | Required | Description |
|----------|----------|-------------|
| `[slug]` | No | Specific skill slug |

Shows: rating, uses, pins, version, and categories.

### `ikh setup`

One-time setup that installs the iKhono MCP server config and a `/skill` slash command (or rules file) for your platform.

```bash
ikh setup --platform claude
ikh setup --platform cursor --proactive
ikh setup --platform claude --auto-approve --proactive
```

| Flag | Required | Description |
|------|----------|-------------|
| `--platform <platform>` | Yes | Target platform: claude, claude-desktop, cursor, windsurf, copilot, codex, gemini |
| `--auto-approve` | No | Auto-allow iKhono MCP tools without permission prompts (Claude Code only) |
| `--proactive` | No | Install an always-on rule that checks iKhono for relevant skills on every task |

**What it installs:**
- MCP server configuration in the platform's global config file
- `/skill` slash command (Claude) or rules/instructions file (other platforms) with MCP tool routing and usage guidance
- `--auto-approve`: adds iKhono MCP tools to the platform's allowed tools list (no permission prompts)
- `--proactive`: adds a rule that instructs the AI to automatically search iKhono for relevant skills before starting any task

**Supported platforms for `--proactive`:** claude, cursor, windsurf, copilot, codex, gemini (not claude-desktop).

**Supported platforms for `--auto-approve`:** claude only.

### `ikh update`

Manually update the CLI to the latest version.

```bash
ikh update
```

### `ikh auto-update`

Toggle automatic updates that run before each command.

```bash
ikh auto-update        # show current setting
ikh auto-update on     # enable
ikh auto-update off    # disable
```

## Configuration

Config is stored at `~/.ikhono/config.json`:

```json
{
  "apiUrl": "https://ikhono.io",
  "token": "your-auth-token",
  "username": "alice",
  "autoUpdate": true
}
```

Set on login. The MCP server (`@ikhono/mcp`) reads the same config file for authentication.

## Workflow

```
ikh login
ikh skill init my-skill --platform claude
cd my-skill
# edit skill.yaml and SKILL.md
ikh skill publish
ikh stats @you/my-skill
```

## Links

- [Getting Started](https://github.com/ikhono-ai/ikhono/blob/main/docs/getting-started.md)
- [Creating Skills](https://github.com/ikhono-ai/ikhono/blob/main/docs/creating-skills.md)
- [Skill Spec](https://github.com/ikhono-ai/ikhono/blob/main/docs/skill-spec.md)
- [GitHub](https://github.com/ikhono-ai/ikhono)

## License

MIT