|
13 | 13 | ██╔══██╗██╔══██║╚════██║██║██║ ██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║██║ ██║██╔══██╗ ╚██╔╝ |
14 | 14 | ██████╔╝██║ ██║███████║██║╚██████╗ ██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝██║ ██║ ██║ |
15 | 15 | ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ |
| 16 | +
|
16 | 17 | ``` |
17 | 18 |
|
18 | 19 | Basic Memory lets you build persistent knowledge through natural conversations with Large Language Models (LLMs) like |
@@ -355,6 +356,25 @@ for OS X): |
355 | 356 | } |
356 | 357 | ``` |
357 | 358 |
|
| 359 | +If you want to use a specific project (see [Multiple Projects](#multiple-projects) below), update your Claude Desktop |
| 360 | +config: |
| 361 | + |
| 362 | +```json |
| 363 | +{ |
| 364 | + "mcpServers": { |
| 365 | + "basic-memory": { |
| 366 | + "command": "uvx", |
| 367 | + "args": [ |
| 368 | + "basic-memory", |
| 369 | + "mcp", |
| 370 | + "--project", |
| 371 | + "your-project-name" |
| 372 | + ] |
| 373 | + } |
| 374 | + } |
| 375 | +} |
| 376 | +``` |
| 377 | + |
358 | 378 | 2. Sync your knowledge: |
359 | 379 |
|
360 | 380 | ```bash |
@@ -386,6 +406,56 @@ canvas(nodes, edges, title, folder) - Generate knowledge visualizations |
386 | 406 | "What have I been working on in the past week?" |
387 | 407 | ``` |
388 | 408 |
|
| 409 | +## Multiple Projects |
| 410 | + |
| 411 | +Basic Memory supports managing multiple separate knowledge bases through projects. This feature allows you to maintain |
| 412 | +separate knowledge graphs for different purposes (e.g., personal notes, work projects, research topics). |
| 413 | + |
| 414 | +### Managing Projects |
| 415 | + |
| 416 | +```bash |
| 417 | +# List all configured projects |
| 418 | +basic-memory project list |
| 419 | + |
| 420 | +# Add a new project |
| 421 | +basic-memory project add work ~/work-basic-memory |
| 422 | + |
| 423 | +# Set the default project |
| 424 | +basic-memory project default work |
| 425 | + |
| 426 | +# Remove a project (doesn't delete files) |
| 427 | +basic-memory project remove personal |
| 428 | + |
| 429 | +# Show current project |
| 430 | +basic-memory project current |
| 431 | +``` |
| 432 | + |
| 433 | +### Using Projects in Commands |
| 434 | + |
| 435 | +All commands support the `--project` flag to specify which project to use: |
| 436 | + |
| 437 | +```bash |
| 438 | +# Sync a specific project |
| 439 | +basic-memory --project=work sync |
| 440 | + |
| 441 | +# Run MCP server for a specific project |
| 442 | +basic-memory --project=personal mcp |
| 443 | +``` |
| 444 | + |
| 445 | +You can also set the `BASIC_MEMORY_PROJECT` environment variable: |
| 446 | + |
| 447 | +```bash |
| 448 | +BASIC_MEMORY_PROJECT=work basic-memory sync |
| 449 | +``` |
| 450 | + |
| 451 | +### Project Isolation |
| 452 | + |
| 453 | +Each project maintains: |
| 454 | + |
| 455 | +- Its own collection of markdown files in the specified directory |
| 456 | +- A separate SQLite database for that project |
| 457 | +- Complete knowledge graph isolation from other projects |
| 458 | + |
389 | 459 | ## Design Philosophy |
390 | 460 |
|
391 | 461 | Basic Memory is built on some key ideas: |
@@ -532,6 +602,65 @@ Basic Memory is flexible about how you organize your files: |
532 | 602 |
|
533 | 603 | The system will build the semantic knowledge graph regardless of your file organization preference. |
534 | 604 |
|
| 605 | +## Using stdin with Basic Memory's `write_note` Tool |
| 606 | + |
| 607 | +The `write-note` tool supports reading content from standard input (stdin), allowing for more flexible workflows when |
| 608 | +creating or updating notes in your Basic Memory knowledge base. |
| 609 | + |
| 610 | +### Use Cases |
| 611 | + |
| 612 | +This feature is particularly useful for: |
| 613 | + |
| 614 | +1. **Piping output from other commands** directly into Basic Memory notes |
| 615 | +2. **Creating notes with multi-line content** without having to escape quotes or special characters |
| 616 | +3. **Integrating with AI assistants** like Claude Code that can generate content and pipe it to Basic Memory |
| 617 | +4. **Processing text data** from files or other sources |
| 618 | + |
| 619 | +## Basic Usage |
| 620 | + |
| 621 | +### Method 1: Using a Pipe |
| 622 | + |
| 623 | +You can pipe content from another command into `write_note`: |
| 624 | + |
| 625 | +```bash |
| 626 | +# Pipe output of a command into a new note |
| 627 | +echo "# My Note\n\nThis is a test note" | basic-memory tools write-note --title "Test Note" --folder "notes" |
| 628 | + |
| 629 | +# Pipe output of a file into a new note |
| 630 | +cat README.md | basic-memory tools write-note --title "Project README" --folder "documentation" |
| 631 | + |
| 632 | +# Process text through other tools before saving as a note |
| 633 | +cat data.txt | grep "important" | basic-memory tools write-note --title "Important Data" --folder "data" |
| 634 | +``` |
| 635 | + |
| 636 | +### Method 2: Using Heredoc Syntax |
| 637 | + |
| 638 | +For multi-line content, you can use heredoc syntax: |
| 639 | + |
| 640 | +```bash |
| 641 | +# Create a note with heredoc |
| 642 | +cat << EOF | basic-memory tools write_note --title "Project Ideas" --folder "projects" |
| 643 | +# Project Ideas for Q2 |
| 644 | +
|
| 645 | +## AI Integration |
| 646 | +- Improve recommendation engine |
| 647 | +- Add semantic search to product catalog |
| 648 | +
|
| 649 | +## Infrastructure |
| 650 | +- Migrate to Kubernetes |
| 651 | +- Implement CI/CD pipeline |
| 652 | +EOF |
| 653 | +``` |
| 654 | + |
| 655 | +### Method 3: Input Redirection |
| 656 | + |
| 657 | +You can redirect input from a file: |
| 658 | + |
| 659 | +```bash |
| 660 | +# Create a note from file content |
| 661 | +basic-memory tools write-note --title "Meeting Notes" --folder "meetings" < meeting_notes.md |
| 662 | +``` |
| 663 | + |
535 | 664 | ## License |
536 | 665 |
|
537 | 666 | AGPL-3.0 |
|
0 commit comments