tc is a Rust CLI that unifies two daily workflows:
- Snippet copy: type
tc copy <snippet>(aliastc c) to stream any markdown snippet under~/.config/tmpc/commands/into your clipboard. - Context orchestration: type
tc touch <key>(aliastc t) to create context files in your project with clipboard content, andtc cat <key>(aliastc ct) to view their contents.
tc runs on macOS and Linux.
~/.config/tmpc/
commands/
w/wc.md
sdd/sdd-0-rq.md
... (any nested directory structure)
- Snippet lookup scans
commands/recursively for.mdfiles. Bothtc c wcandtc c w/wcresolve tocommands/w/wc.md. tc which(alias:tc wh) prints the absolute commands root path.tc which <snippet>prints the absolute path for the resolved snippet file.
The crate is organized by explicit ownership boundaries:
src/cli/: clap parsing, terminal output, and process-facing behavior.src/app/: use-case orchestration modules at the app root (list,copy,which,touch,cat,clean).src/snippets/: snippet models, lookup contracts, and filesystem catalog implementation.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
tc. - Development guide: Instructions for setting up the development environment, running tests, and contributing.