Skip to content

Commit b2bbbc8

Browse files
committed
chore: rename package to opencode-synced
1 parent cd2e58f commit b2bbbc8

9 files changed

Lines changed: 28 additions & 25 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# opencode-sync
1+
# opencode-synced
22

33
Sync global OpenCode configuration across machines via a GitHub repo, with optional secrets support for private repos.
44

@@ -9,7 +9,7 @@ Sync global OpenCode configuration across machines via a GitHub repo, with optio
99
- Optional session sync to share conversation history across machines
1010
- Optional prompt stash sync to share stashed prompts and history across machines
1111
- Startup auto-sync with restart toast
12-
- Per-machine overrides via `opencode-sync.overrides.jsonc`
12+
- Per-machine overrides via `opencode-synced.overrides.jsonc`
1313
- Custom `/sync-*` commands and `opencode_sync` tool
1414

1515
## Requirements
@@ -24,14 +24,14 @@ Enable the plugin in your global OpenCode config (OpenCode will install it on ne
2424
```jsonc
2525
{
2626
"$schema": "https://opencode.ai/config.json",
27-
"plugin": ["opencode-sync"],
27+
"plugin": ["opencode-synced"],
2828
}
2929
```
3030

3131
OpenCode does not auto-update plugins. To update, remove the cached plugin and restart OpenCode:
3232

3333
```bash
34-
rm -rf ~/.cache/opencode/node_modules/opencode-sync
34+
rm -rf ~/.cache/opencode/node_modules/opencode-synced
3535
opencode
3636
```
3737

@@ -56,7 +56,7 @@ You can specify a custom repo name or use an organization:
5656
<details>
5757
<summary>Manual configuration</summary>
5858

59-
Create `~/.config/opencode/opencode-sync.jsonc`:
59+
Create `~/.config/opencode/opencode-synced.jsonc`:
6060

6161
```jsonc
6262
{
@@ -129,7 +129,7 @@ Synced prompt data:
129129
Create a local-only overrides file at:
130130

131131
```
132-
~/.config/opencode/opencode-sync.overrides.jsonc
132+
~/.config/opencode/opencode-synced.overrides.jsonc
133133
```
134134

135135
Overrides are merged into the runtime config and re-applied to `opencode.json(c)` after pull.
@@ -155,7 +155,7 @@ Restart OpenCode to run the startup sync flow (pull remote, apply if changed, pu
155155
Inspect the local repo directly:
156156

157157
```bash
158-
cd ~/.local/share/opencode/opencode-sync/repo
158+
cd ~/.local/share/opencode/opencode-synced/repo
159159
git status
160160
git log --oneline -5
161161
```
@@ -170,7 +170,7 @@ If the sync repo has uncommitted changes, you can:
170170
2. **Manual resolution**: Navigate to the repo and resolve manually:
171171

172172
```bash
173-
cd ~/.local/share/opencode/opencode-sync/repo
173+
cd ~/.local/share/opencode/opencode-synced/repo
174174
git status
175175
git pull --rebase
176176
```

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "opencode-sync",
2+
"name": "opencode-synced",
33
"version": "0.1.0",
44
"description": "Sync global OpenCode config across machines via GitHub.",
55
"author": {
@@ -14,7 +14,7 @@
1414
},
1515
"repository": {
1616
"type": "git",
17-
"url": "git+https://github.com/iHildy/opencode-sync.git"
17+
"url": "git+https://github.com/iHildy/opencode-synced.git"
1818
},
1919
"publishConfig": {
2020
"access": "public"

src/command/sync-init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Initialize opencode-sync configuration
2+
description: Initialize opencode-synced configuration
33
---
44

55
Use the opencode_sync tool with command "init".

src/command/sync-status.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2-
description: Show opencode-sync status
2+
description: Show opencode-synced status
33
---
4+
45
Use the opencode_sync tool with command "status" and report the results.

src/sync/commit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export async function generateCommitMessage(
3434
let sessionId: string | null = null;
3535

3636
try {
37-
const sessionResult = await ctx.client.session.create({ body: { title: 'opencode-sync' } });
37+
const sessionResult = await ctx.client.session.create({ body: { title: 'opencode-synced' } });
3838
const session = unwrapData<{ id: string }>(sessionResult);
3939
sessionId = session?.id ?? null;
4040
if (!sessionId) return fallback;

src/sync/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export async function writeJsonFile(
164164
options: { jsonc: boolean; mode?: number } = { jsonc: false }
165165
): Promise<void> {
166166
const json = JSON.stringify(data, null, 2);
167-
const content = options.jsonc ? `// Generated by opencode-sync\n${json}\n` : `${json}\n`;
167+
const content = options.jsonc ? `// Generated by opencode-synced\n${json}\n` : `${json}\n`;
168168
await fs.writeFile(filePath, content, 'utf8');
169169
if (options.mode !== undefined) {
170170
await fs.chmod(filePath, options.mode);

src/sync/paths.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ describe('resolveSyncLocations', () => {
3434
const locations = resolveSyncLocations(env, 'linux');
3535

3636
expect(locations.configRoot).toBe('/custom/opencode');
37-
expect(locations.syncConfigPath).toBe('/custom/opencode/opencode-sync.jsonc');
38-
expect(locations.overridesPath).toBe('/custom/opencode/opencode-sync.overrides.jsonc');
37+
expect(locations.syncConfigPath).toBe('/custom/opencode/opencode-synced.jsonc');
38+
expect(locations.overridesPath).toBe('/custom/opencode/opencode-synced.overrides.jsonc');
3939
});
4040
});
4141

