Workspaces Reference
agentsync is a multi-language project that combines a high-performance Rust core with a TypeScript distribution layer.
Repository Structure
Section titled “Repository Structure”src/: Core logic and CLI implementation in Rust.npm/agentsync/: TypeScript wrapper used for NPM distribution.website/docs/: Documentation site built with Starlight.website/: Main project website.tests/: Integration tests for the CLI.
Rust Workspace (The Core)
Section titled “Rust Workspace (The Core)”The core logic is written in Rust for speed, safety, and easy distribution as a single binary.
- Tools: Cargo
- Version: Rust 1.85+ (Edition 2024)
- Key Commands:
Terminal window cargo build # Build debug binarycargo test # Run unit and integration testscargo run # Run the CLI locally - Error Handling: Uses
thiserrorfor custom errors andanyhowfor application-level error handling.
JavaScript Workspace (Distribution)
Section titled “JavaScript Workspace (Distribution)”The JS workspace acts as a wrapper to provide an easy installation path via pnpm/npm. It manages platform-specific binary downloads.
- Tools: pnpm, TypeScript
- Location:
npm/agentsync/ - Key Commands:
Terminal window pnpm run typecheck # Verify typespnpm run build # Compile TypeScript to JS - Strictness: We enforce strict TypeScript configurations. Avoid
anyat all costs.
Modern Tooling
Section titled “Modern Tooling”We enforce the use of modern CLI tools for development. If you don’t have them, we recommend installing them:
bat: Syntax-highlighted file viewing (replacescat).rg(ripgrep): Fast recursive search (replacesgrep).fd: Simple and fast alternative tofind.sd: Intuitive find and replace (replacessed).eza: Feature-rich directory listing (replacesls).