memories-cli

CLI reference and workflows for memories.sh — the persistent memory layer for AI agents. Use when: (1) Running memories CLI commands to add, search, edit, or manage memories, (2) Setting up memories.sh in a new project (memories init), (3) Generating AI tool config files (CLAUDE.md, .cursor/rules, etc.), (4) Importing existing rules from AI tools (memories ingest), (5) Managing cloud sync, embeddings, or git hooks, (6) Troubleshooting with memories doctor, (7) Working with memory templates, links, history, or tags.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "memories-cli" with this command: npx skills add charlesrhoward/memories-cli

memories-cli

CLI reference for @memories.sh/cli — manage memories, generate configs, and sync across tools.

The CLI is the primary way to interact with memories.sh. Use it to store memories, generate native config files, and manage your memory store. For environments where the CLI isn't available (v0, bolt.new, Lovable, or other browser-based agents), use the MCP server as a fallback.

Install & Init

npm install -g @memories.sh/cli   # or: npx @memories.sh/cli
memories init                      # Initialize in current project

memories init auto-detects AI tools (Claude Code, Cursor, Windsurf, VS Code) and configures MCP + generates instruction files.

Command Quick Reference

CommandPurpose
memories add <content>Store a memory
memories recallContext-aware memories for current project
memories search <query>Full-text search
memories listList memories with filters
memories edit <id>Edit content, type, or tags
memories forget <id>Soft-delete a memory
memories generateGenerate AI tool config files
memories promptGenerate a system prompt
memories serveStart MCP server

Core Workflows

1. New Project Setup

cd my-project
memories init              # Detect tools, configure MCP, generate files
memories add "Use pnpm" --type rule
memories add "Chose Supabase for auth" --type decision
memories generate          # Update all AI tool configs

2. Ingest Existing Rules

memories ingest claude     # Import from CLAUDE.md
memories ingest cursor     # Import from .cursorrules / .cursor/rules/
memories ingest copilot    # Import from copilot-instructions.md

3. Search & Recall

memories search "auth"                    # Full-text search
memories search "auth" --semantic         # Vector similarity (requires embeddings)
memories recall                           # Context for current project
memories list --type rule                 # Filter by type
memories list --tags api,auth             # Filter by tags

4. Generate Configs

memories generate                         # All detected tools
memories generate claude                  # Only CLAUDE.md
memories generate cursor                  # Only .cursor/rules/memories.mdc
memories diff                             # Preview changes before generating

Supported targets: claude, cursor, copilot, windsurf, cline, roo, gemini

5. Cloud Sync

memories login                            # Device code auth flow
memories sync                             # Sync local DB to cloud
memories files ingest                     # Upload config files
memories files apply --global --force     # Restore configs on new machine

6. Embeddings

memories embed                            # Generate embeddings for all memories
memories embed --dry-run                  # Preview what would be embedded
memories config model <model-name>        # Change embedding model

7. Maintenance

memories doctor                           # Diagnose issues
memories stats                            # Memory statistics
memories stale --days 90                  # Find stale memories
memories review                           # Interactive cleanup
memories validate                         # Check memory integrity

Memory Types

Use --type flag with add:

  • rulememories add "Always use strict mode" --type rule
  • decisionmemories add "Chose JWT for auth" --type decision
  • factmemories add "Rate limit: 100/min" --type fact
  • note — (default) memories add "Refactor auth module"

Scopes

  • project (default) — Scoped to current git repo
  • globalmemories add "Use TypeScript" --type rule --global

When using MCP instead of CLI commands (for example from browser tools or agents running outside the repo), use add_memory with project_id to force project scope.

Advanced Features

  • Templates: memories add --template decision — structured prompts for common patterns
  • Links: memories link <id1> <id2> --type supports — relate memories
  • History: memories history <id> / memories revert <id> --to <version>
  • Tags: memories tag <id> add api,auth
  • Export/Import: memories export > backup.yaml / memories import backup.yaml
  • Git Hooks: memories hook install — auto-generate on commit

Reference Files

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

vibe-coding-skills-installer

Install vibe coding skill sets (openspec, gstack, superpowers) for any supported agent platform (Cursor, Claude Code, Codex, etc.). Interactively asks about...

Registry SourceRecently Updated
Coding

基于课程内容说明生成图文并茂的的PPT

高校教师课程PPT生成技能。当老师需要制作教学内容课件、备课PPT、教学演示文稿、实验指导手册时触发。支持数据科学、大数据技术、Python编程、深度学习、机器学习、数据可视化等多个学科领域。触发词:课程PPT、制作课件、备课PPT、教学演示、实验指导。

Registry SourceRecently Updated
Coding

HSCIQ MCP - Customs Query

HS Code Lookup for Chinese Products. Query customs codes, tariff rates, declaration elements, and regulatory requirements via HSCIQ MCP API. Create classific...

Registry SourceRecently Updated
5140toucao
Coding

rust-engineer

Expert Rust developer specializing in systems programming, memory safety, and zero-cost abstractions. Masters ownership patterns, async programming, and perf...

Registry SourceRecently Updated