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.
- package/README.md +28 -2
- package/{src/main.ts → dist/src/main.js} +597 -531
- package/dist/src/plugin-api.js +6 -0
- package/package.json +23 -6
- package/PUBLISHING.md +0 -3
- package/freestyle-sync.config.ts +0 -36
- package/plugins/agent-claude/package.json +0 -8
- package/plugins/agent-claude/src/index.ts +0 -113
- package/plugins/agent-codex/package.json +0 -8
- package/plugins/agent-codex/src/index.ts +0 -69
- package/plugins/agent-copilot/package.json +0 -8
- package/plugins/agent-copilot/src/index.ts +0 -552
- package/plugins/auth-aws/package.json +0 -8
- package/plugins/auth-aws/src/index.ts +0 -23
- package/plugins/auth-azure/package.json +0 -8
- package/plugins/auth-azure/src/index.ts +0 -23
- package/plugins/auth-docker/package.json +0 -8
- package/plugins/auth-docker/src/index.ts +0 -23
- package/plugins/auth-env/package.json +0 -8
- package/plugins/auth-env/src/index.ts +0 -35
- package/plugins/auth-gcloud/package.json +0 -8
- package/plugins/auth-gcloud/src/index.ts +0 -23
- package/plugins/auth-git/package.json +0 -8
- package/plugins/auth-git/src/index.ts +0 -43
- package/plugins/auth-github-cli/package.json +0 -8
- package/plugins/auth-github-cli/src/index.ts +0 -33
- package/plugins/auth-npm/package.json +0 -8
- package/plugins/auth-npm/src/index.ts +0 -32
- package/plugins/auth-ssh/package.json +0 -8
- package/plugins/auth-ssh/src/index.ts +0 -36
- package/plugins/auth-yarn/package.json +0 -8
- package/plugins/auth-yarn/src/index.ts +0 -19
- package/plugins/node-npm/package.json +0 -8
- package/plugins/node-npm/src/index.ts +0 -390
- package/plugins/shell-history/package.json +0 -8
- package/plugins/shell-history/src/index.ts +0 -64
- package/plugins/vscode/package.json +0 -8
- package/plugins/vscode/src/index.ts +0 -162
- package/src/plugin-api.ts +0 -110
- 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
|
-
|
|
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
|
```
|