migrate

A command that moves a project’s .gnosys memory store to another directory and updates its project identity.

In plain words
What is it for?
Use it for interactive or non-interactive project moves, with an optional new project name and confirmation-free mode.
Why use it?
It helps preserve the project’s stored memories when the project location changes, while offering choices about syncing and removing the old store.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/proticom/gnosys/migrate
Clone the repo
git clone --depth 1 https://github.com/proticom/gnosys
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 495 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00495
Opus 5 $0.00000 $0.00247
Sonnet 5 $0.00000 $0.00099
Haiku 4.5 $0.00000 $0.00049

Measured 2d ago against content hash 0ff941ba2721, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migrate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/migrate.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gnosys migrate

Interactively migrate a .gnosys/ store to a new directory. Moves files, updates project identity, optionally syncs to the central DB, and can remove the old store.

Usage

gnosys migrate
gnosys migrate --from /old/project --to /new/project --name "New Project" --yes

Options

Option Description
--from <dir> Source directory containing .gnosys/ (skips prompt)
--to <dir> Target directory where .gnosys/ should live (skips prompt)
--name <name> New project name (skips prompt; default: basename of target)
--yes Skip all confirmation prompts (non-interactive mode)

Interactive flow

  1. Resolve source directory (auto-detect from cwd or prompt).
  2. Verify .gnosys/ exists and show memory file count.
  3. Resolve target directory and project name.
  4. Ask whether to sync memories to central DB and delete the old store (defaults yes).
  5. Show summary and confirm before proceeding.

With --yes, sync and delete default to yes; name defaults to target basename.

Behavior

  • Validates source store via readProjectIdentity and markdown glob under .gnosys/.
  • Opens central DB when available via GnosysDB.openCentral().
  • Runs migrateProject({ sourcePath, targetPath, newName, deleteSource, centralDb }).
  • Optionally syncs markdown memories with syncMemoryToDb after migration.
  • Closes readline and central DB in finally, including error paths.

Output

Migration progress, copied file count, new project identity, central DB status, sync count, and completion message.

Errors

Missing source/target, missing .gnosys/, migration failures, or sync errors print Migration failed: ... and exit with code 1.

Validation

cd gnosys-public
npm run cli -- migrate --help
npx vitest run src/test/migrate-command-handler.test.ts
  • gnosys projects — verify registered projects after migration.
  • gnosys setup remote sync — remote sync after local migration.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 59 lines · 0 tokens per session scan A 0ff941ba2721

Subscribe to this mod's changes

migrate is a command published in the GitHub repository proticom/gnosys (4 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 495 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.