@lanonasis/cli 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -25
- package/dist/commands/api-keys.d.ts +3 -0
- package/dist/commands/api-keys.js +812 -0
- package/dist/commands/mcp.js +2 -2
- package/dist/commands/memory.js +13 -8
- package/dist/commands/topics.js +2 -2
- package/dist/index-simple.js +522 -189
- package/dist/index.js +319 -23
- package/dist/utils/api.d.ts +12 -2
- package/dist/utils/api.js +17 -0
- package/dist/utils/formatting.d.ts +2 -0
- package/dist/utils/formatting.js +13 -0
- package/dist/utils/mcp-client.js +13 -7
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
# Lanonasis CLI - Enterprise Infrastructure Management
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@lanonasis/cli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://modelcontextprotocol.com)
|
|
6
|
+
|
|
3
7
|
🚀 **Professional CLI for Lanonasis Platform Services with MCP Integration**
|
|
4
8
|
|
|
5
9
|
The Lanonasis CLI provides a powerful command-line interface for interacting with the entire Lanonasis ecosystem, including Memory as a Service (MaaS), infrastructure management, and multi-service orchestration. Now with **Model Context Protocol (MCP)** integration for unified AI-agent communication. Manage your memories, search through knowledge bases, organize your thoughts, and control your infrastructure - all from the terminal.
|
|
6
10
|
|
|
7
|
-
## 🆕 New in v1.
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
11
|
+
## 🆕 New in v1.2.0 - API Key Management Integration
|
|
12
|
+
- **API Key Management**: Complete CLI commands for secure API key lifecycle management
|
|
13
|
+
- **MCP Tool Registration**: Register and manage MCP tools with scoped API access
|
|
14
|
+
- **Analytics & Security**: Track usage patterns and monitor security events
|
|
15
|
+
- **Project-based Organization**: Group API keys by projects for better organization
|
|
16
|
+
- **Zero-trust Security**: Encrypted key storage with proxy token generation
|
|
17
|
+
- **MCP Server Mode**: Run as MCP server for AI assistants (Claude, Cursor, Windsurf)
|
|
18
|
+
- **Hybrid Architecture**: Seamless switching between local MCP and remote API
|
|
10
19
|
- **Real-time Updates**: SSE streaming for live memory synchronization
|
|
11
|
-
- **Unified Interface**: Same commands work with local or cloud backends
|
|
12
20
|
|
|
13
21
|
## ⚡ Quick Start
|
|
14
22
|
|
|
@@ -77,6 +85,20 @@ npx lanonasis --help
|
|
|
77
85
|
- `lanonasis list [-l <limit>] [--type <type>]` - List memories
|
|
78
86
|
- `lanonasis help` - Show detailed help
|
|
79
87
|
|
|
88
|
+
### 🔑 API Key Management (NEW in v1.2.0)
|
|
89
|
+
- `lanonasis api-keys create` - Create a new API key with secure encryption
|
|
90
|
+
- `lanonasis api-keys list` - List all API keys with usage statistics
|
|
91
|
+
- `lanonasis api-keys get <keyId>` - Get details of a specific API key
|
|
92
|
+
- `lanonasis api-keys update <keyId>` - Update API key name, tags, or rotation policy
|
|
93
|
+
- `lanonasis api-keys delete <keyId>` - Securely delete an API key
|
|
94
|
+
- `lanonasis api-keys projects create` - Create a project for organizing keys
|
|
95
|
+
- `lanonasis api-keys projects list` - List all API key projects
|
|
96
|
+
- `lanonasis api-keys mcp register-tool` - Register MCP tools for API access
|
|
97
|
+
- `lanonasis api-keys mcp list-tools` - List registered MCP tools
|
|
98
|
+
- `lanonasis api-keys mcp request-access` - Request access to API keys via MCP
|
|
99
|
+
- `lanonasis api-keys analytics usage` - View API key usage analytics
|
|
100
|
+
- `lanonasis api-keys analytics security-events` - Monitor security events
|
|
101
|
+
|
|
80
102
|
#### Alternative Commands (Backwards Compatibility)
|
|
81
103
|
- `memory <command>` - Direct memory operations
|
|
82
104
|
- `maas <command>` - Memory as a Service operations
|
|
@@ -145,35 +167,90 @@ maas list --type knowledge # MaaS command
|
|
|
145
167
|
|
|
146
168
|
The CLI now includes full MCP support for AI agent integration:
|
|
147
169
|
|
|
170
|
+
### Start MCP Server Mode
|
|
171
|
+
|
|
148
172
|
```bash
|
|
149
|
-
#
|
|
150
|
-
lanonasis mcp
|
|
151
|
-
lanonasis mcp
|
|
152
|
-
lanonasis mcp
|
|
173
|
+
# Start as MCP server for AI assistants
|
|
174
|
+
lanonasis mcp start # Default port 3002
|
|
175
|
+
lanonasis mcp start --port 8080 # Custom port
|
|
176
|
+
lanonasis mcp start --mode server # Explicit server mode
|
|
153
177
|
|
|
154
|
-
#
|
|
155
|
-
lanonasis mcp
|
|
178
|
+
# Or use npx without installation
|
|
179
|
+
npx -y @lanonasis/cli mcp start
|
|
180
|
+
```
|
|
156
181
|
|
|
157
|
-
|
|
158
|
-
|
|
182
|
+
### Configure AI Assistants
|
|
183
|
+
|
|
184
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"mcpServers": {
|
|
188
|
+
"memory-service": {
|
|
189
|
+
"command": "npx",
|
|
190
|
+
"args": ["-y", "@lanonasis/cli", "mcp", "start"],
|
|
191
|
+
"env": {
|
|
192
|
+
"LANONASIS_API_KEY": "your-api-key-here"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
159
198
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
199
|
+
**Cursor/Windsurf** (Settings):
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"mcp.servers": {
|
|
203
|
+
"memory-service": {
|
|
204
|
+
"command": "lanonasis",
|
|
205
|
+
"args": ["mcp", "start"],
|
|
206
|
+
"env": {
|
|
207
|
+
"LANONASIS_API_KEY": "your-api-key-here"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
163
213
|
|
|
164
|
-
|
|
165
|
-
lanonasis memory-mcp stream
|
|
214
|
+
### MCP Commands
|
|
166
215
|
|
|
167
|
-
|
|
168
|
-
|
|
216
|
+
```bash
|
|
217
|
+
# Server operations
|
|
218
|
+
lanonasis mcp start # Start MCP server
|
|
219
|
+
lanonasis mcp stop # Stop MCP server
|
|
220
|
+
lanonasis mcp status # Check server status
|
|
221
|
+
lanonasis mcp logs # View server logs
|
|
222
|
+
|
|
223
|
+
# Tool discovery
|
|
224
|
+
lanonasis mcp tools # List all available MCP tools
|
|
225
|
+
lanonasis mcp tools --json # Output as JSON
|
|
226
|
+
|
|
227
|
+
# Test connectivity
|
|
228
|
+
lanonasis mcp test # Test MCP connection
|
|
229
|
+
lanonasis mcp test --tool <name> # Test specific tool
|
|
169
230
|
```
|
|
170
231
|
|
|
232
|
+
### Available MCP Tools
|
|
233
|
+
|
|
234
|
+
- `memory_create_memory` - Create new memories with embeddings
|
|
235
|
+
- `memory_search_memories` - Semantic search across memories
|
|
236
|
+
- `memory_list_memories` - List and filter memories
|
|
237
|
+
- `memory_get_memory` - Retrieve specific memory
|
|
238
|
+
- `memory_update_memory` - Update existing memories
|
|
239
|
+
- `memory_delete_memory` - Delete memories
|
|
240
|
+
- `memory_bulk_create` - Batch create multiple memories
|
|
241
|
+
- `memory_bulk_delete` - Batch delete memories
|
|
242
|
+
- `memory_get_stats` - Get memory statistics
|
|
243
|
+
- `memory_export_data` - Export memories (JSON/CSV/YAML)
|
|
244
|
+
- `memory_import_data` - Import memories from files
|
|
245
|
+
|
|
171
246
|
### MCP Features:
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
247
|
+
- **🔌 WebSocket Server**: Real-time bidirectional communication
|
|
248
|
+
- **🔄 Hybrid Mode**: Automatic fallback between local/remote
|
|
249
|
+
- **🔐 Secure Auth**: API key and JWT token support
|
|
250
|
+
- **📊 Real-time SSE**: Live updates in remote mode
|
|
251
|
+
- **🛠️ Tool Discovery**: Dynamic tool listing for AI agents
|
|
252
|
+
- **🎯 Auto-detection**: Intelligently chooses best mode
|
|
253
|
+
- **📝 Full Memory API**: All operations exposed as MCP tools
|
|
177
254
|
|
|
178
255
|
## 🌐 MaaS Service Integration
|
|
179
256
|
|
|
@@ -284,6 +361,33 @@ MIT License - see LICENSE file for details
|
|
|
284
361
|
- **Research Organization** - Academic and research note-taking
|
|
285
362
|
- **API Integration** - Programmatic memory management
|
|
286
363
|
|
|
364
|
+
## 🏆 Production Ready Features
|
|
365
|
+
|
|
366
|
+
### Enterprise Capabilities
|
|
367
|
+
- **🔐 Secure Authentication** - API key and JWT token support
|
|
368
|
+
- **🌐 Multi-tenant Support** - Isolated memory spaces per user/org
|
|
369
|
+
- **📊 Rate Limiting** - Built-in request throttling
|
|
370
|
+
- **🔄 Retry Logic** - Automatic retry with exponential backoff
|
|
371
|
+
- **📝 Comprehensive Logging** - Debug and audit trails
|
|
372
|
+
- **🚀 Performance Optimized** - Minimal overhead, fast responses
|
|
373
|
+
|
|
374
|
+
### Commercial Use Cases
|
|
375
|
+
- **💼 Enterprise Knowledge Management** - Company-wide memory system
|
|
376
|
+
- **🤝 Team Collaboration** - Shared project memories
|
|
377
|
+
- **🎓 Educational Platforms** - Student/teacher memory sharing
|
|
378
|
+
- **🏥 Healthcare Systems** - Patient context management
|
|
379
|
+
- **💰 Financial Services** - Transaction memory and audit trails
|
|
380
|
+
- **🛒 E-commerce** - Customer interaction history
|
|
381
|
+
|
|
382
|
+
### Integration Ready
|
|
383
|
+
- **REST API** - Standard HTTP/JSON interface
|
|
384
|
+
- **MCP Protocol** - AI assistant integration
|
|
385
|
+
- **WebSocket** - Real-time updates
|
|
386
|
+
- **SSE Streaming** - Live data synchronization
|
|
387
|
+
- **SDK Available** - TypeScript/JavaScript client library
|
|
388
|
+
|
|
287
389
|
---
|
|
288
390
|
|
|
289
|
-
**Built with ❤️ for the Memory as a Service ecosystem**
|
|
391
|
+
**Built with ❤️ for the Memory as a Service ecosystem**
|
|
392
|
+
|
|
393
|
+
🚀 **Ready for Production** | 📚 [Documentation](https://docs.lanonasis.com) | 🌐 [Platform](https://api.lanonasis.com)
|