agent_sync 0.0.1-dev01 copy "agent_sync: ^0.0.1-dev01" to clipboard
agent_sync: ^0.0.1-dev01 copied to clipboard

Thin Dart wrapper for AgentSync shell engine with GitHub-backed SSOT.

agent_sync #

agent_sync is a thin Dart wrapper over the AgentSync shell engine.

The engine remains the single source of truth in this repository (agent/.ai/system/*.sh). The Dart package does not reimplement sync logic. It runs that engine from GitHub (or local checkout).

Install #

Use as a git dependency (because package lives in a subfolder):

dependencies:
  agent_sync:
    git:
      url: https://github.com/yelmuratoff/agent_sync.git
      path: agent_sync
      ref: main

Then run:

dart pub get

Minimal workflow for users #

  1. Add package to pubspec.yaml.
  2. Create .ai/ in your project and put:
    • .ai/AGENTS.md
    • .ai/rules/*.md
    • .ai/skills/*/SKILL.md
    • .ai/tools/*.yaml
  3. Run:
dart run agent_sync:agent_sync sync

Generated files appear in destinations from .ai/tools/*.yaml (for example .codex/*, .claude/*, .github/*, .gemini/*).

CLI #

dart run agent_sync:agent_sync sync --project-dir .
dart run agent_sync:agent_sync sync --project-dir . --only codex,cursor --dry-run
dart run agent_sync:agent_sync check --project-dir .
dart run agent_sync:agent_sync setup-hooks --project-dir .

Useful options:

  • --repo-url and --repo-ref: point to another fork/branch
  • --cache-dir: where the cloned engine repo is cached
  • --no-update: use existing cache without git fetch
  • --local-repo-path: run scripts from a local checkout instead of cloning

Optional project config #

You can customize source paths via agent_sync.yaml in project root:

source:
  agents: ".ai/AGENTS.md"
  rules: ".ai/rules"
  skills: ".ai/skills"
  tools: ".ai/tools"

Flat keys are also supported:

agents: ".ai/AGENTS.md"
rules: ".ai/rules"
skills: ".ai/skills"
tools: ".ai/tools"

Dart API #

import 'package:agent_sync/agent_sync.dart';

Future<void> main() async {
  final client = AgentSyncClient();
  await client.sync(projectDirectory: '.', dryRun: true);
}

Notes #

  • Requires git and bash available in PATH.
  • Scripts are executed with AGENTSYNC_REPO_ROOT=<project-dir>.
  • Source layout is auto-detected for both .ai/src/* and .ai/*.
3
likes
0
points
257
downloads

Publisher

verified publishershodev.live

Weekly Downloads

Thin Dart wrapper for AgentSync shell engine with GitHub-backed SSOT.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, path

More

Packages that depend on agent_sync