# Sync

Apply project config after cloning — skills, instructions, models, and search index

# [Sync](https://knowns.sh/docs/sync#sync)

`knowns sync` reads `.knowns/config.json` and applies all settings locally. This is the recommended command after cloning a repo that uses Knowns.

## [Quick Start](https://knowns.sh/docs/sync#quick-start)

```
git clone <repo>
knowns sync        # sets up everything from config.json
```

## [What It Does](https://knowns.sh/docs/sync#what-it-does)

1. **Skills** — copies built-in skills to platform directories (`.claude/skills/`, `.agent/skills/`, `.kiro/skills/`)
2. **Instructions** — generates agent instruction files (KNOWNS.md, CLAUDE.md, AGENTS.md, etc.) for configured platforms. Always overwrites to stay in sync with templates.
3. **Git integration** — applies `.gitignore` rules based on `gitTrackingMode` setting
4. **Model download** — downloads the configured embedding model if not installed locally
5. **Import sync** — syncs git-based imports
6. **Search index** — rebuilds the semantic search index
7. **MCP configs** — syncs MCP config files to use the local binary

## [Flags](https://knowns.sh/docs/sync#flags)

| Flag | Description |
| --- | --- |
| `--skills` | Sync skills only |
| `--instructions` | Sync instruction files only |
| `--model` | Download embedding model only |
| `--platform <name>` | Sync specific platform (claude, gemini, copilot, agents) |

## [Config Fields Used](https://knowns.sh/docs/sync#config-fields-used)

| Config field | Sync action |
| --- | --- |
| `settings.platforms` | Which platform dirs to sync skills/instructions to |
| `settings.gitTrackingMode` | Which `.gitignore` rules to apply |
| `settings.semanticSearch.model` | Which embedding model to download |
| `settings.semanticSearch.enabled` | Whether to download model and reindex |
| `settings.autoSyncOnUpdate` | Whether to auto-sync skills on CLI version change |

## [Git Tracking Modes](https://knowns.sh/docs/sync#git-tracking-modes)

| Mode | Behavior |
| --- | --- |
| `git-tracked` | All `.knowns/` content is committed. No gitignore rules added. |
| `git-ignored` | Only `config.json`, `docs/`, and `templates/` are committed. Tasks stay local. |
| `none` | No gitignore changes. User manages manually. |

## [Auto-Setup Warning](https://knowns.sh/docs/sync#auto-setup-warning)

When running any `knowns` command in a project where semantic search is configured but the model is not installed, a warning is shown:

```
⚠ This project uses semantic search but the embedding model is not installed locally.
  Model: GTE Small (gte-small, ~67MB)

Run: knowns sync
```

## [Related](https://knowns.sh/docs/sync#related)

- `knowns init` — interactive wizard for first-time setup
- `knowns search --reindex` — rebuild search index only
- `knowns model download <id>` — download a specific model

[Configuration

Configure Knowns CLI for your project](https://knowns.sh/docs/configuration) [Validate

Check tasks, docs, and templates for quality and reference integrity](https://knowns.sh/docs/validate)

### On this page

[Sync](https://knowns.sh/docs/sync#sync) [Quick Start](https://knowns.sh/docs/sync#quick-start) [What It Does](https://knowns.sh/docs/sync#what-it-does) [Flags](https://knowns.sh/docs/sync#flags) [Config Fields Used](https://knowns.sh/docs/sync#config-fields-used) [Git Tracking Modes](https://knowns.sh/docs/sync#git-tracking-modes) [Auto-Setup Warning](https://knowns.sh/docs/sync#auto-setup-warning) [Related](https://knowns.sh/docs/sync#related)

Knowns v0.20.5
