Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,36 @@ uv tool install basic-memory

You can view shared context via files in `~/basic-memory` (default directory location).

## Automatic Updates

Basic Memory includes a default-on auto-update flow for CLI installs.

- **Auto-install supported:** `uv tool` and Homebrew installs
- **Default check interval:** every 24 hours (`86400` seconds)
- **MCP-safe behavior:** update checks run silently in `basic-memory mcp` mode
- **`uvx` behavior:** skipped (runtime is ephemeral and managed by `uvx`)

Manual update commands:

```bash
# Check now and install if supported
bm update

# Check only, do not install
bm update --check
```

Config options in `~/.basic-memory/config.json`:

```json
{
"auto_update": true,
"update_check_interval": 86400
}
```

To disable automatic updates, set `"auto_update": false`.

## Why Basic Memory?

Most LLM interactions are ephemeral - you ask a question, get an answer, and everything is forgotten. Each conversation
Expand Down
18 changes: 17 additions & 1 deletion llms-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ Or for a one-time sync:
basic-memory sync
```

### 4. Updating Basic Memory

Basic Memory supports automatic updates by default for `uv tool` and Homebrew installs.

For manual checks and upgrades:

```bash
# Check now and install if supported
bm update

# Check only, do not install
bm update --check
```

To disable automatic updates, set `"auto_update": false` in `~/.basic-memory/config.json`.

## Configuration Options

### Custom Directory
Expand Down Expand Up @@ -125,4 +141,4 @@ If you encounter issues:
cat ~/.basic-memory/basic-memory.log
```

For more detailed information, refer to the [full documentation](https://memory.basicmachines.co/).
For more detailed information, refer to the [full documentation](https://docs.basicmemory.com/).
14 changes: 10 additions & 4 deletions src/basic_memory/cli/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import typer # noqa: E402

from basic_memory.cli.auto_update import maybe_run_periodic_auto_update # noqa: E402
from basic_memory.cli.container import CliContainer, set_container # noqa: E402
from basic_memory.cli.promo import maybe_show_cloud_promo, maybe_show_init_line # noqa: E402
from basic_memory.config import init_cli_logging # noqa: E402
Expand Down Expand Up @@ -52,10 +53,14 @@ def app_callback(
# Outcome: one-time plain line printed before the subcommand runs.
maybe_show_init_line(ctx.invoked_subcommand)

# Trigger: register promo as a post-command callback.
# Why: promo output should appear after the command's own output, not before.
# Outcome: promo panel renders below the command results (status tree, table, etc.).
ctx.call_on_close(lambda: maybe_show_cloud_promo(ctx.invoked_subcommand))
# Trigger: register post-command messaging callbacks.
# Why: informational/promo/update output belongs below command results.
# Outcome: command output remains primary, with optional follow-up notices afterwards.
def _post_command_messages() -> None:
maybe_show_cloud_promo(ctx.invoked_subcommand)
maybe_run_periodic_auto_update(ctx.invoked_subcommand)

ctx.call_on_close(_post_command_messages)

# Run initialization for commands that don't use the API
# Skip for 'mcp' command - it has its own lifespan that handles initialization
Expand All @@ -70,6 +75,7 @@ def app_callback(
"tool",
"reset",
"reindex",
"update",
"watch",
}
if (
Expand Down
Loading
Loading