mx is a Rust CLI that unifies two daily workflows:
- Snippet copy – type
mx copy <snippet>(aliasmx c) to stream any markdown snippet under~/.config/mx/commands/into your clipboard. - Context Orchestration – type
mx touch <key>(aliasmx t) to create context files in your project with clipboard content, andmx cat <key>(aliasmx ct) to view their contents.
~/.config/mx/
commands/
w/wc.md
sdd/sdd-0-rq.md
... (any nested directory structure)
- Snippet lookup scans
commands/recursively for.mdfiles. Bothmx c wcandmx c w/wcresolve tocommands/w/wc.md.
The crate is organized by explicit ownership boundaries:
src/cli/: clap parsing, terminal output, and process-facing behavior.src/app/: use-case orchestration grouped by family (app/snippets,app/context_files).src/snippets/: snippet models, lookup/store contracts, checkout contracts, and filesystem implementations.src/context_files/: context alias/path resolution and context lifecycle storage.src/clipboard/: clipboard contract and system/file implementations.src/project_fs/: safe path validation and project-root filesystem concerns.src/error.rs: shared application error boundary.
- CLI usage: Learn how to use the CLI, manage context aliases, and work with dynamic paths.
- Configuration: Environment variables and other ways to configure
mx. - Development guide: Instructions for setting up the development environment, running tests, and contributing.