src/sync/paths.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export interface SyncPlan {
4646
const DEFAULT_CONFIG_NAME = 'opencode.json';
4747
const DEFAULT_CONFIGC_NAME = 'opencode.jsonc';
4848
const DEFAULT_AGENTS_NAME = 'AGENTS.md';
49-
const DEFAULT_SYNC_CONFIG_NAME = 'opencode-sync.jsonc';
50-
const DEFAULT_OVERRIDES_NAME = 'opencode-sync.overrides.jsonc';
49+
const DEFAULT_SYNC_CONFIG_NAME = 'opencode-synced.jsonc';
50+
const DEFAULT_OVERRIDES_NAME = 'opencode-synced.overrides.jsonc';
5151
const DEFAULT_STATE_NAME = 'sync-state.json';
5252

5353
const CONFIG_DIRS = ['agent', 'command', 'mode', 'tool', 'themes', 'plugin'];
@@ -112,7 +112,7 @@ export function resolveSyncLocations(
112112
syncConfigPath: path.join(configRoot, DEFAULT_SYNC_CONFIG_NAME),
113113
overridesPath: path.join(configRoot, DEFAULT_OVERRIDES_NAME),
114114
statePath: path.join(dataRoot, DEFAULT_STATE_NAME),
115-
defaultRepoDir: path.join(dataRoot, 'opencode-sync', 'repo'),
115+
defaultRepoDir: path.join(dataRoot, 'opencode-synced', 'repo'),
116116
};
117117
}
118118

src/sync/service.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function createSyncService(ctx: SyncServiceContext): SyncService {
6363
startupSync: async () => {
6464
const config = await loadSyncConfig(locations);
6565
if (!config) {
66-
await showToast(ctx, 'Configure opencode-sync with /sync-init.', 'info');
66+
await showToast(ctx, 'Configure opencode-synced with /sync-init.', 'info');
6767
return;
6868
}
6969
try {
@@ -75,7 +75,7 @@ export function createSyncService(ctx: SyncServiceContext): SyncService {
7575
status: async () => {
7676
const config = await loadSyncConfig(locations);
7777
if (!config) {
78-
return 'opencode-sync is not configured. Run /sync-init to set it up.';
78+
return 'opencode-synced is not configured. Run /sync-init to set it up.';
7979
}
8080

8181
const repoRoot = resolveRepoRoot(config, locations);
@@ -145,7 +145,7 @@ export function createSyncService(ctx: SyncServiceContext): SyncService {
145145
await ensureSecretsPolicy(ctx, config);
146146

147147
const lines = [
148-
'opencode-sync configured.',
148+
'opencode-synced configured.',
149149
`Repo: ${repoIdentifier}${created ? ' (created)' : ''}`,
150150
`Branch: ${resolveRepoBranch(config)}`,
151151
`Local repo: ${repoRoot}`,
@@ -320,7 +320,9 @@ async function getConfigOrThrow(
320320
): Promise<ReturnType<typeof normalizeSyncConfig>> {
321321
const config = await loadSyncConfig(locations);
322322
if (!config) {
323-
throw new SyncConfigMissingError('Missing opencode-sync config. Run /sync-init to set it up.');
323+
throw new SyncConfigMissingError(
324+
'Missing opencode-synced config. Run /sync-init to set it up.'
325+
);
324326
}
325327
return config;
326328
}
@@ -414,7 +416,7 @@ async function showToast(
414416
message: string,
415417
variant: ToastVariant
416418
): Promise<void> {
417-
await ctx.client.tui.showToast({ body: { message: `opencode-sync: ${message}`, variant } });
419+
await ctx.client.tui.showToast({ body: { message: `opencode-synced: ${message}`, variant } });
418420
}
419421

420422
function formatError(error: unknown): string {
@@ -438,7 +440,7 @@ async function analyzeAndDecideResolution(
438440
const statusOutput = changes.join('\n');
439441

440442
const prompt = [
441-
'You are analyzing uncommitted changes in an opencode-sync repository.',
443+
'You are analyzing uncommitted changes in an opencode-synced repository.',
442444
'Decide whether to commit these changes or discard them.',
443445
'',
444446
'IMPORTANT: Only choose "commit" if the changes appear to be legitimate config updates.',

0 commit comments

Comments
 (0)