@unifiedmemory/cli 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +148 -134
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
1
  # UnifiedMemory CLI (`um`)
2
2
 
3
- One-command setup for AI code assistant integration with UnifiedMemory.
3
+ [![npm version](https://badge.fury.io/js/@unifiedmemory%2Fcli.svg)](https://www.npmjs.com/package/@unifiedmemory/cli)
4
+ [![License: PROPRIETARY](https://img.shields.io/badge/License-PROPRIETARY-red.svg)](./LICENSE)
5
+ [![Node Version](https://img.shields.io/node/v/@unifiedmemory/cli)](https://nodejs.org)
6
+
7
+ Connect your AI code assistant to UnifiedMemory's knowledge vault with one command.
8
+
9
+ ## What is UnifiedMemory?
10
+
11
+ UnifiedMemory is an AI-powered knowledge management system that lets your code assistant remember context across all your projects. The `um` CLI connects your local AI tools (Claude Code, Cursor, Cline, etc.) to your UnifiedMemory vault so they can access and store project knowledge automatically.
4
12
 
5
13
  ## Quick Start
6
14
 
@@ -8,52 +16,59 @@ One-command setup for AI code assistant integration with UnifiedMemory.
8
16
  # Install globally
9
17
  npm install -g @unifiedmemory/cli
10
18
 
11
- # Or run directly with npx
19
+ # Or run directly with npx (no installation required)
12
20
  npx @unifiedmemory/cli init
13
21
 
14
22
  # In your project directory
23
+ cd your-project
15
24
  um init
16
25
  ```
17
26
 
18
- ## How It Works
27
+ That's it! Your AI assistant can now access UnifiedMemory.
28
+
29
+ ## What Does This Do?
30
+
31
+ When you run `um init` in your project:
19
32
 
20
- UnifiedMemory uses a **local MCP (Model Context Protocol) server** approach:
33
+ 1. **Authenticates you** - Opens your browser to sign in with UnifiedMemory (one-time)
34
+ 2. **Links your project** - Choose an existing project or create a new one in your vault
35
+ 3. **Configures AI tools** - Automatically detects and configures Claude Code, Cursor, Cline, Codex CLI, or Gemini CLI
36
+ 4. **Creates local config** - Adds a `.um/` folder to your project (auto-added to `.gitignore`)
21
37
 
22
- 1. **One-time authentication**: `um login` stores your credentials locally in `~/.um/auth.json`
23
- 2. **Project context**: `um init` creates `.um/config.json` in your project directory
24
- 3. **Local MCP server**: AI assistants spawn `um mcp serve` which:
25
- - Reads authentication from `~/.um/auth.json`
26
- - Auto-detects project context from `.um/config.json` in current directory
27
- - Forwards tool calls to UnifiedMemory API with proper authentication
28
- - Handles token refresh automatically
38
+ After setup, your AI assistant will automatically:
39
+ - Store important code context in your UnifiedMemory vault
40
+ - Retrieve relevant knowledge when working on similar problems
41
+ - Remember decisions and patterns across sessions
42
+ - Switch context automatically when you change projects
29
43
 
30
- This means:
31
- - ✅ No tokens stored in AI assistant configuration files
32
- - ✅ No re-authentication needed
33
- - ✅ Automatic project context detection based on directory
34
- - ✅ Works seamlessly across multiple projects
44
+ ## What Gets Created in Your Project?
35
45
 
36
- ## What does `um init` do?
46
+ ```
47
+ your-project/
48
+ ├── .um/
49
+ │ └── config.json # Project configuration (auto-ignored by git)
50
+ ├── .gitignore # Updated to exclude .um/
51
+ └── .mcp.json # MCP server config (Claude Code only)
52
+ ```
53
+
54
+ **Note**: Authentication tokens are stored securely in `~/.um/auth.json` on your machine, never in your project directory.
37
55
 
38
- 1. **Authenticates** you via OAuth (or uses saved session)
39
- 2. **Prompts** for project selection (create new or link existing)
40
- 3. **Creates** `.um/config.json` with org_id and project_id
41
- 4. **Configures** all detected AI tools to use local MCP server
42
- 5. **Ready to use** - just restart your AI assistant!
56
+ ## Supported AI Code Assistants
43
57
 
44
- ## Features
58
+ | Tool | Status | Configuration |
59
+ |------|--------|--------------|
60
+ | **Claude Code** | ✅ Fully Supported | Project-level `.mcp.json` |
61
+ | **Cursor** | ✅ Fully Supported | Global `~/.cursor/mcp.json` |
62
+ | **Cline** | ✅ Fully Supported | Global `~/.cline/mcp.json` |
63
+ | **Codex CLI** | ✅ Fully Supported | Global `~/.codex/config.toml` |
64
+ | **Gemini CLI** | ✅ Fully Supported | Global `~/.gemini/settings.json` |
45
65
 
46
- - OAuth 2.0 authentication with automatic token refresh
47
- - ✅ Auto-detect and configure AI code assistants
48
- - ✅ Local MCP server with secure token storage
49
- - ✅ Multi-project support with automatic context switching
50
- - ✅ Automatic .gitignore updates
51
- - ✅ Supports Claude Code, Cursor, Cline, Codex CLI, and Gemini CLI
66
+ The CLI automatically detects which tools you have installed and configures them for you.
52
67
 
53
68
  ## Commands
54
69
 
55
70
  ### `um init`
56
- Initialize UnifiedMemory in the current project (recommended).
71
+ Set up UnifiedMemory in your current project (recommended).
57
72
 
58
73
  ```bash
59
74
  um init # Interactive setup
@@ -61,160 +76,159 @@ um init --skip-configure # Skip AI tool configuration
61
76
  ```
62
77
 
63
78
  ### `um login`
64
- Authenticate with UnifiedMemory using OAuth. Opens browser for login.
79
+ Sign in to UnifiedMemory. Opens your browser for authentication.
65
80
 
66
81
  ```bash
67
82
  um login
68
83
  ```
69
84
 
70
- ### `um mcp serve`
71
- Start MCP server (used internally by AI assistants - you don't need to run this manually).
85
+ ### `um status`
86
+ Check your authentication status and see which project is configured.
72
87
 
73
88
  ```bash
74
- um mcp serve
89
+ um status
75
90
  ```
76
91
 
77
- ### `um status`
78
- Show authentication status, current organization, and project configuration.
92
+ **Example output:**
93
+ ```
94
+ 📋 UnifiedMemory Status
79
95
 
80
- ```bash
81
- um status
96
+ Authentication:
97
+ Status: Active
98
+ Email: you@example.com
99
+ Expires: 1/7/2026
100
+
101
+ Organization Context:
102
+ My Organization (my-org)
103
+ Role: admin
104
+
105
+ Project Configuration:
106
+ ✓ Configured: My Project (proj_xxx)
82
107
  ```
83
108
 
84
109
  ### `um org switch`
85
- Switch between organizations or personal account.
110
+ Switch between your organizations or personal account.
86
111
 
87
112
  ```bash
88
113
  um org switch
89
114
  ```
90
115
 
91
- ### `um project`
92
- Manage project configuration (coming soon).
116
+ ### `um note create`
117
+ Manually save a note to your vault (useful for capturing important context).
93
118
 
94
- ### `um configure`
95
- Configure AI code assistants (coming soon).
119
+ ```bash
120
+ um note create
121
+ ```
96
122
 
97
- ## Configuration
123
+ ### `um mcp serve`
124
+ Start the MCP server (used internally by AI assistants - you don't need to run this manually).
98
125
 
99
- ### Environment Variables
126
+ ## How It Works
100
127
 
101
- Create a `.env` file in the CLI directory:
128
+ UnifiedMemory uses the **Model Context Protocol (MCP)** to connect your AI assistant to your knowledge vault:
102
129
 
103
- ```env
104
- CLERK_CLIENT_ID=your_clerk_client_id
105
- CLERK_DOMAIN=clear-caiman-45.clerk.accounts.dev
106
- API_ENDPOINT=https://api.unifiedmemory.ai
107
- ```
130
+ 1. Your AI assistant calls `um mcp serve` in the background
131
+ 2. The local MCP server reads your authentication from `~/.um/auth.json`
132
+ 3. It detects which project you're in by looking for `.um/config.json`
133
+ 4. Tool requests from your AI flow through the server to UnifiedMemory's API
134
+ 5. Knowledge is stored and retrieved automatically based on context
108
135
 
109
- ### Project Configuration
136
+ **Security**:
137
+ - Authentication tokens are stored locally in your home directory, never in project files
138
+ - Tokens automatically refresh when they expire
139
+ - Each project directory has its own configuration
140
+ - The `.um/` folder is automatically added to `.gitignore`
110
141
 
111
- After running `um init`, a `.um/config.json` file is created:
142
+ ## Multi-Project Support
112
143
 
113
- ```json
114
- {
115
- "version": "1.0",
116
- "org_id": "org_xxx",
117
- "project_id": "proj_xxx",
118
- "project_name": "My Project",
119
- "api_url": "https://api.unifiedmemory.ai",
120
- "created_at": "2024-12-17T...",
121
- "mcp_config": {
122
- "inject_headers": true,
123
- "auto_context": true
124
- }
125
- }
126
- ```
144
+ Working on multiple projects? No problem!
127
145
 
128
- This file is automatically added to `.gitignore`.
146
+ ```bash
147
+ cd project-1
148
+ um init # Links to "Project 1" in UnifiedMemory
129
149
 
130
- ### AI Tool Configuration
150
+ cd ../project-2
151
+ um init # Links to "Project 2" in UnifiedMemory
152
+ ```
131
153
 
132
- The CLI automatically detects and configures:
154
+ The CLI automatically detects which project you're in and switches context. Your AI assistant will use the correct vault for each project.
133
155
 
134
- - **Claude Code**: `.mcp.json` (project-level)
135
- - **Cursor**: `~/.cursor/mcp.json`
136
- - **Cline**: `~/.cline/mcp.json`
137
- - **Codex CLI**: `~/.codex/config.toml` (TOML format)
138
- - **Gemini CLI**: `~/.gemini/settings.json`
156
+ ## Switching Organizations
139
157
 
140
- Example MCP configuration (JSON format):
158
+ If you're part of multiple teams:
141
159
 
142
- ```json
143
- {
144
- "mcpServers": {
145
- "vault": {
146
- "command": "um",
147
- "args": ["mcp", "serve"]
148
- }
149
- }
150
- }
160
+ ```bash
161
+ um org switch # Choose between organizations
151
162
  ```
152
163
 
153
- Example MCP configuration (TOML format for Codex):
164
+ All projects you create afterward will belong to the selected organization.
154
165
 
155
- ```toml
156
- [mcp_servers.vault]
157
- command = "um"
158
- args = ["mcp", "serve"]
159
- ```
166
+ ## Installation Options
160
167
 
161
- **Note**: No tokens are stored in configuration files. The local MCP server reads authentication from `~/.um/auth.json` and project context from `.um/config.json` automatically.
168
+ **Option 1: Global Install (recommended)**
169
+ ```bash
170
+ npm install -g @unifiedmemory/cli
171
+ um --version
172
+ ```
162
173
 
163
- ## Supported AI Tools
174
+ **Option 2: Use with npx (no installation)**
175
+ ```bash
176
+ npx @unifiedmemory/cli init
177
+ npx @unifiedmemory/cli status
178
+ ```
164
179
 
165
- | Tool | MCP Config | Auto-Detect | Config Format |
166
- |------|-----------|-------------|---------------|
167
- | Claude Code | ✅ | ✅ | JSON (project-level) |
168
- | Cursor | ✅ | ✅ | JSON |
169
- | Cline | ✅ | ✅ | JSON |
170
- | Codex CLI | ✅ | ✅ | TOML |
171
- | Gemini CLI | ✅ | ✅ | JSON |
180
+ **Option 3: Use with MCP directly**
172
181
 
173
- ## Development
182
+ Your AI assistant will call the MCP server automatically after running `um init`.
174
183
 
175
- ```bash
176
- # Clone the repository
177
- git clone https://github.com/unifiedmemory/um-cli.git
178
- cd um-cli
184
+ ## Requirements
179
185
 
180
- # Install dependencies
181
- npm install
186
+ - **Node.js**: Version 18.0.0 or higher
187
+ - **npm**: Latest version recommended
188
+ - **AI Code Assistant**: One of Claude Code, Cursor, Cline, Codex CLI, or Gemini CLI
189
+ - **UnifiedMemory Account**: Sign up at [unifiedmemory.ai](https://unifiedmemory.ai)
182
190
 
183
- # Run locally
184
- node index.js init
191
+ ## Troubleshooting
185
192
 
186
- # Build standalone binaries
187
- npm run build
193
+ ### "Not logged in" error
194
+ ```bash
195
+ um login
188
196
  ```
189
197
 
190
- ## Architecture
198
+ ### AI assistant not seeing UnifiedMemory tools
199
+ 1. Check status: `um status`
200
+ 2. Verify project is configured
201
+ 3. Restart your AI assistant
202
+ 4. Check the MCP configuration was created (`.mcp.json` or tool-specific config)
191
203
 
204
+ ### Wrong project/organization
205
+ ```bash
206
+ um org switch # Switch organization
207
+ cd your-project && um init # Reconfigure project
192
208
  ```
193
- AI Tool (Claude/Cursor/Cline/Codex/Gemini)
194
- stdio (JSON-RPC)
195
- um mcp serve (local MCP server)
196
- ├─ Reads ~/.um/auth.json (authentication)
197
- ├─ Reads .um/config.json (project context from cwd)
198
- ├─ Validates/refreshes token if expired
199
- ↓ HTTPS with auth headers
200
- Gateway: https://rose-asp-main-1c0b114.d2.zuplo.dev/mcp
201
- ↓ Forwards with signed headers
202
- Backend: vault-product
209
+
210
+ ### Token expired
211
+ Tokens automatically refresh. If you see auth errors:
212
+ ```bash
213
+ um login
203
214
  ```
204
215
 
205
- **Key Components**:
206
- - **Authentication**: Clerk OAuth 2.0 with PKCE flow + automatic token refresh
207
- - **Session Storage**: `~/.um/auth.json` (tokens with refresh capability)
208
- - **Project Config**: `.um/config.json` (per-directory context)
209
- - **Provider Detection**: Auto-detect 5 AI tools
210
- - **MCP Server**: stdio transport proxying to HTTP gateway
211
- - **Context Auto-Detection**: Project-aware based on working directory
216
+ ## Privacy & Security
212
217
 
213
- ## License
218
+ - **Local-first**: All authentication happens on your machine
219
+ - **Secure storage**: Tokens stored in `~/.um/auth.json` with proper file permissions
220
+ - **Auto-refresh**: Tokens refresh automatically before expiring
221
+ - **No git commits**: `.um/` is automatically added to `.gitignore`
222
+ - **Project isolation**: Each project has its own configuration and vault
223
+
224
+ ## Learn More
214
225
 
215
- MIT
226
+ - **Website**: [unifiedmemory.ai](https://unifiedmemory.ai)
227
+ - **Documentation**: [docs.unifiedmemory.ai](https://docs.unifiedmemory.ai)
228
+ - **Support**: [GitHub Issues](https://github.com/Episodic-Solutions/um-cli/issues)
229
+
230
+ ## License
216
231
 
217
- ## Support
232
+ PROPRIETARY - Copyright (c) 2024-2026 Episodic Solutions Limited. All rights reserved.
218
233
 
219
- - GitHub Issues: https://github.com/unifiedmemory/um-cli/issues
220
- - Documentation: https://docs.unifiedmemory.ai
234
+ See [LICENSE](./LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unifiedmemory/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "UnifiedMemory CLI - AI code assistant integration",
5
5
  "main": "index.js",
6
6
  "type": "module",