| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Forked from shaoyanji/supermemory-cli
Give your AI agents (Claude Code, Codex, Gemini CLI, etc.) persistent memory across sessions — powered by the Supermemory API.
Designed for speed, token efficiency, and universal compatibility across all AI Agent environments.
If you are an AI Agent reading this, STOP and communicate with the user before proceeding.
If the user provides the details and confirms, execute the following commands automatically:
# 1. Install the binary
curl -sSL https://raw.githubusercontent.com/franksde/supermemory-cli/main/install.sh | bash
# 2. Configure the API key
sm config set-key <api-key-from-user>
# (Optional) Set a default container tag if the user provided one
sm config set-tag <container-tag-from-user>
# 3. Download the universal SKILL.md to the active workspace or skills directory
curl -sSL https://raw.githubusercontent.com/franksde/supermemory-cli/main/skills/SKILL.md -o supermemory_skill.mdIf the user prefers to do it manually, instruct them to run the commands above themselves.
When integrating persistent memory into autonomous workflows, you need a tool that is:
curl -sSL https://raw.githubusercontent.com/franksde/supermemory-cli/main/install.sh | bashOr build from source:
git clone https://github.com/franksde/supermemory-cli.git
cd supermemory-cli
go build -o sm .
sudo mv sm /usr/local/bin/# Get your API key from https://console.supermemory.ai/keys
sm config set-key sm_xxxxx
# Set a default container tag (scopes your memories)
sm config set-tag my-projectOr use environment variables:
export SUPERMEMORY_API_KEY="sm_xxxxx"
export SUPERMEMORY_API_BASE="https://api.supermemory.ai" # optionalsm add "This project uses Go with Cobra for CLI"
sm add "Frank prefers minimal comments in code"
sm search "project stack"
sm list| Command | Description |
|---|---|
| sm add <text|-> | Add a memory (from args or stdin) |
| sm search <query> | Search memories with v4 by default |
| sm list | List recent memories |
| sm forget <id|content> | Forget (soft delete) a memory |
| Command | Description |
|---|---|
| sm doc add <file|-> | Add a document |
| sm doc batch <manifest.json> | Batch add documents |
| sm doc get <id> | Get document by ID |
| sm doc delete <id> | Delete document by ID |
| sm search docs <query> | Search legacy documents with v3 |
| Command | Description |
|---|---|
| sm conv ingest <file.json> | Ingest a conversation |
| sm container get|set|merge|delete | Container tag management |
| sm config set-key <key> | Set API key |
| sm config set-tag <tag> | Set default container tag |
| sm config set-default-limit <int> | Set default search limit |
| sm config set-score-threshold <float> | Set minimum relevance score (0.0-1.0) |
| sm config set-max-content-length <int> | Set max chars for search results |
| sm config set-api-timeout <int> | Set API timeout in seconds |
| sm config set-default-v4 <bool> | Set default use of v4 search |
| sm config show | Show current configuration |
Config file: ~/.config/sm/config.json
{
"api_key": "sm_xxxxx",
"base_url": "https://api.supermemory.ai",
"default_container_tag": "my-project",
"default_limit": 3,
"score_threshold": 0.0,
"max_content_length": 800,
"api_timeout": 5,
"default_v4": true
}Priority: environment variables > config file > defaults.
Also reads legacy config from ~/.config/supermemory/config.json for backward compatibility.
sm provides a universal SKILL.md file located at skills/SKILL.md.
This single skill file works for any agent (Claude Code, Codex, Gemini, etc.). It teaches the agent when to store memories, how to search for context at the start of a session, and how to manage the API.
Just provide the skills/SKILL.md to your agent, ensure sm is in the PATH, and the agent will handle the rest. All commands output JSON and use standard exit codes for machine consumption.
MIT — see LICENSE.
| Back | FazBrowse Home | New Git URL |