memex

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

README

memex

Manage Agent Skills across harnesses — Claude Code, Codex, pi — with symlinks from one git-versioned library.

Install · Usage · Configuration · Contributing


Named after Vannevar Bush's memex, the original vision of linked knowledge.

Skills live in one place (~/.memex/skills by default) and are linked as directory symlinks into any skills directory a harness reads — global or per-project. memex only ever creates and removes symlinks that point into the library; it never touches real directories or links it doesn't own.

Install

Requires Go 1.26+:

go install github.com/kocieusz/memex@latest

The binary lands in $(go env GOPATH)/bin (usually ~/go/bin) — make sure that's on your PATH.

Usage

Start a library by scaffolding a skill, pulling some from a repo, or adopting one you already have:

memex touch my-skill                        # scaffold skills/my-skill/SKILL.md
memex clone anthropics/skills               # pick skills from a repo, copy them into the library
memex adopt ~/.agents/skills/some-skill     # move a real skill dir into the library, symlink back

Then run memex inside any skills directory (or a project containing one) to get an interactive checklist — space toggles a skill, enter applies:

  Target: ~/.claude/skills          Source: ~/.memex/skills (2 skills)

  ▸ [x] scoped-commits        linked
    [ ] weighted-decision     available

  ↑/↓ move · space toggle · a all · n none · / filter · enter apply · q quit

Run it outside a skills directory to pick a global harness target (claude, codex, pi, agents) — all linking and unlinking happens through the TUI. After applying (or backing out with q), you return to the picker, so several harnesses can be updated in one session. Inside a project, memex global skips the project's own skills dirs and goes straight to the global targets.

When the target lives inside a project's git repo, memex maintains a .gitignore next to the symlinks: linked skills are added (they point into your home dir and would be broken for collaborators) and removed again on unlink, deleting the file once nothing else remains in it.

Inspect without the TUI:

memex ls --target claude                    # linked/available/broken skills
memex ls -a --target claude                 # also native dirs and foreign links
memex ls --target claude --json
memex ls                                    # in a skills dir: that dir; in the library: all your skills

Keep things healthy:

memex doctor --fix                          # remove broken links, report missing SKILL.md

clone shallow-clones the repo, finds every directory holding a SKILL.md, and opens a checklist to pick the ones to copy; each row shows the skill's path inside the repo, and i reveals its description. It also takes full clone URLs and GitHub /tree/<branch>[/dir] links; --branch picks a branch explicitly (needed for branch names containing /). Skills whose name already exists in the library are shown but can't be selected.

Configuration

The library defaults to ~/.memex/skills. To keep it somewhere else — say, in your dotfiles repo — point memex at it in ~/.memex/config.toml:

library = "~/.dotfiles/skills"

Precedence, highest first: the --source flag, the MEMEX_SOURCE environment variable, the config file, the default.

Contributing

memex doesn't accept external pull requests — read CONTRIBUTING.md before opening one. Bug reports and ideas are very welcome as issues.

Documentation

Overview

memex links Agent Skills from a git-versioned library (~/.memex/skills by default) into harness skills directories via symlinks.

Directories

Path Synopsis
internal
config
Package config loads the memex config file, a small TOML file at ~/.memex/config.toml — alongside the default library, ~/.memex/skills.
Package config loads the memex config file, a small TOML file at ~/.memex/config.toml — alongside the default library, ~/.memex/skills.
library
Package library scans and manages the skill library: the source-of-truth directory (~/.memex/skills by default) whose immediate subdirectories containing a SKILL.md are linkable skills.
Package library scans and manages the skill library: the source-of-truth directory (~/.memex/skills by default) whose immediate subdirectories containing a SKILL.md are linkable skills.
remote
Package remote fetches skills from a git repository: parse a repo reference, shallow-clone it, discover the skills inside, and copy the selected ones into the library.
Package remote fetches skills from a git repository: parse a repo reference, shallow-clone it, discover the skills inside, and copy the selected ones into the library.
target
Package target scans harness skills directories, classifies their entries, and performs the only mutations memex is allowed: creating symlinks into the library and removing symlinks that point into the library.
Package target scans harness skills directories, classifies their entries, and performs the only mutations memex is allowed: creating symlinks into the library and removing symlinks that point into the library.
tui
Package tui implements the interactive screens: the skill checklist for one target directory, and the target picker.
Package tui implements the interactive screens: the skill checklist for one target directory, and the target picker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL