Mastering Basic-Memory CLI for Neural Archives
Configuring Memory Projects
Managing Your Knowledge Projects
With basic-memory installed, the next step is to teach it where your knowledge lives. You don't move or copy your files. Instead, you create a "project" that points to your existing folders, like an Obsidian vault or a directory of technical documents. This process builds a high-speed index of your notes, making them available for search and analysis.
The core command for this is bm project. Let's start by adding your main Obsidian vault.
# Add a new project named 'obsidian_vault' that points to a specific directory
bm project add obsidian_vault --path /Users/me/Documents/ObsidianVault
Executing this command kicks off an indexing process. The tool scans every markdown file in the specified path, parsing the content and metadata. It then stores this information in a local SQLite database file. Your original markdown files are never modified; they remain the single source of truth. The SQLite file is just a fast, searchable cache.
Think of the SQLite index as a library's card catalog. The books (your notes) stay on the shelves, but the catalog lets you find what you need instantly without searching every aisle.
Verifying the Index
For a large vault with thousands of notes, it's crucial to confirm that everything was indexed correctly. The first command to use is bm status with the --verbose flag, which provides a detailed look at the system's state.
$ bm status --verbose
Projects:
- obsidian_vault (default)
- Path: /Users/me/Documents/ObsidianVault
- Indexed Documents: 7123
- Last Synced: 2023-10-27 10:45:12
The Indexed Documents count should match the number of notes in your vault. If the numbers seem off, it might indicate an issue with file permissions or unsupported file types. For a more focused view on a single project, use bm project info.
bm project info obsidian_vault
This command gives you a summary for that specific project, including its name, path, and total indexed files. It's a quick way to check on one project without seeing the status of the entire system.
Working with Multiple Projects
You can manage several knowledge bases at once. For instance, you might have your main Obsidian vault and a separate folder for work-related documentation. You can add the second folder as another project.
bm project add work_docs --path /Users/me/Work/documentation
Now you have two distinct projects. To see all of them, you use the list subcommand.
$ bm project list
Projects:
- obsidian_vault
- work_docs
When you run a search or interact with your memories, the system needs to know which project to target. One project is always set as the default. To change it, use the default command.
# Set 'work_docs' as the new default project
bm project default work_docs
Now, all commands will run against your work documentation unless you specify otherwise. If a project is no longer needed, you can remove it. This only deletes the index from basic-memory, not your actual files.
bm project remove work_docs
Let's review the main project commands.
| Command | Description |
|---|---|
bm project add <name> --path <path> | Creates and indexes a new project. |
bm project list | Shows all configured projects. |
bm project default <name> | Sets the default project for all operations. |
bm project remove <name> | Removes a project and its index. |
bm project info <name> | Displays details for a specific project. |
Mastering these commands is the foundation for turning your static notes into a dynamic, queryable knowledge base ready for more advanced data pipelines.
What happens when you create a new project using the bm project command?
True or False: The basic-memory tool modifies your original markdown files to add indexing metadata.