@lanonasis/cli 1.5.0 β†’ 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.
Files changed (37) hide show
  1. package/README.md +284 -586
  2. package/dist/commands/api-keys.d.ts +3 -0
  3. package/dist/commands/api-keys.js +812 -0
  4. package/dist/commands/auth.d.ts +2 -0
  5. package/dist/commands/auth.js +127 -138
  6. package/dist/commands/completion.d.ts +33 -0
  7. package/dist/commands/completion.js +378 -0
  8. package/dist/commands/guide.d.ts +19 -0
  9. package/dist/commands/guide.js +446 -0
  10. package/dist/commands/mcp.js +30 -37
  11. package/dist/commands/memory.js +53 -78
  12. package/dist/completions/bash-completion.sh +88 -0
  13. package/dist/completions/fish-completion.fish +132 -0
  14. package/dist/completions/zsh-completion.zsh +196 -0
  15. package/dist/index-simple.js +633 -183
  16. package/dist/index.js +327 -221
  17. package/dist/mcp-server.d.ts +38 -0
  18. package/dist/mcp-server.js +154 -0
  19. package/dist/utils/api.d.ts +12 -2
  20. package/dist/utils/api.js +38 -4
  21. package/dist/utils/config.d.ts +5 -2
  22. package/dist/utils/config.js +39 -15
  23. package/dist/utils/formatting.d.ts +2 -0
  24. package/dist/utils/formatting.js +13 -0
  25. package/dist/utils/mcp-client.d.ts +49 -6
  26. package/dist/utils/mcp-client.js +159 -82
  27. package/package.json +22 -12
  28. package/dist/utils/completions.d.ts +0 -28
  29. package/dist/utils/completions.js +0 -276
  30. package/dist/utils/mcp-client.test.d.ts +0 -1
  31. package/dist/utils/mcp-client.test.js +0 -125
  32. package/dist/utils/output.d.ts +0 -23
  33. package/dist/utils/output.js +0 -97
  34. package/dist/utils/websocket-mcp-client.d.ts +0 -60
  35. package/dist/utils/websocket-mcp-client.js +0 -182
  36. package/dist/utils/websocket-mcp-client.test.d.ts +0 -1
  37. package/dist/utils/websocket-mcp-client.test.js +0 -126
package/README.md CHANGED
@@ -1,680 +1,378 @@
1
- # Lanonasis CLI - Enterprise AI Infrastructure Platform
1
+ # @lanonasis/cli v1.5.2 - Onasis-Core Golden Contract CLI
2
2
 
