> ## Documentation Index
> Fetch the complete documentation index at: https://simili.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Learn Command

> CLI reference for the learn command

# Learn Command

The `learn` command allows Simili Bot to "understand" what a repository is responsible for by indexing its documentation (README, ARCHITECTURE.md, etc.). This information is used for **semantic routing** in multi-repository setups.

## Syntax

```bash theme={null}
simili learn --org ORG --repo REPO [OPTIONS]
```

## Options

| Option      | Short | Type   | Description                     | Default               |
| ----------- | ----- | ------ | ------------------------------- | --------------------- |
| `--org`     |       | string | Organization name (Required)    | -                     |
| `--repo`    |       | string | Repository name (Required)      | -                     |
| `--file`    | `-f`  | string | File path to learn              | `README.md`           |
| `--token`   |       | string | GitHub token override           | `GITHUB_TOKEN`        |
| `--dry-run` |       | bool   | Simulate without writing to VDB | `false`               |
| `--config`  | `-c`  | file   | Path to configuration file      | `.github/simili.yaml` |

## How it Works

1. **Fetch**: Fetches the specified file from the repository via the GitHub API.
2. **Embed**: Generates a high-dimensional vector embedding of the file content.
3. **Index**: Stores the embedding and content in the `transfer.repo_collection` (default: `simili_repos`) in Qdrant.

## Examples

### Index a README

Index the main README of the backend repository to improve routing accuracy.

```bash theme={null}
simili learn --org my-org --repo backend --file README.md
```

### Index Architecture Docs

Give the bot a deeper understanding of a repository's architecture.

```bash theme={null}
simili learn --org my-org --repo core-engine --file docs/ARCHITECTURE.md
```

### Dry Run

Verify what would be indexed without making any changes.

```bash theme={null}
simili learn --org my-org --repo api-service --file README.md --dry-run
```

***

## Why use `learn`?

Semantic routing allows Simili Bot to route issues correctly even for repositories with zero historical issues (the "cold start" problem). By learning the documentation, the bot can match the intent of an issue against the declared purpose of a repository.

## Next Steps

<CardGroup cols={2}>
  <Card title="Issue Routing" href="/guides/issue-routing">
    Learn how semantic routing works.
  </Card>

  <Card title="Transfer Rules" href="/configuration/transfer-rules">
    Configure rule-based routing.
  </Card>
</CardGroup>
