@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.
- package/README.md +284 -586
- package/dist/commands/api-keys.d.ts +3 -0
- package/dist/commands/api-keys.js +812 -0
- package/dist/commands/auth.d.ts +2 -0
- package/dist/commands/auth.js +127 -138
- 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/commands/mcp.js +30 -37
- package/dist/commands/memory.js +53 -78
- 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 +633 -183
- package/dist/index.js +327 -221
- package/dist/mcp-server.d.ts +38 -0
- package/dist/mcp-server.js +154 -0
- package/dist/utils/api.d.ts +12 -2
- package/dist/utils/api.js +38 -4
- package/dist/utils/config.d.ts +5 -2
- package/dist/utils/config.js +39 -15
- package/dist/utils/formatting.d.ts +2 -0
- package/dist/utils/formatting.js +13 -0
- package/dist/utils/mcp-client.d.ts +49 -6
- package/dist/utils/mcp-client.js +159 -82
- package/package.json +22 -12
- package/dist/utils/completions.d.ts +0 -28
- package/dist/utils/completions.js +0 -276
- package/dist/utils/mcp-client.test.d.ts +0 -1
- package/dist/utils/mcp-client.test.js +0 -125
- package/dist/utils/output.d.ts +0 -23
- package/dist/utils/output.js +0 -97
- package/dist/utils/websocket-mcp-client.d.ts +0 -60
- package/dist/utils/websocket-mcp-client.js +0 -182
- package/dist/utils/websocket-mcp-client.test.d.ts +0 -1
- package/dist/utils/websocket-mcp-client.test.js +0 -126
package/README.md
CHANGED
|
@@ -1,680 +1,378 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lanonasis/cli v1.5.2 - Onasis-Core Golden Contract CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://api.lanonasis.com/.well-known/onasis.json)
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://security.lanonasis.com)
|
|
8
|
-
[](https://security.lanonasis.com)
|
|
9
|
-
[](https://modelcontextprotocol.com)
|
|
10
|
-
[]()
|
|
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
|
-
|
|
10
|
+
## π Quick Start
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
---
|
|
12
|
+
### Installation
|
|
13
|
+
```bash
|
|
14
|
+
# Global installation (recommended)
|
|
15
|
+
npm install -g @lanonasis/cli
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
#
|
|
64
|
-
|
|
23
|
+
# Interactive guided setup (recommended for new users)
|
|
24
|
+
onasis guide
|
|
65
25
|
|
|
66
|
-
#
|
|
67
|
-
|
|
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
|
-
#
|
|
70
|
-
onasis
|
|
71
|
-
|
|
31
|
+
# Create your first memory
|
|
32
|
+
onasis memory create --title "Welcome" --content "My first memory"
|
|
33
|
+
```
|
|
72
34
|
|
|
73
|
-
|
|
74
|
-
lanonasis init
|
|
75
|
-
lanonasis login # Interactive login with method choice
|
|
35
|
+
## π― Command Aliases
|
|
76
36
|
|
|
77
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
94
|
-
|
|
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
|
-
|
|
62
|
+
### 2. OAuth Browser Authentication
|
|
63
|
+
Secure browser-based authentication:
|
|
64
|
+
```bash
|
|
65
|
+
onasis login --oauth
|
|
66
|
+
```
|
|
98
67
|
|
|
99
|
-
###
|
|
68
|
+
### 3. Interactive Credentials
|
|
69
|
+
Traditional username/password authentication:
|
|
100
70
|
```bash
|
|
101
|
-
|
|
71
|
+
onasis login # Will prompt for email and password
|
|
102
72
|
```
|
|
103
73
|
|
|
104
|
-
###
|
|
74
|
+
### Authentication Status
|
|
105
75
|
```bash
|
|
106
|
-
|
|
107
|
-
|
|
76
|
+
onasis auth status # Check current authentication
|
|
77
|
+
onasis auth logout # Logout from current session
|
|
108
78
|
```
|
|
109
79
|
|
|
110
|
-
|
|
80
|
+
## π» Shell Completions
|
|
81
|
+
|
|
82
|
+
### Installation Guide
|
|
111
83
|
```bash
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
#
|
|
170
|
-
|
|
89
|
+
# Bash
|
|
90
|
+
echo 'source <(onasis --completion bash)' >> ~/.bashrc
|
|
91
|
+
|
|
92
|
+
# Zsh
|
|
93
|
+
echo 'source <(onasis --completion zsh)' >> ~/.zshrc
|
|
171
94
|
|
|
172
|
-
#
|
|
173
|
-
|
|
95
|
+
# Fish
|
|
96
|
+
echo 'onasis --completion fish | source' >> ~/.config/fish/config.fish
|
|
174
97
|
```
|
|
175
98
|
|
|
176
|
-
|
|
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
|
-
|
|
106
|
+
## π Core Commands
|
|
179
107
|
|
|
180
|
-
###
|
|
108
|
+
### System Management
|
|
181
109
|
```bash
|
|
182
|
-
#
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
#
|
|
186
|
-
|
|
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
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
###
|
|
138
|
+
### Topic Management
|
|
194
139
|
```bash
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
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
|
-
|
|
200
|
-
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
###
|
|
164
|
+
### Configuration Management
|
|
207
165
|
```bash
|
|
208
|
-
#
|
|
209
|
-
|
|
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
|
-
|
|
212
|
-
|
|
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
|
-
##
|
|
181
|
+
## βοΈ Global Options
|
|
216
182
|
|
|
217
183
|
```bash
|
|
218
|
-
#
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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
|
-
|
|
224
|
-
npx -y @lanonasis/cli create -t "Quick Note" -c "NPX usage example"
|
|
193
|
+
## π― Advanced Usage
|
|
225
194
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
lanonasis
|
|
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
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
-
##
|
|
219
|
+
## π§ Development & Debugging
|
|
240
220
|
|
|
241
|
-
|
|
221
|
+
### Verbose Mode
|
|
222
|
+
```bash
|
|
223
|
+
onasis --verbose memory list # Detailed operation logs
|
|
224
|
+
onasis -V health # Short flag version
|
|
225
|
+
```
|
|
242
226
|
|
|
243
|
-
###
|
|
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
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
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
|
-
|
|
252
|
-
|
|
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
|
-
###
|
|
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
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
279
|
+
## π¨ Troubleshooting
|
|
288
280
|
|
|
281
|
+
### Common Issues
|
|
282
|
+
|
|
283
|
+
#### Authentication Failures
|
|
289
284
|
```bash
|
|
290
|
-
#
|
|
291
|
-
|
|
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
|
-
#
|
|
356
|
-
|
|
288
|
+
# Re-authenticate
|
|
289
|
+
onasis auth logout
|
|
290
|
+
onasis login --vendor-key pk_xxx.sk_xxx
|
|
291
|
+
```
|
|
357
292
|
|
|
358
|
-
|
|
359
|
-
|
|
293
|
+
#### Connection Issues
|
|
294
|
+
```bash
|
|
295
|
+
# Check system health
|
|
296
|
+
onasis health --verbose
|
|
360
297
|
|
|
361
|
-
# Test
|
|
362
|
-
|
|
298
|
+
# Test API connectivity
|
|
299
|
+
onasis --api-url https://api.lanonasis.com/api/v1 health
|
|
363
300
|
```
|
|
364
301
|
|
|
365
|
-
|
|
302
|
+
#### MCP Connection Issues
|
|
303
|
+
```bash
|
|
304
|
+
# Check MCP status
|
|
305
|
+
onasis mcp status --verbose
|
|
366
306
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
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
|
-
|
|
311
|
+
### Debug Mode
|
|
312
|
+
```bash
|
|
313
|
+
# Enable maximum verbosity
|
|
314
|
+
CLI_VERBOSE=true onasis --verbose health
|
|
315
|
+
```
|
|
375
316
|
|
|
376
|
-
|
|
377
|
-
Install the TypeScript/JavaScript SDK for application integration:
|
|
317
|
+
## π€ Contributing
|
|
378
318
|
|
|
319
|
+
### Development Setup
|
|
379
320
|
```bash
|
|
380
|
-
#
|
|
381
|
-
|
|
321
|
+
# Clone CLI source
|
|
322
|
+
git clone https://github.com/lanonasis/lanonasis-maas.git
|
|
323
|
+
cd lanonasis-maas/cli
|
|
382
324
|
|
|
383
|
-
#
|
|
384
|
-
|
|
325
|
+
# Install dependencies
|
|
326
|
+
npm install
|
|
385
327
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
328
|
+
# Build CLI
|
|
329
|
+
npm run build
|
|
330
|
+
|
|
331
|
+
# Link for local development
|
|
332
|
+
npm link
|
|
390
333
|
```
|
|
391
334
|
|
|
392
|
-
###
|
|
335
|
+
### Testing Changes
|
|
393
336
|
```bash
|
|
394
|
-
#
|
|
395
|
-
npm
|
|
396
|
-
|
|
397
|
-
# Install SDK locally for application development
|
|
398
|
-
npm install @lanonasis/memory-client
|
|
337
|
+
# Test build
|
|
338
|
+
npm run build
|
|
399
339
|
|
|
400
|
-
#
|
|
401
|
-
|
|
402
|
-
|
|
340
|
+
# Test CLI functionality
|
|
341
|
+
onasis --help
|
|
342
|
+
onasis health
|
|
403
343
|
```
|
|
404
344
|
|
|
405
|
-
##
|
|
345
|
+
## π Version History
|
|
406
346
|
|
|
407
|
-
|
|
408
|
-
-
|
|
409
|
-
-
|
|
410
|
-
-
|
|
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
|
|
365
|
+
MIT License - see [LICENSE](../LICENSE) for details.
|
|
415
366
|
|
|
416
|
-
##
|
|
367
|
+
## π Related Links
|
|
417
368
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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>< 50ms</strong> p99</td>
|
|
450
|
-
<td>Global average</td>
|
|
451
|
-
</tr>
|
|
452
|
-
<tr>
|
|
453
|
-
<td>Memory Search</td>
|
|
454
|
-
<td><strong>< 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
|
-
|
|
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*
|