ZERO-DEPENDENCY AI CONTINUITY CLI

Switch between Claude and Antigravity without losing your place.

Every AI coding tool locks chat history inside its own app. Harnica keeps your active memory, shared skills, and automatic handoff hooks right inside your repository—so switching tools mid-task feels seamless.

npx harnica init
View on GitHub →
  • 0 runtime dependencies
  • Node 20+ built-ins only
  • <80 lines rolling state
  • MIT open source

THE CORE PRINCIPLE

Your repository owns the memory—never private chat transcripts.

CLAUDE CODE

Reads & enforces handoff

.claude/settings.json injects STATUS.md at session start and nudges Claude if code changed without updating your handoff.

SHARED IN GIT

STATUS.md & .agents/skills/

One concise working memory file (<80 lines, last 5 session entries) plus a single skills directory symlinked across both harnesses.

ANTIGRAVITY

Picks up automatically

.agents/hooks.json injects the exact handoff and uncommitted git status into Antigravity’s SessionStart context.

HOW IT WORKS

Up and running in one command.

  1. 01

    Initialize your project

    Run npx harnica init in any Git repository. Harnica safely creates STATUS.md, appends a compact block to AGENTS.md, links CLAUDE.md, symlinks .claude/skills, and wires both hook files without overwriting your existing settings.

  2. 02

    Work naturally in either tool

    When you finish editing code, the Stop hook checks whether STATUS.md was updated in the last 3 minutes. If not, it asks the assistant to record what changed and what comes next.

  3. 03

    Switch harnesses mid-task

    Open the same folder in Antigravity or Claude Code. The SessionStart hook automatically loads STATUS.md and git status -sb so you never repeat context or re-explain dead ends.

CLI REFERENCE

Four commands, zero bloat.

Command Purpose
npx harnica init Idempotently scaffold STATUS.md, rules, skill symlink, and dual hooks.
npx harnica status Print STATUS.md, git status -sb, and line/log budget health.
npx harnica log “…” Prepend a timestamped session log entry and automatically trim to the 5 newest.
npx harnica sync Verify and repair drifted hooks, symlinks, or AGENTS.md continuity blocks.

Using Claude Desktop (Chat mode)?

Paste this two-line Project Custom Instruction in Claude Desktop so GUI chats share the exact same handoff file:

At the start of every conversation, read AGENTS.md and STATUS.md in the project root. Before finishing any task that changes files or decisions, update STATUS.md following its format.

FREQUENTLY ASKED QUESTIONS

Everything you need to know.

How does Harnica share context between Claude Code and Antigravity?
Harnica stores your active task, next steps, and last five session notes in a single STATUS.md file inside your repository, then wires automatic SessionStart and Stop hooks for both Claude Code and Antigravity. When you switch tools, the new assistant reads STATUS.md and git status immediately.
Does Harnica send my code or notes to an external server?
No. Harnica is 100% local, open-source, and zero-dependency. Everything lives in plain Markdown and JSON files inside your own Git repository.
Does it work with Claude Desktop in Chat mode?
Yes. Because Claude Desktop’s Chat tab does not run local CLI hooks, Harnica provides a two-line Project Custom Instruction that tells Claude Desktop to read AGENTS.md and STATUS.md at the start of every chat and update STATUS.md before finishing.
Why does Harnica limit STATUS.md to 80 lines and 5 log entries?
Short, fresh handoffs keep token usage low and prevent stale notes from contradicting your codebase. Permanent history stays in Git commits and DECISIONS.md, while STATUS.md stays focused on what matters right now.