feat: add official mem0 CLI (Python & TypeScript) (#4575)
This commit is contained in:
@@ -46,6 +46,10 @@ const client = new MemoryClient({ apiKey: 'your-api-key' });
|
||||
export MEM0_API_KEY="your-api-key"
|
||||
```
|
||||
|
||||
```bash CLI
|
||||
mem0 init --api-key "your-api-key"
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
</Step>
|
||||
|
||||
@@ -80,6 +84,10 @@ curl -X POST https://api.mem0.ai/v1/memories/add \
|
||||
}'
|
||||
```
|
||||
|
||||
```bash CLI
|
||||
mem0 add "I'm a vegetarian and allergic to nuts." --user-id user123
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
</Step>
|
||||
|
||||
@@ -105,6 +113,10 @@ curl -X POST https://api.mem0.ai/v1/memories/search \
|
||||
}'
|
||||
```
|
||||
|
||||
```bash CLI
|
||||
mem0 search "What are my dietary restrictions?" --user-id user123
|
||||
```
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
**Output:**
|
||||
|
||||
Reference in New Issue
Block a user