Sync

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

2 min read

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

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

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
  3. Git integration — applies .gitignore rules based on gitTrackingMode setting
  4. Model download — downloads the configured embedding model if not installed locally
  5. Search index — rebuilds the semantic search index

Flags

FlagDescription
--forceForce overwrite existing files
--skillsSync skills only
--instructionsSync instruction files only
--modelDownload embedding model only
--platform <name>Sync specific platform (claude, gemini, copilot, agents)

Config Fields Used

Config fieldSync action
settings.platformsWhich platform dirs to sync skills/instructions to
settings.gitTrackingModeWhich .gitignore rules to apply
settings.semanticSearch.modelWhich embedding model to download
settings.semanticSearch.enabledWhether to download model and reindex
settings.autoSyncOnUpdateWhether to auto-sync skills on CLI version change

Git Tracking Modes

ModeBehavior
git-trackedAll .knowns/ content is committed. No gitignore rules added.
git-ignoredOnly config.json, docs/, and templates/ are committed. Tasks stay local.
noneNo gitignore changes. User manages manually.

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
  • knowns init — interactive wizard for first-time setup
  • knowns search --reindex — rebuild search index only
  • knowns model download <id> — download a specific model