synctax 2.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ All notable changes to Synctax are documented here.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [2.0.0] — 2026-04-05
11
+
12
+ ### Initial Release
13
+
14
+ **Synctax** — Universal Sync for the Agentic Developer Stack.
15
+
16
+ #### Core Sync Engine
17
+ - `synctax sync` — atomic push to all enabled clients with pre-sync snapshots and rollback on failure
18
+ - `synctax pull --from <client>` — import a client's live config into master config
19
+ - `synctax watch` — background daemon that auto-syncs on `~/.synctax/config.json` save (500ms debounce)
20
+ - `synctax memory-sync` — copy source client's context/memory file to all other enabled clients
21
+ - `--dry-run`, `--yes`, `--strict-env`, `--interactive` flags on sync
22
+
23
+ #### Inspection & Diagnostics
24
+ - `synctax status` — health overview: drift state, resource counts, env var resolution
25
+ - `synctax diff [client]` — preview changes without writing; `--json` for machine-readable output
26
+ - `synctax doctor [--deep]` — diagnose missing clients, broken paths, invalid env vars; `--deep` verifies MCP binary existence
27
+ - `synctax validate` — schema validation, env var resolution, required PATH binary check
28
+
29
+ #### Config Management
30
+ - `synctax add <type> <name>` — add MCP server, agent, or skill interactively or via flags; `--from <url>` to import from URL/gist
31
+ - `synctax remove [type] [name]` — remove a resource (interactive with `-i`)
32
+ - `synctax move <type> <name>` — move resource between scopes (`--to-global`, `--to-local`, `--to-project`)
33
+
34
+ #### Profile System
35
+ - `synctax profile create <name>` — create a named resource filter profile
36
+ - `synctax profile use <name>` — switch active profile and sync immediately
37
+ - `synctax profile list` — list profiles with active marker
38
+ - `synctax profile diff <name>` — preview changes before switching profiles
39
+ - `synctax profile pull <url>` — import a profile from a URL
40
+ - `synctax profile publish <name>` — export shareable profile (credentials automatically stripped)
41
+
42
+ #### Backup & Portability
43
+ - `synctax backup [--rollup]` — per-client zip backups; `--rollup` creates a combined archive
44
+ - `synctax restore [--from <timestamp>]` — restore master config from backup
45
+ - `synctax export <file>` — export master config to JSON (credentials stripped)
46
+ - `synctax import <file>` — import master config from JSON
47
+ - `synctax link` / `synctax unlink` — symlink memory/instruction files to a single source
48
+
49
+ #### Interactive Fullscreen TUI
50
+ - `synctax` (no args) — fullscreen dashboard with live status, diagnostics, quick actions, command palette
51
+ - 16 built-in color themes: synctax, catppuccin, dracula, nord, tokyo-night, gruvbox, one-dark, solarized, rose-pine, monokai, cyberpunk, sunset, ocean, forest, ember, aurora
52
+ - Keyboard-driven: number keys for quick actions, `/` for command palette, `t` for theme switcher, `?` for help
53
+
54
+ #### 9 Supported Clients
55
+ Claude Code, Cursor, GitHub Copilot (VS Code), GitHub Copilot CLI, OpenCode, Cline, Zed, Antigravity, Gemini CLI
56
+
57
+ #### Security
58
+ - Deny-wins permission merge: deny lists always override allow lists
59
+ - Credentials never exported (stripped from all `export` / `profile publish` outputs)
60
+ - Per-profile `.env` files (0600 permissions, never synced or published)
61
+ - Path-traversal protection on all file operations
62
+ - Atomic temp-file writes with rename for crash safety
63
+
64
+ [2.0.0]: https://github.com/Kaos599/synctax/releases/tag/v2.0.0
package/README.md ADDED
@@ -0,0 +1,262 @@
1
+ <p align="center">
2
+ <img src="assets/banner.svg" alt="Synctax" width="480">
3
+ </p>
4
+
5
+ <p align="center"><strong>Universal Sync for the Agentic Developer Stack</strong></p>
6
+ <p align="center">Configure once. Sync your MCP servers, agents, skills, and permissions to every AI tool you use.</p>
7
+
8
+ <p align="center">
9
+ <a href="https://github.com/Kaos599/Synctax/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/Kaos599/Synctax/actions/workflows/ci.yml/badge.svg" /></a>
10
+ <img alt="version" src="https://img.shields.io/github/package-json/v/Kaos599/Synctax?color=brightgreen" />
11
+ <img alt="license" src="https://img.shields.io/github/license/Kaos599/Synctax?color=blue" />
12
+ <img alt="runtime" src="https://img.shields.io/badge/runtime-bun-orange" />
13
+ <img alt="clients" src="https://img.shields.io/badge/clients-9%20supported-lightgrey" />
14
+ </p>
15
+
16
+ <p align="center"><code>synctax sync</code> — one command, every AI tool in sync.</p>
17
+
18
+ ---
19
+
20
+ ## Why Synctax
21
+
22
+ Every AI coding tool stores configuration in its own proprietary format. Claude Code reads `~/.claude/settings.json`. Cursor uses `~/.cursor/mcp.json`. Zed has `~/.config/zed/settings.json`. Cline, OpenCode, GitHub Copilot, and Gemini CLI each have their own layouts, their own field names, and their own ideas about where agents and skills belong.
23
+
24
+ Add one MCP server and you are editing four JSON files by hand. Rename an agent and you are hunting through six different directories. Forget to update one client and your tools are silently out of sync for weeks.
25
+
26
+ Synctax eliminates this. One master config at `~/.synctax/config.json`. One command to push it everywhere. Every resource — MCP servers, agents, skills, permissions, model preferences, prompts, memory files — translated into each client's native format automatically.
27
+
28
+ ---
29
+
30
+ ## Install
31
+
32
+ **Prerequisites:** [Bun](https://bun.sh) v1.0+
33
+
34
+ ```bash
35
+ git clone https://github.com/Kaos599/synctax.git
36
+ cd synctax
37
+ bun install
38
+ bun ./bin/synctax.ts init
39
+ bun ./bin/synctax.ts sync
40
+ ```
41
+
42
+ After `init` completes its optional PATH setup, you can use the short form everywhere:
43
+
44
+ ```bash
45
+ synctax init
46
+ synctax sync
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Quick Start
52
+
53
+ ```bash
54
+ # 1. Initialize master config and enable your installed clients
55
+ synctax init
56
+
57
+ # 2. Pull your existing config from whichever client you use most
58
+ synctax pull --from cursor
59
+
60
+ # 3. Add a new MCP server to master config
61
+ synctax add mcp my-db --command npx --args "-y" "@modelcontextprotocol/server-postgres" --env DB_URL=\$MY_DB_URL
62
+
63
+ # 4. Check for issues before writing
64
+ synctax doctor
65
+
66
+ # 5. Push everything to all enabled clients
67
+ synctax sync
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Commands
73
+
74
+ ### Core
75
+
76
+ | Command | Description |
77
+ |---------|-------------|
78
+ | `synctax sync` | Pulls from your source client, shows a per-client diff, asks for confirmation, then writes to every enabled client atomically. Rolls back all clients on failure. Run this after any change to master config. |
79
+ | `synctax pull --from <client>` | Imports a specific client's live config into master. Use this when you've added an MCP directly in Cursor or Claude Code and want master to reflect it. |
80
+ | `synctax diff [client]` | Compares master against each client's live config and shows exactly what has been added, removed, or modified — without writing anything. Safe to run at any time. |
81
+ | `synctax watch` | Starts a background daemon that watches `~/.synctax/config.json` and auto-syncs on every save (500ms debounce). Useful when editing master config directly. |
82
+ | `synctax memory-sync` | Copies your source client's memory/context file (e.g. `CLAUDE.md`) to all other enabled clients in the current project directory. |
83
+
84
+ ### Inspection
85
+
86
+ | Command | Description |
87
+ |---------|-------------|
88
+ | `synctax status` | Health overview across all clients — shows sync state, resource counts, and env var status at a glance. |
89
+ | `synctax doctor [--deep]` | Diagnoses common issues: missing clients, broken config paths, invalid env vars. With `--deep`, also verifies each MCP command exists on PATH. |
90
+ | `synctax validate` | Runs Zod schema validation on master config, checks env var references can resolve, and confirms required binaries are reachable before syncing. |
91
+
92
+ ### Config Management
93
+
94
+ | Command | Description |
95
+ |---------|-------------|
96
+ | `synctax add <type> <name>` | Adds an MCP server, agent, or skill to master config interactively or via flags. |
97
+ | `synctax remove [type] [name]` | Removes a resource. Use `-i` for interactive selection. |
98
+ | `synctax move <type> <name>` | Changes the scope of a resource (`--to-global`, `--to-local`, `--to-project`). |
99
+
100
+ ### Profiles
101
+
102
+ | Command | Description |
103
+ |---------|-------------|
104
+ | `synctax profile create <name>` | Creates a named profile with `--include` / `--exclude` resource filters. Each profile gets its own `.env` file for secrets. |
105
+ | `synctax profile use <name>` | Switches to a profile and immediately syncs — swaps env context and filters, then pushes to all clients. |
106
+ | `synctax profile list` | Lists all profiles with their filters and marks the active one. |
107
+ | `synctax profile diff <name>` | Dry-run preview of what would change if you switched to this profile, without switching. |
108
+ | `synctax profile pull <url>` | Downloads and imports a shared profile from a URL. Credentials are never included. |
109
+ | `synctax profile publish <name>` | Exports a profile to a shareable JSON file with credentials automatically stripped. |
110
+
111
+ <details>
112
+ <summary>Safety &amp; backup commands</summary>
113
+
114
+ | Command | Description |
115
+ |---------|-------------|
116
+ | `synctax backup` | Archives each enabled client's current native config files into a timestamped zip at `~/.synctax/backups/`. Run before risky changes. |
117
+ | `synctax restore [--from <ts>]` | Restores master config from a backup. Uses most recent by default; pass a timestamp for a specific point in time. |
118
+ | `synctax export <file>` | Exports the full master config to a portable JSON file (credentials stripped). |
119
+ | `synctax import <file>` | Imports a master config from a JSON file. |
120
+ | `synctax link` / `synctax unlink` | Creates symlinks so all client instruction files point to one canonical file, or restores them as regular files. |
121
+
122
+ </details>
123
+
124
+ ### Sync Flags
125
+
126
+ ```bash
127
+ synctax sync --dry-run # Preview changes without writing
128
+ synctax sync --yes # Skip confirmation (for scripts, CI)
129
+ synctax sync --strict-env # Fail if env vars can't resolve
130
+ synctax sync --interactive # Select which resources to sync
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Supported Clients
136
+
137
+ | Client | MCP | Agents | Skills | Memory File |
138
+ |--------|-----|--------|--------|-------------|
139
+ | Claude Code | ✅ | ✅ | ✅ | `CLAUDE.md` |
140
+ | Cursor | ✅ | ✅ | ✅ | `.cursorrules` |
141
+ | GitHub Copilot | ✅ | ✅ | ✅ | `.github/copilot-instructions.md` |
142
+ | GitHub Copilot CLI | ✅ | ✅ | ✅ | `.github/copilot-instructions.md` |
143
+ | OpenCode | ✅ | ✅ | ✅ | `AGENTS.md` |
144
+ | Antigravity | ✅ | ✅ | ✅ | `.antigravityrules` |
145
+ | Cline | ✅ | — | — | `.clinerules` |
146
+ | Zed | ✅ | — | — | `.rules` |
147
+ | Gemini CLI | — | — | — | `.geminirules` |
148
+
149
+ ---
150
+
151
+ ## How Sync Works
152
+
153
+ ```
154
+ synctax sync
155
+
156
+ ├─ 1. Pull from source client
157
+ │ Read live config → merge into master (deny-wins for permissions)
158
+
159
+ ├─ 2. Apply active profile filters
160
+ │ include/exclude lists trim the resource set
161
+
162
+ ├─ 3. Resolve env vault
163
+ │ $VAR references → real values from ~/.synctax/envs/<profile>.env
164
+
165
+ ├─ 4. Show diff preview per client
166
+ │ added / removed / modified resources listed before any write
167
+
168
+ ├─ 5. Confirm: "Apply these changes? [y/N]"
169
+
170
+ └─ 6. Atomic write to all enabled clients
171
+ temp-file → rename · file lock · rollback on failure
172
+ ```
173
+
174
+ **Safety guarantees:**
175
+
176
+ - Every client config is read before being written — Synctax fields are overlaid, not overwritten.
177
+ - All writes go to a temp file first, then renamed atomically. A crash mid-write leaves the original intact.
178
+ - If any client write fails, all clients that already received changes in this run are rolled back.
179
+ - Permission merges use deny-wins logic: if a path appears in both allow and deny lists, it is denied.
180
+
181
+ ---
182
+
183
+ ## Env Vault
184
+
185
+ Secrets never live in master config. Use `$VAR` references in config and store real values in a per-profile `.env` file that stays local.
186
+
187
+ ```json
188
+ // ~/.synctax/config.json — safe to commit or share
189
+ {
190
+ "mcps": {
191
+ "my-db": {
192
+ "command": "npx",
193
+ "args": ["-y", "@modelcontextprotocol/server-postgres"],
194
+ "env": { "DB_URL": "$MY_DB_URL" }
195
+ }
196
+ }
197
+ }
198
+ ```
199
+
200
+ ```bash
201
+ # ~/.synctax/envs/default.env — stays local, never exported
202
+ MY_DB_URL=postgres://user:pass@prod.db.internal:5432/app
203
+ ```
204
+
205
+ When syncing, `$MY_DB_URL` is resolved to the real value before writing to each client. The reference string is what gets synced; the secret is what gets injected at write time.
206
+
207
+ ---
208
+
209
+ ## Fullscreen TUI
210
+
211
+ Run `synctax` with no arguments to open the fullscreen dashboard.
212
+
213
+ - Live status panel: connected clients, MCP counts, agent counts, drift indicators
214
+ - Quick actions grid: bind common commands to number keys (1–9, 0)
215
+ - Command palette: fuzzy-search all commands with `/` or `p`
216
+ - Source selector: pick which client to pull from interactively
217
+ - Diagnostics panel: warnings and config issues surfaced in real time
218
+ - 16 built-in themes: `synctax`, `catppuccin`, `dracula`, `nord`, `tokyo-night`, `gruvbox`, `one-dark`, `solarized`, `rose-pine`, `monokai`, `cyberpunk`, `sunset`, `ocean`, `forest`, `ember`, `aurora` — press `t` to cycle
219
+
220
+ ---
221
+
222
+ ## Profiles
223
+
224
+ Profiles are named resource filters that let you maintain different sync configurations for different contexts — work vs. personal, frontend vs. backend, client A vs. client B — without maintaining separate master configs. Each profile has its own `.env` file so secrets are scoped too.
225
+
226
+ ```bash
227
+ # Create a work profile that only includes work-related MCPs and agents
228
+ synctax profile create work --include my-db,github,jira-agent,code-reviewer
229
+
230
+ # Switch to it (syncs immediately with the filtered resource set)
231
+ synctax profile use work
232
+
233
+ # Preview what switching to personal would change before committing
234
+ synctax profile diff personal
235
+ ```
236
+
237
+ ---
238
+
239
+ ## Development
240
+
241
+ ```bash
242
+ # Run all tests
243
+ bun run test
244
+
245
+ # Type-check (strict, no emit)
246
+ bun run typecheck
247
+
248
+ # Lint
249
+ bun run lint
250
+
251
+ # Run a single test file
252
+ bunx vitest run tests/adapters.test.ts
253
+
254
+ # Run the CLI directly
255
+ bun ./bin/synctax.ts <command>
256
+ ```
257
+
258
+ ---
259
+
260
+ ## License
261
+
262
+ MIT