Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

pyrofast/dotmemlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotmemlink

dotmemlink is a high-performance, lightweight CLI tool written in Rust designed to synchronize and manage .memlink directories intelligently.

It solves the problem of having separate, un-synced memory profiles (e.g., between WSL/Linux and host Windows filesystems, or across different local setups) by bidirectionally or unidirectionally merging memory files using modification timestamps as the source of truth, ensuring indexes are preserved.


Key Features

  • Bidirectional or Unidirectional Synchronization: Synchronize directory profiles seamlessly.
  • Timestamp-Aware Overwrites: Safe copies that compare updatedAt strings embedded within memory JSONs (falling back to file mtime).
  • Active Directory Locking: Uses system-level exclusive locks (dotmemlink.lock) during operations to prevent concurrency conflicts.
  • Interactive / Preview Modes: Review proposed synchronization actions with --dry-run or confirm individual changes interactively using --interactive.
  • Date Range Filters: Keep sync windows narrow using --since YYYY-MM-DD and --before YYYY-MM-DD.
  • Seamless Import/Export: Back up memories to a flat directory and import them back with automatic ID generation for untracked JSON files.
  • Automated self-updates: Upgrades to the latest GitHub release via dotmemlink upgrade.

Automated Installation

Install dotmemlink with a single command on your terminal.

Linux / macOS (bash)

curl -fsSL https://raw.githubusercontent.com/memlinkdotdev/dotmemlink/main/scripts/install.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/memlinkdotdev/dotmemlink/main/scripts/install.ps1 | iex

Usage

1. Synchronizing Memories

The sync subcommand aligns two .memlink directories:

# Sync from WSL/Linux to Windows (Unidirectional, overwrites older Windows files)
dotmemlink sync --from ~/.memlink --to /mnt/c/Users/UserName/.memlink

# Bi-directional sync (copies newer files back and forth, updates both config.json maps)
dotmemlink sync --from ~/.memlink --to /mnt/c/Users/UserName/.memlink --two-way

# Run a safe preview (dry-run)
dotmemlink sync --from ~/.memlink --to /mnt/c/Users/UserName/.memlink --two-way --dry-run

# Interactive sync (prompts you before writing)
dotmemlink sync --from ~/.memlink --to /mnt/c/Users/UserName/.memlink --two-way --interactive

# Sync only memories modified since a specific date
dotmemlink sync --from ~/.memlink --to /mnt/c/Users/UserName/.memlink --two-way --since 2026-05-01

2. Exporting Memories

Export all JSON files to a flat directory for backup:

dotmemlink export --source ~/.memlink --target ~/backups/memlink-flat

3. Importing Memories

Import JSON files from a flat directory, automatically generating 12-character alphanumeric IDs and registering them inside target .memlink/config.json:

dotmemlink import --source ~/backups/memlink-flat --target ~/.memlink

4. Self-Upgrade

Upgrade dotmemlink to the latest version directly from GitHub Releases:

dotmemlink upgrade

5. Version Verification

Show the current version and compilation commit hash:

dotmemlink version

Building from Source

If you have Rust installed locally, you can build from source:

git clone https://github.com/memlinkdotdev/dotmemlink.git
cd dotmemlink
cargo build --release

To run the integration test suite:

cargo test

License

This project is licensed under the MIT License.

About

Intelligent bi-directional sync for .memlink directories using modification times

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors