CLI
Command-line interface for MemoryKit. Full setup, memory management, and search from the terminal. Agent-friendly.
--json output, env vars, auto-confirm — built for AI agents and CI/CD.
Register, verify, create company, project, and API key — in one command.
Guided prompts when you run without flags. Skip them with --json.
Installation
Requires Node.js 18+.
Quick start
Set up everything in one command
The wizard walks you through: account registration → email verification → company creation → project creation → API key generation.
All credentials are saved to ~/.memorykit/ automatically.
Store a memory
Search
Two ways to authenticate
Option 1: Run memorykit init
The setup wizard handles everything and stores credentials in ~/.memorykit/credentials.json.
Option 2: Environment variables
Set MEMORYKIT_API_KEY and skip init entirely — useful for CI/CD and agents.
Environment variables take priority over stored credentials. This means you can override the stored API key per-command without modifying your config.
Global flags
Every command accepts these flags:
| Flag | Description |
|---|---|
--json | Machine-readable JSON output. Also auto-confirms destructive actions. |
--profile <name> | Named credential profile (default: "default"). |
JSON output
With --json, every command outputs a consistent envelope:
On error:
Profiles
Like AWS CLI, you can store multiple credential sets and switch between them:
Setup wizard
memorykit init
Full setup: register → verify → login → company → project → API key.
| Flag | Description |
|---|---|
--email | Account email |
--password | Account password |
--verification-code | 6-digit email verification code |
--company-name | Company name |
--company-slug | URL slug (auto-generated from name) |
--project-name | Project name |
--project-slug | URL slug (auto-generated from name) |
--apikey-name | API key name (default: "CLI Default") |
--gdpr-consent | Accept GDPR data processing consent |
--skip-register | Skip registration, login to existing account |
--base-url | API base URL override |
Email verification is optional during init. You can verify later with memorykit auth verify and then run memorykit init --skip-register to continue the setup.
Authentication
memorykit auth register
Create a new account.
memorykit auth verify
Verify your email with the 6-digit code.
memorykit auth login
Login and store JWT tokens.
memorykit auth logout
Clear stored credentials for the active profile.
Companies
memorykit company create
memorykit company list
Projects
memorykit project create
memorykit project list
API keys
memorykit apikey create
The API key (ctx_...) is displayed once and stored in your profile.
memorykit apikey list
memorykit apikey revoke
Memories
Create
| Flag | Description |
|---|---|
--content | Memory text content |
--title | Memory title |
--type | text, document, conversation, code (default: text) |
--tags | Comma-separated tags |
--user-id | Scope to a user |
--language | Content language (e.g., en, ru) |
--format | plain, markdown, html |
List
| Flag | Description |
|---|---|
--limit | Max results (default: 20) |
--cursor | Pagination cursor |
--status | Filter: pending, processing, completed, failed |
--type | Filter by type |
--user-id | Filter by user |
Get
Update
Delete
Upload
Upload PDF, DOCX, TXT, Markdown, and other file types as memories.
Search
| Flag | Description |
|---|---|
--query, -q | Search query |
--limit | Max results 1–100 (default: 10) |
--score-threshold | Minimum relevance score (0–1) |
--include-graph | Include knowledge graph data |
--user-id | Scope to a user |
Human-readable output:
Status
Check project usage and billing:
Configuration
| Key | Description |
|---|---|
baseUrl | API base URL |
defaultProfile | Default credential profile name |
Environment variables
| Variable | Description |
|---|---|
MEMORYKIT_API_KEY | API key for memory operations (overrides stored key) |
MEMORYKIT_BASE_URL | API base URL (overrides config) |
MEMORYKIT_CONFIG_DIR | Config directory path (default: ~/.memorykit) |
Agent and CI/CD usage
The CLI is designed to be used by AI agents and in automation pipelines.
Non-interactive setup
Using env vars (skip init)
Structured errors
When a required flag is missing in non-interactive mode, the CLI returns a structured error with the flag name:
Auto-confirm
--json automatically confirms destructive actions (delete, revoke) — no need to also pass --force.