freestyle-sync 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +28 -2
  2. package/{src/main.ts → dist/src/main.js} +597 -531
  3. package/dist/src/plugin-api.js +6 -0
  4. package/package.json +23 -6
  5. package/PUBLISHING.md +0 -3
  6. package/freestyle-sync.config.ts +0 -36
  7. package/plugins/agent-claude/package.json +0 -8
  8. package/plugins/agent-claude/src/index.ts +0 -113
  9. package/plugins/agent-codex/package.json +0 -8
  10. package/plugins/agent-codex/src/index.ts +0 -69
  11. package/plugins/agent-copilot/package.json +0 -8
  12. package/plugins/agent-copilot/src/index.ts +0 -552
  13. package/plugins/auth-aws/package.json +0 -8
  14. package/plugins/auth-aws/src/index.ts +0 -23
  15. package/plugins/auth-azure/package.json +0 -8
  16. package/plugins/auth-azure/src/index.ts +0 -23
  17. package/plugins/auth-docker/package.json +0 -8
  18. package/plugins/auth-docker/src/index.ts +0 -23
  19. package/plugins/auth-env/package.json +0 -8
  20. package/plugins/auth-env/src/index.ts +0 -35
  21. package/plugins/auth-gcloud/package.json +0 -8
  22. package/plugins/auth-gcloud/src/index.ts +0 -23
  23. package/plugins/auth-git/package.json +0 -8
  24. package/plugins/auth-git/src/index.ts +0 -43
  25. package/plugins/auth-github-cli/package.json +0 -8
  26. package/plugins/auth-github-cli/src/index.ts +0 -33
  27. package/plugins/auth-npm/package.json +0 -8
  28. package/plugins/auth-npm/src/index.ts +0 -32
  29. package/plugins/auth-ssh/package.json +0 -8
  30. package/plugins/auth-ssh/src/index.ts +0 -36
  31. package/plugins/auth-yarn/package.json +0 -8
  32. package/plugins/auth-yarn/src/index.ts +0 -19
  33. package/plugins/node-npm/package.json +0 -8
  34. package/plugins/node-npm/src/index.ts +0 -390
  35. package/plugins/shell-history/package.json +0 -8
  36. package/plugins/shell-history/src/index.ts +0 -64
  37. package/plugins/vscode/package.json +0 -8
  38. package/plugins/vscode/src/index.ts +0 -162
  39. package/src/plugin-api.ts +0 -110
  40. package/tsconfig.json +0 -18
package/README.md CHANGED
@@ -6,8 +6,35 @@ Sync your current directory, it's dependencies, and your agent context into a VM
6
6
  npx freestyle-sync
7
7
  ```
8
8
 
9
- Configure complex sync behavior using plugins.
9
+ Use the SDK when embedding sync inside another CLI/app (no required `freestyle-sync.config.ts` or cache file):
10
+
10
11
  ```ts
12
+ import { defineConfig, sync, type SyncCache } from "freestyle-sync";
13
+ import { gitAuthPlugin } from "@freestyle-sync/auth-git";
14
+ import { nodeNpmPlugin } from "@freestyle-sync/node-npm";
15
+
16
+ let cache: SyncCache | undefined;
17
+
18
+ const result = await sync({
19
+ config: defineConfig({
20
+ plugins: [gitAuthPlugin(), nodeNpmPlugin()],
21
+ }),
22
+ options: {
23
+ projectRoot: process.cwd(),
24
+ autoSsh: false,
25
+ },
26
+ cache,
27
+ onCacheUpdate(nextCache) {
28
+ cache = nextCache;
29
+ },
30
+ });
31
+
32
+ console.log("synced VM", result.vmId);
33
+ ```
34
+
35
+ freestyle-sync creates `freestyle-sync.config.mjs` on first run and installs the config dependencies into your project as dev dependencies. Remove the generated config or dependencies if you want to reset it later.
36
+
37
+ ```js
11
38
  import { defineConfig } from "freestyle-sync";
12
39
  import { claudeAgentPlugin } from "@freestyle-sync/agent-claude";
13
40
  import { codexAgentPlugin } from "@freestyle-sync/agent-codex";
@@ -44,5 +71,4 @@ export default defineConfig({
44
71
  shellHistoryPlugin(),
45
72
  ],
46
73
  });
47
-
48
74
  ```