@rockshin/tao-env
v0.0.1
Published
Sync your personal config dirs (~/.claude, ~/.on, dotfiles…) across machines via a private GitHub repo, with per-file secret stripping.
Downloads
194
Maintainers
Readme
tao-env
The Way of Your Environment. Sync your Macs with grace.
Sync your personal config directories across machines via a private GitHub repo.
Not just ~/.claude — any config dir you list: ~/.on, dotfiles, tool configs. Each is a target mirrored under its own prefix in the repo, with per-file secret stripping.
Why
Tools like chezmoi/yadm are great but heavy. tao-env stays small and does one opinionated thing well: whitelist-copy a few config dirs into a private repo, scrub secrets on the way out, merge them back on the way in.
Targets
Config is a list of targets:
{
"repo": "[email protected]:you/my-config.git",
"scan": true,
"targets": [
{ "name": "claude", "source": "~/.claude", "repoPath": "claude",
"include": ["CLAUDE.md","skills/**","settings.json", "..."],
"exclude": ["**/node_modules/**"],
"secrets": [{ "file": "settings.json", "keys": ["env.ANTHROPIC_AUTH_TOKEN"] }] },
{ "name": "on", "source": "~/.on", "repoPath": "on", "include": ["**"], "exclude": [] }
]
}Each target's files land in repo/<repoPath>/….
Security
- Secret keys are stripped before anything touches the repo; the scan runs on the stripped staged content.
pulldoes a field-level merge — your local secrets are kept, only non-secret config updates.- A regex secret scan runs over every staged file before push and aborts on anything that looks like a token.
Install
Install globally — gives you a short tao-env command for daily use:
npm i -g @rockshin/tao-env # requires: node >=18, git, gh (authenticated)Or just try it once without installing (npx fetches the latest each run):
npx @rockshin/tao-env statusUsage
tao-env init # pick/create the private repo, write default targets
tao-env status # local vs remote diff (per target)
tao-env push # local -> remote
tao-env pull # remote -> local (backs up before overwrite)
tao-env sync # pull + push
tao-env diff # per-file diff
tao-env doctor # check git/gh/auth/config healthAll mutating commands support --dry-run. Not installed globally? Prefix any command with npx @rockshin/tao-env (e.g. npx @rockshin/tao-env push --dry-run).
Develop
bun install
bun run dev <cmd>
bun test
bun run typecheck
bun run build # -> dist/cli.js (node-compatible)License
MIT
