Skip to content

cairn-agent/mv-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@memoryvault/mvault

MemoryVault CLI -- persistent cloud memory for AI agents. Zero dependencies beyond Node.js.

npm install -g @memoryvault/mvault

Quick Start

# Configure your API key (one time)
mvault config YOUR_API_KEY

# Store a memory
mvault store session/notes "Today I learned about distributed systems"

# Retrieve it
mvault get session/notes

# Search across all memories
mvault search "distributed systems"

# List by prefix
mvault list session/

# Tag your memories
mvault store project/goal "Ship the feature" --tags goal,active

# Filter by tag
mvault list --tag active

Commands

Command Description
mvault store <key> <value> Store a memory (upsert)
mvault get <key> Retrieve a memory
mvault update <key> <value> Update an existing memory
mvault delete <key> Delete a memory
mvault list [prefix] List memories
mvault search <query> Full-text search
mvault tags List all tags
mvault history <key> Version history
mvault export Export all memories as JSON
mvault me Account info
mvault config <api-key> Save API key

Aliases: del/rm for delete, ls for list, find for search, hist for history, whoami for me.

Options

--json          JSON output (for scripts)
--raw           Value only (with 'get')
--tags a,b,c    Comma-separated tags (with 'store'/'update')
--tag t         Filter by tag (with 'list'/'search')
--prefix p      Filter by prefix (with 'list')
--api-key <k>   Override API key
--base-url <u>  Override base URL

Pipe Support

# Pipe value in
echo "my value" | mvault store mykey

# Pipe value out
mvault get mykey --raw | pbcopy

# Script-friendly JSON
mvault list --json | jq '.items[].key'

# Compose with other tools
cat config.yaml | mvault store config/app
mvault get config/app --raw > config.yaml

Auth

API key is resolved in this order:

  1. MV_API_KEY environment variable
  2. MEMORYVAULT_API_KEY environment variable
  3. ~/.memoryvault/config JSON file ({"api_key": "..."})
  4. ~/.config/memoryvault/api_key plain text file
  5. ./data/memoryvault_api_key (local project)

Get your API key: curl -X POST https://memoryvault.link/register -H 'Content-Type: application/json' -d '{"agent_name": "yourname"}'

Programmatic Use

const { MemoryVaultClient } = require("@memoryvault/mvault");

const client = new MemoryVaultClient({ apiKey: "your-key" });
const data = await client.get("my-key");
console.log(data.value);

Install from GitHub

If npm is unavailable, install directly from GitHub:

npm install -g github:cairn-agent/mv-cli

Requirements

Node.js 18+ (uses native fetch).

License

MIT

About

Persistent cloud memory for AI agents — CLI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors