@lanonasis/cli 1.5.1 → 1.5.2
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.
- package/README.md +292 -317
- package/dist/commands/auth.d.ts +2 -0
- package/dist/commands/auth.js +140 -1
- package/dist/commands/completion.d.ts +33 -0
- package/dist/commands/completion.js +378 -0
- package/dist/commands/guide.d.ts +19 -0
- package/dist/commands/guide.js +446 -0
- package/dist/completions/bash-completion.sh +88 -0
- package/dist/completions/fish-completion.fish +132 -0
- package/dist/completions/zsh-completion.zsh +196 -0
- package/dist/index-simple.js +128 -11
- package/dist/mcp-server.d.ts +37 -1
- package/dist/mcp-server.js +142 -507
- package/dist/utils/api.js +21 -4
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +39 -2
- package/dist/utils/mcp-client.js +1 -3
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,403 +1,378 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lanonasis/cli v1.5.2 - Onasis-Core Golden Contract CLI
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
4
5
|
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://api.lanonasis.com/.well-known/onasis.json)
|
|
32
7
|
|
|
8
|
+
Professional command-line interface for LanOnasis Memory as a Service (MaaS) platform with **Golden Contract compliance**, comprehensive authentication, and enterprise-grade features.
|
|
9
|
+
|
|
10
|
+
## 🚀 Quick Start
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
33
13
|
```bash
|
|
34
|
-
#
|
|
14
|
+
# Global installation (recommended)
|
|
35
15
|
npm install -g @lanonasis/cli
|
|
36
16
|
|
|
37
|
-
#
|
|
38
|
-
|
|
17
|
+
# Verify installation
|
|
18
|
+
lanonasis --version # or onasis --version
|
|
19
|
+
```
|
|
39
20
|
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
### First Steps
|
|
22
|
+
```bash
|
|
23
|
+
# Interactive guided setup (recommended for new users)
|
|
24
|
+
onasis guide
|
|
42
25
|
|
|
43
|
-
#
|
|
44
|
-
|
|
26
|
+
# Quick manual setup
|
|
27
|
+
onasis init # Initialize configuration
|
|
28
|
+
onasis login --vendor-key pk_xxx.sk_xxx # Authenticate with vendor key
|
|
29
|
+
onasis health # Verify system health
|
|
45
30
|
|
|
46
|
-
#
|
|
47
|
-
|
|
31
|
+
# Create your first memory
|
|
32
|
+
onasis memory create --title "Welcome" --content "My first memory"
|
|
33
|
+
```
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
lanonasis memory create -t "My First Memory" -c "This is the content of my memory"
|
|
51
|
-
lanonasis memory search "search query"
|
|
52
|
-
lanonasis memory list
|
|
35
|
+
## 🎯 Command Aliases
|
|
53
36
|
|
|
54
|
-
|
|
55
|
-
lanonasis deploy status
|
|
56
|
-
lanonasis services list
|
|
57
|
-
```
|
|
37
|
+
The CLI supports multiple command aliases for different use cases:
|
|
58
38
|
|
|
59
|
-
|
|
39
|
+
| Command | Purpose | Golden Contract |
|
|
40
|
+
|---------|---------|-----------------|
|
|
41
|
+
| `onasis` | Golden Contract compliant interface | ✅ Yes |
|
|
42
|
+
| `lanonasis` | Standard LanOnasis interface | ✅ Yes |
|
|
43
|
+
| `memory` | Memory-focused operations | ✅ Yes |
|
|
44
|
+
| `maas` | Memory as a Service operations | ✅ Yes |
|
|
60
45
|
|
|
61
|
-
### Global Installation (Recommended)
|
|
62
46
|
```bash
|
|
63
|
-
|
|
47
|
+
# All of these are equivalent:
|
|
48
|
+
onasis memory list
|
|
49
|
+
lanonasis memory list
|
|
50
|
+
memory list
|
|
51
|
+
maas memory list
|
|
64
52
|
```
|
|
65
53
|
|
|
66
|
-
|
|
54
|
+
## 🔐 Authentication Methods
|
|
55
|
+
|
|
56
|
+
### 1. Vendor Key Authentication (Recommended)
|
|
57
|
+
Best for API integrations and automation:
|
|
67
58
|
```bash
|
|
68
|
-
|
|
69
|
-
npx -y @lanonasis/cli init
|
|
59
|
+
onasis login --vendor-key pk_xxxxx.sk_xxxxx
|
|
70
60
|
```
|
|
71
61
|
|
|
72
|
-
###
|
|
62
|
+
### 2. OAuth Browser Authentication
|
|
63
|
+
Secure browser-based authentication:
|
|
73
64
|
```bash
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## 📋 Available Commands
|
|
79
|
-
|
|
80
|
-
### 🔧 Setup & Configuration
|
|
81
|
-
- `lanonasis init` - Initialize CLI and show setup instructions
|
|
82
|
-
- `lanonasis config set <key> <value>` - Set configuration values
|
|
83
|
-
- `lanonasis config get <key>` - Get configuration value
|
|
84
|
-
- `lanonasis config list` - List all configuration options
|
|
85
|
-
- `lanonasis status` - Show CLI status and configuration
|
|
86
|
-
|
|
87
|
-
### 🔐 Authentication
|
|
88
|
-
- `lanonasis auth login` - Authenticate with your services
|
|
89
|
-
- `lanonasis auth logout` - Sign out
|
|
90
|
-
- `lanonasis auth status` - Check authentication status
|
|
91
|
-
|
|
92
|
-
### 📝 Memory Operations
|
|
93
|
-
- `lanonasis create -t "Title" -c "Content" [--type <type>]` - Create new memory
|
|
94
|
-
- `lanonasis search <query> [-l <limit>]` - Search memories
|
|
95
|
-
- `lanonasis list [-l <limit>] [--type <type>]` - List memories
|
|
96
|
-
- `lanonasis help` - Show detailed help
|
|
97
|
-
|
|
98
|
-
### 🔑 API Key Management (NEW in v1.2.0)
|
|
99
|
-
- `lanonasis api-keys create` - Create a new API key with secure encryption
|
|
100
|
-
- `lanonasis api-keys list` - List all API keys with usage statistics
|
|
101
|
-
- `lanonasis api-keys get <keyId>` - Get details of a specific API key
|
|
102
|
-
- `lanonasis api-keys update <keyId>` - Update API key name, tags, or rotation policy
|
|
103
|
-
- `lanonasis api-keys delete <keyId>` - Securely delete an API key
|
|
104
|
-
- `lanonasis api-keys projects create` - Create a project for organizing keys
|
|
105
|
-
- `lanonasis api-keys projects list` - List all API key projects
|
|
106
|
-
- `lanonasis api-keys mcp register-tool` - Register MCP tools for API access
|
|
107
|
-
- `lanonasis api-keys mcp list-tools` - List registered MCP tools
|
|
108
|
-
- `lanonasis api-keys mcp request-access` - Request access to API keys via MCP
|
|
109
|
-
- `lanonasis api-keys analytics usage` - View API key usage analytics
|
|
110
|
-
- `lanonasis api-keys analytics security-events` - Monitor security events
|
|
111
|
-
|
|
112
|
-
#### Alternative Commands (Backwards Compatibility)
|
|
113
|
-
- `memory <command>` - Direct memory operations
|
|
114
|
-
- `maas <command>` - Memory as a Service operations
|
|
115
|
-
|
|
116
|
-
## 🧠 Memory Types
|
|
117
|
-
|
|
118
|
-
The CLI supports the following memory types:
|
|
119
|
-
- **conversation** - Chat and dialogue context
|
|
120
|
-
- **knowledge** - Educational and reference content
|
|
121
|
-
- **project** - Project-specific documentation
|
|
122
|
-
- **context** - General contextual information
|
|
123
|
-
- **reference** - Quick reference materials
|
|
124
|
-
|
|
125
|
-
## ⚙️ Configuration
|
|
126
|
-
|
|
127
|
-
Configure your CLI to connect to your Lanonasis services:
|
|
65
|
+
onasis login --oauth
|
|
66
|
+
```
|
|
128
67
|
|
|
68
|
+
### 3. Interactive Credentials
|
|
69
|
+
Traditional username/password authentication:
|
|
129
70
|
```bash
|
|
130
|
-
#
|
|
131
|
-
|
|
71
|
+
onasis login # Will prompt for email and password
|
|
72
|
+
```
|
|
132
73
|
|
|
133
|
-
|
|
134
|
-
|
|
74
|
+
### Authentication Status
|
|
75
|
+
```bash
|
|
76
|
+
onasis auth status # Check current authentication
|
|
77
|
+
onasis auth logout # Logout from current session
|
|
135
78
|
```
|
|
136
79
|
|
|
137
|
-
##
|
|
80
|
+
## 💻 Shell Completions
|
|
138
81
|
|
|
139
|
-
|
|
82
|
+
### Installation Guide
|
|
83
|
+
```bash
|
|
84
|
+
onasis completion # Shows installation instructions for all shells
|
|
85
|
+
```
|
|
140
86
|
|
|
87
|
+
### Direct Installation
|
|
141
88
|
```bash
|
|
142
|
-
#
|
|
143
|
-
|
|
89
|
+
# Bash
|
|
90
|
+
echo 'source <(onasis --completion bash)' >> ~/.bashrc
|
|
144
91
|
|
|
145
|
-
#
|
|
146
|
-
|
|
92
|
+
# Zsh
|
|
93
|
+
echo 'source <(onasis --completion zsh)' >> ~/.zshrc
|
|
147
94
|
|
|
148
|
-
#
|
|
149
|
-
|
|
95
|
+
# Fish
|
|
96
|
+
echo 'onasis --completion fish | source' >> ~/.config/fish/config.fish
|
|
150
97
|
```
|
|
151
98
|
|
|
152
|
-
|
|
99
|
+
### Features
|
|
100
|
+
- ✅ Command and subcommand completion
|
|
101
|
+
- ✅ Option and flag completion
|
|
102
|
+
- ✅ Context-aware suggestions
|
|
103
|
+
- ✅ Dynamic completion data via JSON API
|
|
104
|
+
- ✅ Support for all command aliases
|
|
105
|
+
|
|
106
|
+
## 📚 Core Commands
|
|
153
107
|
|
|
108
|
+
### System Management
|
|
154
109
|
```bash
|
|
155
|
-
#
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
110
|
+
onasis health # Comprehensive system health check
|
|
111
|
+
onasis status # Quick status overview
|
|
112
|
+
onasis init # Initialize CLI configuration
|
|
113
|
+
onasis guide # Interactive setup guide
|
|
114
|
+
onasis quickstart # Essential commands reference
|
|
115
|
+
```
|
|
159
116
|
|
|
160
|
-
|
|
161
|
-
|
|
117
|
+
### Memory Management
|
|
118
|
+
```bash
|
|
119
|
+
# List memories
|
|
120
|
+
onasis memory list
|
|
121
|
+
onasis memory list --memory-type context --limit 20 --sort-by created_at
|
|
122
|
+
|
|
123
|
+
# Create memories
|
|
124
|
+
onasis memory create --title "Project Notes" --content "Important information"
|
|
125
|
+
onasis memory create --title "Reference" --memory-type reference --tags "docs,api"
|
|
126
|
+
|
|
127
|
+
# Search memories
|
|
128
|
+
onasis memory search "api integration"
|
|
129
|
+
onasis memory search "meeting notes" --memory-types context,reference
|
|
130
|
+
|
|
131
|
+
# Memory operations
|
|
132
|
+
onasis memory get <id> # Get specific memory
|
|
133
|
+
onasis memory update <id> --title "New Title"
|
|
134
|
+
onasis memory delete <id> # Delete memory
|
|
135
|
+
onasis memory stats # Memory statistics
|
|
136
|
+
```
|
|
162
137
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
138
|
+
### Topic Management
|
|
139
|
+
```bash
|
|
140
|
+
onasis topic list # List all topics
|
|
141
|
+
onasis topic create --name "Development" --color blue --icon "💻"
|
|
142
|
+
onasis topic get <id> # Get specific topic
|
|
143
|
+
onasis topic update <id> --description "New description"
|
|
144
|
+
onasis topic delete <id> # Delete topic
|
|
145
|
+
```
|
|
166
146
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
147
|
+
### API Key Management
|
|
148
|
+
```bash
|
|
149
|
+
onasis api-keys list # List API keys
|
|
150
|
+
onasis api-keys create --name "Integration Key" --scope "memory:read"
|
|
151
|
+
onasis api-keys revoke <id> # Revoke API key
|
|
152
|
+
onasis api-keys rotate <id> # Rotate API key
|
|
153
|
+
```
|
|
170
154
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
155
|
+
### MCP Integration
|
|
156
|
+
```bash
|
|
157
|
+
onasis mcp status # MCP server status
|
|
158
|
+
onasis mcp connect --remote # Connect to remote MCP server
|
|
159
|
+
onasis mcp disconnect # Disconnect from MCP
|
|
160
|
+
onasis mcp tools # List available MCP tools
|
|
161
|
+
onasis mcp resources # List MCP resources
|
|
174
162
|
```
|
|
175
163
|
|
|
176
|
-
|
|
164
|
+
### Configuration Management
|
|
165
|
+
```bash
|
|
166
|
+
onasis config list # List all configuration
|
|
167
|
+
onasis config get <key> # Get configuration value
|
|
168
|
+
onasis config set <key> <value> # Set configuration value
|
|
169
|
+
onasis config reset # Reset configuration
|
|
170
|
+
```
|
|
177
171
|
|
|
178
|
-
|
|
172
|
+
### Service Management
|
|
173
|
+
```bash
|
|
174
|
+
onasis service list # List all services
|
|
175
|
+
onasis service status # Service status overview
|
|
176
|
+
onasis service restart <service> # Restart specific service
|
|
177
|
+
onasis deploy status # Deployment status
|
|
178
|
+
onasis deploy health # Deployment health check
|
|
179
|
+
```
|
|
179
180
|
|
|
180
|
-
|
|
181
|
+
## ⚙️ Global Options
|
|
181
182
|
|
|
182
183
|
```bash
|
|
183
|
-
#
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
# Available for all commands
|
|
185
|
+
--help # Show command help
|
|
186
|
+
--version # Show version information
|
|
187
|
+
--verbose # Enable verbose logging
|
|
188
|
+
--output <format> # Output format: table, json, yaml, csv
|
|
189
|
+
--api-url <url> # Override API URL
|
|
190
|
+
--no-mcp # Disable MCP and use direct API
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## 🎯 Advanced Usage
|
|
187
194
|
|
|
188
|
-
|
|
189
|
-
|
|
195
|
+
### JSON Output for Automation
|
|
196
|
+
```bash
|
|
197
|
+
onasis memory list --output json | jq '.data[].title'
|
|
198
|
+
onasis health --output json | jq '.status'
|
|
190
199
|
```
|
|
191
200
|
|
|
192
|
-
###
|
|
201
|
+
### Environment Variables
|
|
202
|
+
```bash
|
|
203
|
+
export MEMORY_API_URL="https://api.lanonasis.com/api/v1"
|
|
204
|
+
export CLI_OUTPUT_FORMAT="json"
|
|
205
|
+
export CLI_VERBOSE="true"
|
|
206
|
+
```
|
|
193
207
|
|
|
194
|
-
|
|
208
|
+
### Configuration File
|
|
209
|
+
Location: `~/.maas/config.json`
|
|
195
210
|
```json
|
|
196
211
|
{
|
|
197
|
-
"
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
"env": {
|
|
202
|
-
"LANONASIS_API_KEY": "your-api-key-here"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
212
|
+
"apiUrl": "https://api.lanonasis.com/api/v1",
|
|
213
|
+
"defaultOutputFormat": "table",
|
|
214
|
+
"mcpPreference": "auto",
|
|
215
|
+
"vendorKey": "pk_xxxxx.sk_xxxxx"
|
|
206
216
|
}
|
|
207
217
|
```
|
|
208
218
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
"args": ["mcp", "start"],
|
|
216
|
-
"env": {
|
|
217
|
-
"LANONASIS_API_KEY": "your-api-key-here"
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
219
|
+
## 🔧 Development & Debugging
|
|
220
|
+
|
|
221
|
+
### Verbose Mode
|
|
222
|
+
```bash
|
|
223
|
+
onasis --verbose memory list # Detailed operation logs
|
|
224
|
+
onasis -V health # Short flag version
|
|
222
225
|
```
|
|
223
226
|
|
|
224
|
-
###
|
|
227
|
+
### Configuration Debugging
|
|
228
|
+
```bash
|
|
229
|
+
onasis config list # Check current configuration
|
|
230
|
+
onasis auth status # Verify authentication
|
|
231
|
+
onasis health --verbose # Detailed health information
|
|
232
|
+
```
|
|
225
233
|
|
|
234
|
+
### MCP Debugging
|
|
226
235
|
```bash
|
|
227
|
-
#
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- `memory_create_memory` - Create new memories with embeddings
|
|
245
|
-
- `memory_search_memories` - Semantic search across memories
|
|
246
|
-
- `memory_list_memories` - List and filter memories
|
|
247
|
-
- `memory_get_memory` - Retrieve specific memory
|
|
248
|
-
- `memory_update_memory` - Update existing memories
|
|
249
|
-
- `memory_delete_memory` - Delete memories
|
|
250
|
-
- `memory_bulk_create` - Batch create multiple memories
|
|
251
|
-
- `memory_bulk_delete` - Batch delete memories
|
|
252
|
-
- `memory_get_stats` - Get memory statistics
|
|
253
|
-
- `memory_export_data` - Export memories (JSON/CSV/YAML)
|
|
254
|
-
- `memory_import_data` - Import memories from files
|
|
255
|
-
|
|
256
|
-
### MCP Features:
|
|
257
|
-
- **🔌 WebSocket Server**: Real-time bidirectional communication
|
|
258
|
-
- **🔄 Hybrid Mode**: Automatic fallback between local/remote
|
|
259
|
-
- **🔐 Secure Auth**: API key and JWT token support
|
|
260
|
-
- **📊 Real-time SSE**: Live updates in remote mode
|
|
261
|
-
- **🛠️ Tool Discovery**: Dynamic tool listing for AI agents
|
|
262
|
-
- **🎯 Auto-detection**: Intelligently chooses best mode
|
|
263
|
-
- **📝 Full Memory API**: All operations exposed as MCP tools
|
|
264
|
-
|
|
265
|
-
## 🌐 MaaS Service Integration
|
|
266
|
-
|
|
267
|
-
This CLI is designed to work with Memory as a Service platforms that provide:
|
|
268
|
-
- RESTful API endpoints
|
|
269
|
-
- JWT or API key authentication
|
|
270
|
-
- Vector-based memory search
|
|
271
|
-
- Multi-tenant memory storage
|
|
272
|
-
|
|
273
|
-
### Setting up your MaaS Service
|
|
274
|
-
|
|
275
|
-
1. **Deploy** a MaaS service using the provided backend
|
|
276
|
-
2. **Configure** the CLI with your service endpoint
|
|
277
|
-
3. **Authenticate** using your service credentials
|
|
278
|
-
4. **Start** managing your memories!
|
|
279
|
-
|
|
280
|
-
## 🛠️ Development
|
|
281
|
-
|
|
282
|
-
### Prerequisites
|
|
283
|
-
- Node.js 18+
|
|
284
|
-
- npm or yarn
|
|
285
|
-
|
|
286
|
-
### Local Development
|
|
236
|
+
onasis mcp status --verbose # Detailed MCP diagnostics
|
|
237
|
+
onasis --no-mcp memory list # Bypass MCP, use direct API
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## 🌐 Golden Contract Compliance
|
|
241
|
+
|
|
242
|
+
### Onasis-Core v0.1 Standards
|
|
243
|
+
- ✅ Service discovery via `/.well-known/onasis.json`
|
|
244
|
+
- ✅ Vendor key authentication (`pk_*.sk_*` format)
|
|
245
|
+
- ✅ Request correlation with UUID tracking
|
|
246
|
+
- ✅ Enhanced CORS security compliance
|
|
247
|
+
- ✅ Uniform error envelope standardization
|
|
248
|
+
- ✅ WebSocket path alignment (`/mcp/ws`)
|
|
249
|
+
|
|
250
|
+
### Service Discovery Integration
|
|
251
|
+
The CLI automatically discovers service endpoints:
|
|
287
252
|
```bash
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
253
|
+
# Service discovery happens automatically
|
|
254
|
+
onasis health # Uses discovered endpoints for health checks
|
|
255
|
+
```
|
|
291
256
|
|
|
292
|
-
|
|
293
|
-
|
|
257
|
+
### Request Correlation
|
|
258
|
+
Every API request includes correlation headers:
|
|
259
|
+
- `X-Request-ID`: UUID for request tracking
|
|
260
|
+
- `X-Project-Scope`: Project scope validation
|
|
261
|
+
- `X-Auth-Method`: Authentication method used
|
|
294
262
|
|
|
295
|
-
|
|
296
|
-
npm run build
|
|
263
|
+
## 🧪 Testing & Quality
|
|
297
264
|
|
|
298
|
-
|
|
299
|
-
|
|
265
|
+
### Command Validation
|
|
266
|
+
```bash
|
|
267
|
+
onasis --help # Validate CLI installation
|
|
268
|
+
onasis completion # Test completion system
|
|
269
|
+
onasis guide # Test interactive guidance
|
|
300
270
|
```
|
|
301
271
|
|
|
302
|
-
|
|
272
|
+
### API Integration Testing
|
|
273
|
+
```bash
|
|
274
|
+
onasis health # Test API connectivity
|
|
275
|
+
onasis memory list --limit 1 # Test memory service
|
|
276
|
+
onasis mcp status # Test MCP integration
|
|
277
|
+
```
|
|
303
278
|
|
|
304
|
-
|
|
305
|
-
- **Memory Management** - Create, search, list memories
|
|
306
|
-
- **Type System** - Organized memory categorization
|
|
307
|
-
- **Authentication** - Secure service integration
|
|
308
|
-
- **Configuration** - Flexible service setup
|
|
309
|
-
- **Help System** - Comprehensive documentation
|
|
279
|
+
## 🚨 Troubleshooting
|
|
310
280
|
|
|
311
|
-
|
|
281
|
+
### Common Issues
|
|
312
282
|
|
|
313
|
-
|
|
314
|
-
|
|
283
|
+
#### Authentication Failures
|
|
284
|
+
```bash
|
|
285
|
+
# Check authentication status
|
|
286
|
+
onasis auth status
|
|
315
287
|
|
|
288
|
+
# Re-authenticate
|
|
289
|
+
onasis auth logout
|
|
290
|
+
onasis login --vendor-key pk_xxx.sk_xxx
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
#### Connection Issues
|
|
316
294
|
```bash
|
|
317
|
-
#
|
|
318
|
-
|
|
295
|
+
# Check system health
|
|
296
|
+
onasis health --verbose
|
|
319
297
|
|
|
320
|
-
#
|
|
321
|
-
|
|
298
|
+
# Test API connectivity
|
|
299
|
+
onasis --api-url https://api.lanonasis.com/api/v1 health
|
|
300
|
+
```
|
|
322
301
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
302
|
+
#### MCP Connection Issues
|
|
303
|
+
```bash
|
|
304
|
+
# Check MCP status
|
|
305
|
+
onasis mcp status --verbose
|
|
306
|
+
|
|
307
|
+
# Disable MCP temporarily
|
|
308
|
+
onasis --no-mcp memory list
|
|
327
309
|
```
|
|
328
310
|
|
|
329
|
-
###
|
|
311
|
+
### Debug Mode
|
|
330
312
|
```bash
|
|
331
|
-
#
|
|
332
|
-
|
|
313
|
+
# Enable maximum verbosity
|
|
314
|
+
CLI_VERBOSE=true onasis --verbose health
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## 🤝 Contributing
|
|
318
|
+
|
|
319
|
+
### Development Setup
|
|
320
|
+
```bash
|
|
321
|
+
# Clone CLI source
|
|
322
|
+
git clone https://github.com/lanonasis/lanonasis-maas.git
|
|
323
|
+
cd lanonasis-maas/cli
|
|
324
|
+
|
|
325
|
+
# Install dependencies
|
|
326
|
+
npm install
|
|
333
327
|
|
|
334
|
-
#
|
|
335
|
-
npm
|
|
328
|
+
# Build CLI
|
|
329
|
+
npm run build
|
|
336
330
|
|
|
337
|
-
#
|
|
338
|
-
|
|
339
|
-
# SDK available for import in your code
|
|
331
|
+
# Link for local development
|
|
332
|
+
npm link
|
|
340
333
|
```
|
|
341
334
|
|
|
342
|
-
|
|
335
|
+
### Testing Changes
|
|
336
|
+
```bash
|
|
337
|
+
# Test build
|
|
338
|
+
npm run build
|
|
339
|
+
|
|
340
|
+
# Test CLI functionality
|
|
341
|
+
onasis --help
|
|
342
|
+
onasis health
|
|
343
|
+
```
|
|
343
344
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
345
|
+
## 📝 Version History
|
|
346
|
+
|
|
347
|
+
### v1.5.2 (Current)
|
|
348
|
+
- ✅ Golden Contract compliance (Onasis-Core v0.1)
|
|
349
|
+
- ✅ Professional shell completions (bash/zsh/fish)
|
|
350
|
+
- ✅ Enhanced authentication (vendor keys, OAuth, credentials)
|
|
351
|
+
- ✅ Interactive user guidance system
|
|
352
|
+
- ✅ Dual command support (lanonasis/onasis)
|
|
353
|
+
- ✅ Service discovery integration
|
|
354
|
+
- ✅ Request correlation and enhanced security
|
|
355
|
+
|
|
356
|
+
### Previous Versions
|
|
357
|
+
- v1.4.x: Basic CLI functionality
|
|
358
|
+
- v1.3.x: MCP integration
|
|
359
|
+
- v1.2.x: Memory management
|
|
360
|
+
- v1.1.x: Initial authentication
|
|
361
|
+
- v1.0.x: Core CLI framework
|
|
348
362
|
|
|
349
363
|
## 📄 License
|
|
350
364
|
|
|
351
|
-
MIT License - see LICENSE
|
|
365
|
+
MIT License - see [LICENSE](../LICENSE) for details.
|
|
352
366
|
|
|
353
|
-
##
|
|
367
|
+
## 🔗 Related Links
|
|
354
368
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
## 🐛 Support
|
|
362
|
-
|
|
363
|
-
- **Issues**: [GitHub Issues](https://github.com/seyederick/memory-cli/issues)
|
|
364
|
-
- **Documentation**: [CLI Documentation](https://github.com/seyederick/memory-cli)
|
|
365
|
-
|
|
366
|
-
## 🎯 Use Cases
|
|
367
|
-
|
|
368
|
-
- **Personal Knowledge Management** - Organize your thoughts and notes
|
|
369
|
-
- **Team Knowledge Sharing** - Collaborative memory management
|
|
370
|
-
- **Project Documentation** - Context-aware project memories
|
|
371
|
-
- **Research Organization** - Academic and research note-taking
|
|
372
|
-
- **API Integration** - Programmatic memory management
|
|
373
|
-
|
|
374
|
-
## 🏆 Production Ready Features
|
|
375
|
-
|
|
376
|
-
### Enterprise Capabilities
|
|
377
|
-
- **🔐 Secure Authentication** - API key and JWT token support
|
|
378
|
-
- **🌐 Multi-tenant Support** - Isolated memory spaces per user/org
|
|
379
|
-
- **📊 Rate Limiting** - Built-in request throttling
|
|
380
|
-
- **🔄 Retry Logic** - Automatic retry with exponential backoff
|
|
381
|
-
- **📝 Comprehensive Logging** - Debug and audit trails
|
|
382
|
-
- **🚀 Performance Optimized** - Minimal overhead, fast responses
|
|
383
|
-
|
|
384
|
-
### Commercial Use Cases
|
|
385
|
-
- **💼 Enterprise Knowledge Management** - Company-wide memory system
|
|
386
|
-
- **🤝 Team Collaboration** - Shared project memories
|
|
387
|
-
- **🎓 Educational Platforms** - Student/teacher memory sharing
|
|
388
|
-
- **🏥 Healthcare Systems** - Patient context management
|
|
389
|
-
- **💰 Financial Services** - Transaction memory and audit trails
|
|
390
|
-
- **🛒 E-commerce** - Customer interaction history
|
|
391
|
-
|
|
392
|
-
### Integration Ready
|
|
393
|
-
- **REST API** - Standard HTTP/JSON interface
|
|
394
|
-
- **MCP Protocol** - AI assistant integration
|
|
395
|
-
- **WebSocket** - Real-time updates
|
|
396
|
-
- **SSE Streaming** - Live data synchronization
|
|
397
|
-
- **SDK Available** - TypeScript/JavaScript client library
|
|
369
|
+
- **NPM Package**: [https://www.npmjs.com/package/@lanonasis/cli](https://www.npmjs.com/package/@lanonasis/cli)
|
|
370
|
+
- **Main Repository**: [https://github.com/lanonasis/lanonasis-maas](https://github.com/lanonasis/lanonasis-maas)
|
|
371
|
+
- **Documentation**: [https://docs.lanonasis.com/cli](https://docs.lanonasis.com/cli)
|
|
372
|
+
- **API Documentation**: [https://api.lanonasis.com/docs](https://api.lanonasis.com/docs)
|
|
373
|
+
- **Service Discovery**: [https://api.lanonasis.com/.well-known/onasis.json](https://api.lanonasis.com/.well-known/onasis.json)
|
|
374
|
+
- **Dashboard**: [https://api.lanonasis.com/dashboard](https://api.lanonasis.com/dashboard)
|
|
398
375
|
|
|
399
376
|
---
|
|
400
377
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
🚀 **Ready for Production** | 📚 [Documentation](https://docs.lanonasis.com) | 🌐 [Platform](https://api.lanonasis.com)
|
|
378
|
+
*Professional CLI for Enterprise Memory as a Service - Golden Contract Compliant*
|