Dotweave is a git-backed configuration synchronization tool for dotfiles. Unlike traditional tools that force you to shape your local environment around a repository, Dotweave treats your home directory (HOME) as the source of truth and uses a git repository purely as a synchronization artifact.
- Main Technologies: Node.js (>=24), TypeScript, pnpm (Monorepo),
@stricli/core(CLI),zod(Validation),age-encryption(Secrets),vitest(Testing),Astro/Starlight(Homepage/Docs). - Architecture: A monorepo containing a CLI package (
@tinyrack/dotweave) and a documentation homepage (@tinyrack/dotweave-homepage).
You MUST execute a validation loop for every change to ensure system integrity.
- Build:
pnpm run build - Test:
pnpm run test - Lint/Format (biome):
pnpm run formatandpnpm run format:check
If any step fails, you MUST fix the issues before proceeding or reporting completion. Specifically for the CLI package, you can use pnpm --filter @tinyrack/dotweave check for a comprehensive check.
Managed via pnpm workspaces:
packages/cli: The core CLI tool.packages/homepage: Documentation and landing page built with Astro.
- Install Dependencies:
pnpm install - Build All:
pnpm run build - Run All Dev:
pnpm run dev - Format Code:
pnpm run format
- Development (Watch):
pnpm --filter @tinyrack/dotweave dev - Build:
pnpm --filter @tinyrack/dotweave build - Typecheck:
pnpm --filter @tinyrack/dotweave typecheck - Run Tests:
pnpm --filter @tinyrack/dotweave test - Full Check (Typecheck + Lint + Test):
pnpm --filter @tinyrack/dotweave check - Run Local CLI:
node packages/cli/bin/index.jsorpnpm --filter @tinyrack/dotweave start - SEA Build (Single Executable):
pnpm --filter @tinyrack/dotweave sea:build
- Dev Server:
pnpm --filter @tinyrack/dotweave-homepage dev - Build Site:
pnpm --filter @tinyrack/dotweave-homepage build - Typecheck:
pnpm --filter @tinyrack/dotweave-homepage typecheck - Preview:
pnpm --filter @tinyrack/dotweave-homepage preview
- Tooling: Use
biomefor linting and formatting. Always runpnpm run formatbefore committing. - Node.js: Requires Node.js 24 or higher.
- Strict TypeScript:
tsconfig.jsonis configured with strict settings.
- Source Structure:
src/cli/: Command definitions and routing.src/services/: Core business logic (git operations, file system, sync logic).src/config/: Configuration schemas (Zod) and migrations.src/lib/: Low-level utilities.
- Import Aliases: Use
#app/*for all internal CLI imports (mapped tosrc/*). - Commands: Commands are built using
@stricli/core. Root commands are defined insrc/cli/root-commands.ts. - Testing:
- Unit/Integration tests:
src/**/*.test.ts. - E2E tests:
tests/**/*.e2e.test.ts. - E2E tests use isolated temporary environments for
HOMEandXDG_CONFIG_HOME.
- Unit/Integration tests:
- Error Handling: Use the custom error types in
src/lib/error.ts.
- Localization: Supports
en,ko, andja. Content is insrc/content/docs/. - Theming: Uses
starlight-theme-blackand Tailwind CSS.
pnpm-workspace.yaml: Monorepo configuration.biome.json: Linting and formatting rules.packages/cli/src/application.ts: CLI entry point and application building.packages/cli/src/config/sync-schema.ts: Zod schema for the sync configuration.packages/homepage/astro.config.ts: Astro/Starlight configuration.