3
- <div align="center">
3
+ [![NPM Version](https://img.shields.io/npm/v/@lanonasis/cli)](https://www.npmjs.com/package/@lanonasis/cli)
4
+ [![Downloads](https://img.shields.io/npm/dt/@lanonasis/cli)](https://www.npmjs.com/package/@lanonasis/cli)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+ [![Golden Contract](https://img.shields.io/badge/Onasis--Core-v0.1%20Compliant-gold)](https://api.lanonasis.com/.well-known/onasis.json)
4
7
 
5
- [![npm version](https://img.shields.io/npm/v/@lanonasis/cli?style=for-the-badge)](https://www.npmjs.com/package/@lanonasis/cli)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
7
- [![Security: SOC 2](https://img.shields.io/badge/Security-SOC%202%20Type%20II-red?style=for-the-badge)](https://security.lanonasis.com)
8
- [![Compliance: ISO 27001](https://img.shields.io/badge/ISO-27001%20Certified-green?style=for-the-badge)](https://security.lanonasis.com)
9
- [![MCP Integration](https://img.shields.io/badge/MCP-Model%20Context%20Protocol-purple?style=for-the-badge)](https://modelcontextprotocol.com)
10
- [![Enterprise Ready](https://img.shields.io/badge/Enterprise-Ready-orange?style=for-the-badge)]()
8
+ Professional command-line interface for LanOnasis Memory as a Service (MaaS) platform with **Golden Contract compliance**, comprehensive authentication, and enterprise-grade features.
11
9
 
12
- </div>
10
+ ## πŸš€ Quick Start
13
11
 
14
- <div align="center">
15
- <h3>πŸš€ Enterprise-Grade CLI for AI-Driven Infrastructure & Memory Management</h3>
16
- <p>Unified command-line interface for Lanonasis ecosystem: Memory as a Service (MaaS), AI orchestration, and multi-tenant infrastructure management. Built for enterprise scale with Model Context Protocol (MCP) integration.</p>
17
- </div>
18
-
19
- ---
12
+ ### Installation
13
+ ```bash
14
+ # Global installation (recommended)
15
+ npm install -g @lanonasis/cli
20
16
 
21
- ## 🏒 Enterprise Features
22
-
23
- <table>
24
- <tr>
25
- <td width="50%">
26
-
27
- ### πŸ” Security & Compliance
28
- - **Zero Trust Architecture**: Never trust, always verify
29
- - **End-to-end Encryption**: AES-256 + TLS 1.3 with PFS
30
- - **Multi-factor Authentication**: FIDO2/WebAuthn + TOTP
31
- - **Role-Based Access Control**: Granular permissions & least privilege
32
- - **SOC 2 Type II + ISO 27001**: Independently audited
33
- - **24/7 Security Operations**: Real-time threat monitoring
34
-
35
- </td>
36
- <td width="50%">
37
-
38
- ### πŸš€ Performance & Scale
39
- - **High Availability**: 99.99% uptime SLA
40
- - **Global CDN**: Sub-100ms latency worldwide
41
- - **Horizontal Scaling**: Handle millions of requests
42
- - **Real-time Sync**: WebSocket & SSE support
43
- - **Batch Operations**: Process thousands of items
44
-
45
- </td>
46
- </tr>
47
- </table>
48
-
49
- ## πŸ†• New in v1.5.0
50
- - **OAuth Web Authentication**: Browser-based authentication with multiple providers
51
- - **Multiple Authentication Methods**: Username/password, OAuth, and API keys
52
- - **Tab Completions**: Intelligent shell completions for bash and zsh
53
- - **Core Gateway Integration**: Centralized authentication through Lanonasis Core
54
- - **Connections Listing**: View all available functions and services
55
- - **Enhanced CLI UX**: Better help system and short command aliases
56
- - **MCP Server Mode**: Run as MCP server for AI assistants (Claude, Cursor, Windsurf)
57
- - **Hybrid Architecture**: Seamless switching between local MCP and remote API
58
- - **Real-time Updates**: SSE streaming for live memory synchronization
59
-
60
- ## ⚑ Quick Start
17
+ # Verify installation
18
+ lanonasis --version # or onasis --version
19
+ ```
61
20
 
21
+ ### First Steps
62
22
  ```bash
63
- # Install globally
64
- npm install -g @lanonasis/cli
23
+ # Interactive guided setup (recommended for new users)
24
+ onasis guide
65
25
 
66
- # Or use with npx (no installation needed)
67
- npx -y @lanonasis/cli init
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
68
30
 
69
- # Short command aliases
70
- onasis -h # Help with short alias
71
- lanonasis -h # Help with full name
31
+ # Create your first memory
32
+ onasis memory create --title "Welcome" --content "My first memory"
33
+ ```
72
34
 
73
- # Initialize and authenticate (choose your method)
74
- lanonasis init
75
- lanonasis login # Interactive login with method choice
35
+ ## 🎯 Command Aliases
76
36
 
77
- # API key authentication (for automation/AI agents)
78
- export LANONASIS_API_KEY=your_api_key
79
- lanonasis memory list
80
- # Or inline:
81
- lanonasis --api-key=your_key memory search "query"
82
- npx -y @lanonasis/cli --api-key=your_key memory list
37
+ The CLI supports multiple command aliases for different use cases:
83
38
 
84
- # View all available connections and functions
85
- lanonasis list # Show all available services
86
- lanonasis ls --type memory # Focus on memory services
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 |
87
45
 
88
- # Memory operations (also available as 'memory' and 'maas' commands)
89
- lanonasis memory create -t "My First Memory" -c "This is the content of my memory"
90
- lanonasis memory search "search query"
46
+ ```bash
47
+ # All of these are equivalent:
48
+ onasis memory list
91
49
  lanonasis memory list
50
+ memory list
51
+ maas memory list
52
+ ```
92
53
 
93
- # Install shell completions
94
- lanonasis install-completion --shell bash # or zsh
54
+ ## πŸ” Authentication Methods
55
+
56
+ ### 1. Vendor Key Authentication (Recommended)
57
+ Best for API integrations and automation:
58
+ ```bash
59
+ onasis login --vendor-key pk_xxxxx.sk_xxxxx
95
60
  ```
96
61
 
97
- ## πŸš€ Installation
62
+ ### 2. OAuth Browser Authentication
63
+ Secure browser-based authentication:
64
+ ```bash
65
+ onasis login --oauth
66
+ ```
98
67
 
99
- ### Global Installation (Recommended)
68
+ ### 3. Interactive Credentials
69
+ Traditional username/password authentication:
100
70
  ```bash
101
- npm install -g @lanonasis/cli
71
+ onasis login # Will prompt for email and password
102
72
  ```
103
73
 
104
- ### NPX Usage (No Installation)
74
+ ### Authentication Status
105
75
  ```bash
106
- npx -y @lanonasis/cli --help
107
- npx -y @lanonasis/cli init
76
+ onasis auth status # Check current authentication
77
+ onasis auth logout # Logout from current session
108
78
  ```
109
79
 
110
- ### Local Installation
80
+ ## πŸ’» Shell Completions
81
+
82
+ ### Installation Guide
111
83
  ```bash
112
- npm install @lanonasis/cli
113
- npx lanonasis --help
114
- ```
115
-
116
- ## πŸ“‹ Available Commands
117
-
118
- ### πŸ”§ Setup & Configuration
119
- - `lanonasis init` - Initialize CLI and show setup instructions
120
- - `lanonasis config set <key> <value>` - Set configuration values
121
- - `lanonasis config get <key>` - Get configuration value
122
- - `lanonasis config list` - List all configuration options
123
- - `lanonasis status` - Show CLI status and configuration
124
-
125
- ### πŸ” Authentication
126
- - `lanonasis login` - Interactive login with method choice
127
- - `lanonasis auth login` - Authenticate with your services
128
- - `lanonasis auth logout` - Sign out
129
- - `lanonasis auth status` - Check authentication status
130
-
131
- ### πŸ“ Memory Operations
132
- - `lanonasis memory create -t "Title" -c "Content" [--type <type>]` - Create new memory
133
- - `lanonasis memory search <query> [-l <limit>]` - Search memories
134
- - `lanonasis memory list [-l <limit>] [--type <type>]` - List memories
135
- - `lanonasis list` - Show all available connections and functions
136
- - `lanonasis help` - Show detailed help
137
-
138
- #### Alternative Commands & Aliases
139
- - `memory <command>` - Direct memory operations
140
- - `maas <command>` - Memory as a Service operations
141
- - `onasis <command>` - Short alias for lanonasis
142
- - `lanonasis ls` - Alias for list command
143
-
144
- ### πŸ”— Connections & Functions
145
- - `lanonasis list` - Show all available services and functions
146
- - `lanonasis ls --type memory` - Focus on memory services only
147
- - `lanonasis ls --type api` - Show API connections
148
- - `lanonasis ls --type mcp` - Show MCP tools
149
-
150
- ### 🎯 Shell Completions
151
- - `lanonasis completion --shell bash` - Generate bash completions
152
- - `lanonasis completion --shell zsh` - Generate zsh completions
153
- - `lanonasis install-completion` - Install completions for current shell
154
-
155
- ## 🧠 Memory Types
156
-
157
- The CLI supports the following memory types:
158
- - **conversation** - Chat and dialogue context
159
- - **knowledge** - Educational and reference content
160
- - **project** - Project-specific documentation
161
- - **context** - General contextual information
162
- - **reference** - Quick reference materials
163
-
164
- ## βš™οΈ Configuration
165
-
166
- Configure your CLI to connect to your Lanonasis services:
84
+ onasis completion # Shows installation instructions for all shells
85
+ ```
167
86
 
87
+ ### Direct Installation
168
88
  ```bash
169
- # Set your service endpoint
170
- lanonasis config set api-url https://your-lanonasis-service.com
89
+ # Bash
90
+ echo 'source <(onasis --completion bash)' >> ~/.bashrc
91
+
92
+ # Zsh
93
+ echo 'source <(onasis --completion zsh)' >> ~/.zshrc
171
94
 
172
- # View current configuration
173
- lanonasis config list
95
+ # Fish
96
+ echo 'onasis --completion fish | source' >> ~/.config/fish/config.fish
174
97
  ```
175
98
 
176
- ## πŸ”’ Authentication
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
177
105
 
178
- The CLI supports multiple authentication methods for different use cases:
106
+ ## πŸ“š Core Commands
179
107
 
180
- ### Interactive Authentication
108
+ ### System Management
181
109
  ```bash
182
- # Choose your preferred method (username/password or OAuth)
183
- lanonasis login
184
-
185
- # Traditional method-specific login
186
- lanonasis auth login
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
187
115
  ```
188
116
 
189
- **Available Methods:**
190
- - **πŸ”‘ Username/Password**: Direct login with email and password
191
- - **🌐 OAuth/Web Browser**: Secure browser-based authentication with multiple providers
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
+ ```
192
137
 
193
- ### API Key Authentication (for Automation)
138
+ ### Topic Management
194
139
  ```bash
195
- # Environment variable (recommended for scripts)
196
- export LANONASIS_API_KEY=your_api_key_here
197
- lanonasis memory list
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
+ ```
198
146
 
199
- # Command-line option
200
- lanonasis --api-key=your_key memory search "query"
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
+ ```
201
154
 
202
- # NPX usage with API key (for AI agents)
203
- npx -y @lanonasis/cli --api-key=your_key memory list
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
204
162
  ```
205
163
 
206
- ### Authentication Status
164
+ ### Configuration Management
207
165
  ```bash
208
- # Check current authentication
209
- lanonasis auth status
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
+ ```
210
171
 
211
- # Logout (clears all auth methods)
212
- lanonasis auth logout
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
213
179
  ```
214
180
 
215
- ## πŸ“– Usage Examples
181
+ ## βš™οΈ Global Options
216
182
 
217
183
  ```bash
218
- # Create different types of memories
219
- lanonasis create -t "Meeting Notes" -c "Project kickoff discussion" --type project
220
- lanonasis create -t "API Reference" -c "POST /api/memories endpoint" --type reference
221
- lanonasis create -t "Learning Notes" -c "Vector embeddings concepts" --type knowledge
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
+ ```
222
192
 
223
- # Using npx (no installation)
224
- npx -y @lanonasis/cli create -t "Quick Note" -c "NPX usage example"
193
+ ## 🎯 Advanced Usage
225
194
 
226
- # Search with different options
227
- lanonasis search "API endpoints" -l 5
228
- lanonasis search "project meeting"
195
+ ### JSON Output for Automation
196
+ ```bash
197
+ onasis memory list --output json | jq '.data[].title'
198
+ onasis health --output json | jq '.status'
199
+ ```
229
200
 
230
- # List with filters
231
- lanonasis list --type project -l 10
232
- lanonasis list -l 20
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
+ ```
233
207
 
234
- # Alternative command usage
235
- memory search "my query" # Direct memory command
236
- maas list --type knowledge # MaaS command
208
+ ### Configuration File
209
+ Location: `~/.maas/config.json`
210
+ ```json
211
+ {
212
+ "apiUrl": "https://api.lanonasis.com/api/v1",
213
+ "defaultOutputFormat": "table",
214
+ "mcpPreference": "auto",
215
+ "vendorKey": "pk_xxxxx.sk_xxxxx"
216
+ }
237
217
  ```
238
218
 
239
- ## πŸ€– MCP Integration (Model Context Protocol)
219
+ ## πŸ”§ Development & Debugging
240
220
 
241
- The CLI now includes full MCP support for AI agent integration:
221
+ ### Verbose Mode
222
+ ```bash
223
+ onasis --verbose memory list # Detailed operation logs
224
+ onasis -V health # Short flag version
225
+ ```
242
226
 
243
- ### Start MCP Server Mode
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
+ ```
244
233
 
234
+ ### MCP Debugging
245
235
  ```bash
246
- # Start as MCP server for AI assistants
247
- lanonasis mcp start # Default port 3002
248
- lanonasis mcp start --port 8080 # Custom port
249
- lanonasis mcp start --mode server # Explicit server mode
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`)
250
249
 
251
- # Or use npx without installation
252
- npx -y @lanonasis/cli mcp start
250
+ ### Service Discovery Integration
251
+ The CLI automatically discovers service endpoints:
252
+ ```bash
253
+ # Service discovery happens automatically
254
+ onasis health # Uses discovered endpoints for health checks
253
255
  ```
254
256
 
255
- ### Configure AI Assistants
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
256
262
 
257
- **Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
258
- ```json
259
- {
260
- "mcpServers": {
261
- "memory-service": {
262
- "command": "npx",
263
- "args": ["-y", "@lanonasis/cli", "mcp", "start"],
264
- "env": {
265
- "LANONASIS_API_KEY": "your-api-key-here"
266
- }
267
- }
268
- }
269
- }
263
+ ## πŸ§ͺ Testing & Quality
264
+
265
+ ### Command Validation
266
+ ```bash
267
+ onasis --help # Validate CLI installation
268
+ onasis completion # Test completion system
269
+ onasis guide # Test interactive guidance
270
270
  ```
271
271
 
272
- **Cursor/Windsurf** (Settings):
273
- ```json
274
- {
275
- "mcp.servers": {
276
- "memory-service": {
277
- "command": "lanonasis",
278
- "args": ["mcp", "start"],
279
- "env": {
280
- "LANONASIS_API_KEY": "your-api-key-here"
281
- }
282
- }
283
- }
284
- }
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
285
277
  ```
286
278
 
287
- ### MCP Commands
279
+ ## 🚨 Troubleshooting
288
280
 
281
+ ### Common Issues
282
+
283
+ #### Authentication Failures
289
284
  ```bash
290
- # Server operations
291
- lanonasis mcp start # Start MCP server
292
- lanonasis mcp stop # Stop MCP server
293
- lanonasis mcp status # Check server status
294
- lanonasis mcp logs # View server logs
295
-
296
- # Tool discovery
297
- lanonasis mcp tools # List all available MCP tools
298
- lanonasis mcp tools --json # Output as JSON
299
-
300
- # Test connectivity
301
- lanonasis mcp test # Test MCP connection
302
- lanonasis mcp test --tool <name> # Test specific tool
303
- ```
304
-
305
- ### Available MCP Tools
306
-
307
- - `memory_create_memory` - Create new memories with embeddings
308
- - `memory_search_memories` - Semantic search across memories
309
- - `memory_list_memories` - List and filter memories
310
- - `memory_get_memory` - Retrieve specific memory
311
- - `memory_update_memory` - Update existing memories
312
- - `memory_delete_memory` - Delete memories
313
- - `memory_bulk_create` - Batch create multiple memories
314
- - `memory_bulk_delete` - Batch delete memories
315
- - `memory_get_stats` - Get memory statistics
316
- - `memory_export_data` - Export memories (JSON/CSV/YAML)
317
- - `memory_import_data` - Import memories from files
318
-
319
- ### MCP Features:
320
- - **πŸ”Œ WebSocket Server**: Real-time bidirectional communication
321
- - **πŸ”„ Hybrid Mode**: Automatic fallback between local/remote
322
- - **πŸ” Secure Auth**: API key and JWT token support
323
- - **πŸ“Š Real-time SSE**: Live updates in remote mode
324
- - **πŸ› οΈ Tool Discovery**: Dynamic tool listing for AI agents
325
- - **🎯 Auto-detection**: Intelligently chooses best mode
326
- - **πŸ“ Full Memory API**: All operations exposed as MCP tools
327
-
328
- ## 🌐 MaaS Service Integration
329
-
330
- This CLI is designed to work with Memory as a Service platforms that provide:
331
- - RESTful API endpoints
332
- - JWT or API key authentication
333
- - Vector-based memory search
334
- - Multi-tenant memory storage
335
-
336
- ### Setting up your MaaS Service
337
-
338
- 1. **Deploy** a MaaS service using the provided backend
339
- 2. **Configure** the CLI with your service endpoint
340
- 3. **Authenticate** using your service credentials
341
- 4. **Start** managing your memories!
342
-
343
- ## πŸ› οΈ Development
344
-
345
- ### Prerequisites
346
- - Node.js 18+
347
- - npm or yarn
348
-
349
- ### Local Development
350
- ```bash
351
- git clone <repository-url>
352
- cd memory-cli
353
- npm install
285
+ # Check authentication status
286
+ onasis auth status
354
287
 
355
- # Development mode
356
- npm run dev
288
+ # Re-authenticate
289
+ onasis auth logout
290
+ onasis login --vendor-key pk_xxx.sk_xxx
291
+ ```
357
292
 
358
- # Build
359
- npm run build
293
+ #### Connection Issues
294
+ ```bash
295
+ # Check system health
296
+ onasis health --verbose
360
297
 
361
- # Test locally
362
- node dist/index-simple.js help
298
+ # Test API connectivity
299
+ onasis --api-url https://api.lanonasis.com/api/v1 health
363
300
  ```
364
301
 
365
- ## πŸ“¦ What's Included
302
+ #### MCP Connection Issues
303
+ ```bash
304
+ # Check MCP status
305
+ onasis mcp status --verbose
366
306
 
367
- - **Full CLI Interface** - Complete command-line tool
368
- - **Memory Management** - Create, search, list memories
369
- - **Type System** - Organized memory categorization
370
- - **Authentication** - Secure service integration
371
- - **Configuration** - Flexible service setup
372
- - **Help System** - Comprehensive documentation
307
+ # Disable MCP temporarily
308
+ onasis --no-mcp memory list
309
+ ```
373
310
 
374
- ## πŸ“¦ SDK & Related Packages
311
+ ### Debug Mode
312
+ ```bash
313
+ # Enable maximum verbosity
314
+ CLI_VERBOSE=true onasis --verbose health
315
+ ```
375
316
 
376
- ### Memory Client SDK
377
- Install the TypeScript/JavaScript SDK for application integration:
317
+ ## 🀝 Contributing
378
318
 
319
+ ### Development Setup
379
320
  ```bash
380
- # Install SDK for your applications
381
- npm install @lanonasis/memory-client
321
+ # Clone CLI source
322
+ git clone https://github.com/lanonasis/lanonasis-maas.git
323
+ cd lanonasis-maas/cli
382
324
 
383
- # Use in your code
384
- import { createMemoryClient } from '@lanonasis/memory-client';
325
+ # Install dependencies
326
+ npm install
385
327
 
386
- const client = createMemoryClient({
387
- baseURL: 'https://api.lanonasis.com',
388
- apiKey: 'your-api-key-here'
389
- });
328
+ # Build CLI
329
+ npm run build
330
+
331
+ # Link for local development
332
+ npm link
390
333
  ```
391
334
 
392
- ### Complete Installation for Developers
335
+ ### Testing Changes
393
336
  ```bash
394
- # Install CLI globally for command-line usage
395
- npm install -g @lanonasis/cli
396
-
397
- # Install SDK locally for application development
398
- npm install @lanonasis/memory-client
337
+ # Test build
338
+ npm run build
399
339
 
400
- # Now you have both CLI and SDK available!
401
- lanonasis --help # CLI commands
402
- # SDK available for import in your code
340
+ # Test CLI functionality
341
+ onasis --help
342
+ onasis health
403
343
  ```
404
344
 
405
- ## πŸ”— Related Projects
345
+ ## πŸ“ Version History
406
346
 
407
- - **Memory Service Backend** - Full MaaS API server ([GitHub](https://github.com/thefixer3x/vibe-memory))
408
- - **Memory Client SDK** - JavaScript/TypeScript SDK (`@lanonasis/memory-client`)
409
- - **Memory Visualizer** - Interactive memory exploration (included in backend)
410
- - **VSCode Extension** - IDE integration (coming soon)
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
411
362
 
412
363
  ## πŸ“„ License
413
364
 
414
- MIT License - see LICENSE file for details
365
+ MIT License - see [LICENSE](../LICENSE) for details.
415
366
 
416
- ## 🀝 Contributing
367
+ ## πŸ”— Related Links
417
368
 
418
- 1. Fork the repository
419
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
420
- 3. Commit your changes (`git commit -m 'Add amazing feature'`)
421
- 4. Push to the branch (`git push origin feature/amazing-feature`)
422
- 5. Open a Pull Request
423
-
424
- ## πŸ› Support
425
-
426
- - **Issues**: [GitHub Issues](https://github.com/seyederick/memory-cli/issues)
427
- - **Documentation**: [CLI Documentation](https://github.com/seyederick/memory-cli)
428
-
429
- ## 🎯 Use Cases
430
-
431
- - **Personal Knowledge Management** - Organize your thoughts and notes
432
- - **Team Knowledge Sharing** - Collaborative memory management
433
- - **Project Documentation** - Context-aware project memories
434
- - **Research Organization** - Academic and research note-taking
435
- - **API Integration** - Programmatic memory management
436
-
437
- ## πŸ† Enterprise Deployment
438
-
439
- ### πŸ“Š Performance Benchmarks
440
-
441
- <table>
442
- <tr>
443
- <th>Metric</th>
444
- <th>Performance</th>
445
- <th>Scale</th>
446
- </tr>
447
- <tr>
448
- <td>Request Latency</td>
449
- <td><strong>&lt; 50ms</strong> p99</td>
450
- <td>Global average</td>
451
- </tr>
452
- <tr>
453
- <td>Memory Search</td>
454
- <td><strong>&lt; 100ms</strong></td>
455
- <td>1M+ vectors</td>
456
- </tr>
457
- <tr>
458
- <td>Concurrent Users</td>
459
- <td><strong>100K+</strong></td>
460
- <td>Per instance</td>
461
- </tr>
462
- <tr>
463
- <td>API Throughput</td>
464
- <td><strong>10K RPS</strong></td>
465
- <td>Per node</td>
466
- </tr>
467
- <tr>
468
- <td>Data Retention</td>
469
- <td><strong>Unlimited</strong></td>
470
- <td>With archival</td>
471
- </tr>
472
- </table>
473
-
474
- ### πŸ—οΈ Architecture
475
-
476
- ```
477
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
478
- β”‚ Lanonasis CLI v1.5.0 β”‚
479
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
480
- β”‚ Auth Layer β”‚ Command Layer β”‚ Transport Layer β”‚
481
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
482
- β”‚ β€’ OAuth 2.0 β”‚ β€’ Memory CRUD β”‚ β€’ REST API β”‚
483
- β”‚ β€’ API Keys β”‚ β€’ Vector Search β”‚ β€’ WebSocket β”‚
484
- β”‚ β€’ JWT Tokens β”‚ β€’ Batch Ops β”‚ β€’ SSE Streaming β”‚
485
- β”‚ β€’ MFA Support β”‚ β€’ Admin Tools β”‚ β€’ MCP Protocol β”‚
486
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
487
- ↓
488
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
489
- β”‚ Lanonasis Core Gateway β”‚
490
- β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
491
- β”‚ PostgreSQL + pgvector | Redis | OpenAI API β”‚
492
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
493
- ```
494
-
495
- ### πŸš€ Commercial Deployments
496
-
497
- #### Industry Solutions
498
-
499
- <table>
500
- <tr>
501
- <td width="33%">
502
-
503
- **🏦 Financial Services**
504
- - Transaction context tracking
505
- - Compliance audit trails
506
- - Risk assessment memory
507
- - Customer interaction history
508
-
509
- </td>
510
- <td width="33%">
511
-
512
- **πŸ₯ Healthcare**
513
- - Patient context management
514
- - Treatment history tracking
515
- - Clinical decision support
516
- - HIPAA compliant storage
517
-
518
- </td>
519
- <td width="33%">
520
-
521
- **πŸŽ“ Education**
522
- - Student learning paths
523
- - Knowledge retention tracking
524
- - Collaborative research
525
- - Academic memory sharing
526
-
527
- </td>
528
- </tr>
529
- </table>
530
-
531
- ### πŸ”’ Security & Compliance
532
-
533
- <table>
534
- <tr>
535
- <td width="50%">
536
-
537
- #### πŸ›οΈ Certifications & Standards
538
- - **ISO 27001:2013** - Information Security Management
539
- - **SOC 2 Type II** - Service Organization Controls
540
- - **ISO 27017** - Cloud Security Controls
541
- - **ISO 27018** - Cloud Privacy Protection
542
- - **FedRAMP Moderate** - US Government Cloud Security
543
- - **CSA STAR Level 2** - Cloud Security Alliance
544
-
545
- #### 🌍 Regional Compliance
546
- - **GDPR** (EU) - General Data Protection Regulation
547
- - **CCPA** (California) - Consumer Privacy Act
548
- - **PIPEDA** (Canada) - Personal Information Protection
549
- - **LGPD** (Brazil) - Lei Geral de ProteΓ§Γ£o de Dados
550
- - **PDPA** (Singapore) - Personal Data Protection Act
551
-
552
- </td>
553
- <td width="50%">
554
-
555
- #### πŸ₯ Industry Standards
556
- - **HIPAA** - Healthcare Information Portability
557
- - **PCI DSS Level 1** - Payment Card Industry Security
558
- - **FISMA** - Federal Information Security Management
559
- - **NIST Cybersecurity Framework** - Risk Management
560
- - **HITRUST CSF** - Healthcare Security Framework
561
- - **21 CFR Part 11** - FDA Electronic Records
562
-
563
- #### πŸ” Security Controls
564
- - **Zero Trust Architecture** - Never trust, always verify
565
- - **End-to-End Encryption** - AES-256 + TLS 1.3
566
- - **Multi-Factor Authentication** - FIDO2/WebAuthn support
567
- - **Role-Based Access Control** - Least privilege principle
568
- - **Security Monitoring** - 24/7 SOC with SIEM
569
- - **Penetration Testing** - Quarterly by certified firms
570
-
571
- </td>
572
- </tr>
573
- </table>
574
-
575
- #### πŸ›‘οΈ Data Protection Guarantees
576
-
577
- | Security Feature | Implementation | Audit Frequency |
578
- |------------------|----------------|-----------------|
579
- | **Encryption at Rest** | AES-256 with FIPS 140-2 HSMs | Continuous |
580
- | **Encryption in Transit** | TLS 1.3 with Perfect Forward Secrecy | Real-time |
581
- | **Key Management** | AWS KMS + Azure Key Vault | Monthly |
582
- | **Access Logging** | Immutable audit trails | Daily review |
583
- | **Data Backup** | 3-2-1 strategy with geo-replication | Weekly verification |
584
- | **Incident Response** | <15 min detection, <1hr response | Quarterly drills |
585
-
586
- #### πŸŽ–οΈ Security Partnerships
587
-
588
- <table>
589
- <tr>
590
- <td align="center" width="25%">
591
- <strong>AWS Security</strong><br/>
592
- Advanced Technology Partner
593
- </td>
594
- <td align="center" width="25%">
595
- <strong>Microsoft Security</strong><br/>
596
- Gold Cloud Platform Partner
597
- </td>
598
- <td align="center" width="25%">
599
- <strong>Okta Verified</strong><br/>
600
- Identity & Access Management
601
- </td>
602
- <td align="center" width="25%">
603
- <strong>CrowdStrike</strong><br/>
604
- Endpoint Protection Partner
605
- </td>
606
- </tr>
607
- </table>
608
-
609
- ### πŸ“ˆ Enterprise Support
610
-
611
- | Plan | Response Time | Support Level | Price |
612
- |------|--------------|---------------|-------|
613
- | **Starter** | 24 hours | Email | Free |
614
- | **Professional** | 4 hours | Email + Chat | $299/mo |
615
- | **Enterprise** | 30 minutes | 24/7 Phone + Dedicated | Custom |
616
-
617
- ### 🌍 Global Infrastructure
618
-
619
- - **6 Regions**: US East/West, EU, APAC, SA, AF
620
- - **99.99% Uptime** SLA guarantee
621
- - **Automatic Failover** across regions
622
- - **Data Residency** options available
623
- - **Edge Caching** via global CDN
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)
624
375
 
625
376
  ---
626
377
 
627
- <div align="center">
628
-
629
- ### 🎯 Trusted by Industry Leaders
630
-
631
- <table>
632
- <tr>
633
- <td align="center">
634
- <strong>10M+</strong><br/>
635
- API Calls Daily
636
- </td>
637
- <td align="center">
638
- <strong>500K+</strong><br/>
639
- Active Users
640
- </td>
641
- <td align="center">
642
- <strong>99.99%</strong><br/>
643
- Uptime SLA
644
- </td>
645
- <td align="center">
646
- <strong>50ms</strong><br/>
647
- Avg Latency
648
- </td>
649
- </tr>
650
- </table>
651
-
652
- ### πŸ›‘οΈ Security & Vulnerability Disclosure
653
-
654
- We take security seriously. If you discover a security vulnerability, please follow our responsible disclosure process:
655
-
656
- **🚨 Security Contact**: security@lanonasis.com
657
- **πŸ”’ PGP Key**: [Download Public Key](https://security.lanonasis.com/pgp)
658
- **⏱️ Response Time**: 24 hours for critical, 72 hours for non-critical
659
- **πŸ’° Bug Bounty**: Up to $10,000 for critical vulnerabilities
660
-
661
- #### Security Reporting Guidelines
662
- - **DO**: Report vulnerabilities privately to our security team
663
- - **DO**: Provide detailed reproduction steps and impact assessment
664
- - **DO**: Allow reasonable time for patching before public disclosure
665
- - **DON'T**: Access user data or disrupt service operations
666
- - **DON'T**: Perform automated scanning without prior authorization
667
-
668
- ### πŸ“ž Enterprise Contact
669
-
670
- πŸ”— **Sales**: enterprise@lanonasis.com
671
- πŸ“š **Documentation**: [docs.lanonasis.com](https://docs.lanonasis.com)
672
- πŸ›Ÿ **Support**: [support.lanonasis.com](https://support.lanonasis.com)
673
- 🌐 **Platform**: [api.lanonasis.com](https://api.lanonasis.com)
674
- πŸ›‘οΈ **Security**: [security.lanonasis.com](https://security.lanonasis.com)
675
-
676
- <br/>
677
-
678
- **Β© 2024 Lanonasis Corporation. All rights reserved.**
679
-
680
- </div>
378
+ *Professional CLI for Enterprise Memory as a Service - Golden Contract Compliant*