CLI

larkx init

Initialize a project for indexing.

Usage

bash
larkx init

What it does

  1. Creates .larkx/ with empty data files
  2. Adds .larkx to .gitignore
  3. Prompts: "Set up MCP server?", creates .mcp.json
  4. Prompts: "Which AI agents do you use?", creates per-agent instruction files
  5. If Claude Code is selected, adds UserPromptSubmit hook to .claude/settings.json
  6. Saves your agent choices to .larkx/config.json so larkx index can keep the files up to date automatically

Agent files are not committed

Agent instruction files (CLAUDE.md, .cursorrules, AGENTS.md, GEMINI.md, .github/copilot-instructions.md) are gitignored. Each developer runs larkx init once to generate them locally. larkx index keeps them up to date automatically on every run.

Idempotent

Re-running on an initialized project prints a warning and exits without overwriting anything.

Related

  • larkx setup-agents, re-run just the agent file wizard
  • larkx index, next step after init