mcpocket 0.1.0 → 0.1.1
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/LICENSE +1 -1
- package/README.md +261 -37
- package/dist/cli.js +9 -7
- package/dist/cli.js.map +1 -1
- package/dist/clients/claude-code.js +2 -2
- package/dist/clients/claude-desktop.js +2 -2
- package/dist/clients/opencode.js +2 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +111 -43
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +45 -31
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +56 -32
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +38 -23
- package/dist/commands/status.js.map +1 -1
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -8
- package/dist/config.js.map +1 -1
- package/dist/storage/gist.d.ts +21 -0
- package/dist/storage/gist.d.ts.map +1 -0
- package/dist/storage/gist.js +139 -0
- package/dist/storage/gist.js.map +1 -0
- package/dist/storage/github.d.ts +1 -1
- package/dist/storage/github.js +8 -8
- package/dist/sync/plugins.js +2 -2
- package/dist/utils/crypto.d.ts +1 -1
- package/dist/utils/crypto.js +2 -2
- package/dist/utils/paths.d.ts +4 -4
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +8 -8
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/sparkle.d.ts +60 -0
- package/dist/utils/sparkle.d.ts.map +1 -0
- package/dist/utils/sparkle.js +114 -0
- package/dist/utils/sparkle.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createGist = createGist;
|
|
37
|
+
exports.updateGist = updateGist;
|
|
38
|
+
exports.fetchGist = fetchGist;
|
|
39
|
+
exports.collectFilesFromDir = collectFilesFromDir;
|
|
40
|
+
exports.writeGistFilesToDir = writeGistFilesToDir;
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
const path = __importStar(require("path"));
|
|
43
|
+
const GITHUB_API = 'https://api.github.com';
|
|
44
|
+
function headers(token) {
|
|
45
|
+
return {
|
|
46
|
+
'Authorization': `Bearer ${token}`,
|
|
47
|
+
'Accept': 'application/vnd.github+json',
|
|
48
|
+
'X-GitHub-Api-Version': '2022-11-28',
|
|
49
|
+
'Content-Type': 'application/json',
|
|
50
|
+
'User-Agent': 'mcpocket-cli',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** Create a private gist as the sync target */
|
|
54
|
+
async function createGist(token) {
|
|
55
|
+
const res = await fetch(`${GITHUB_API}/gists`, {
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: headers(token),
|
|
58
|
+
body: JSON.stringify({
|
|
59
|
+
description: 'mcpocket: AI agent config sync',
|
|
60
|
+
public: false,
|
|
61
|
+
files: {
|
|
62
|
+
'mcpocket.json': { content: JSON.stringify({ version: 1 }, null, 2) },
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
});
|
|
66
|
+
if (!res.ok) {
|
|
67
|
+
throw new Error(`Failed to create gist (${res.status}): ${await res.text()}`);
|
|
68
|
+
}
|
|
69
|
+
const data = await res.json();
|
|
70
|
+
return { id: data.id, htmlUrl: data.html_url };
|
|
71
|
+
}
|
|
72
|
+
/** Upload files to an existing gist (creates/updates, does not delete missing files) */
|
|
73
|
+
async function updateGist(token, gistId, files) {
|
|
74
|
+
const gistFiles = {};
|
|
75
|
+
for (const [name, content] of Object.entries(files)) {
|
|
76
|
+
gistFiles[name] = { content };
|
|
77
|
+
}
|
|
78
|
+
const res = await fetch(`${GITHUB_API}/gists/${gistId}`, {
|
|
79
|
+
method: 'PATCH',
|
|
80
|
+
headers: headers(token),
|
|
81
|
+
body: JSON.stringify({ files: gistFiles }),
|
|
82
|
+
});
|
|
83
|
+
if (!res.ok) {
|
|
84
|
+
throw new Error(`Failed to update gist (${res.status}): ${await res.text()}`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/** Fetch all files from a gist */
|
|
88
|
+
async function fetchGist(token, gistId) {
|
|
89
|
+
const res = await fetch(`${GITHUB_API}/gists/${gistId}`, {
|
|
90
|
+
headers: headers(token),
|
|
91
|
+
});
|
|
92
|
+
if (!res.ok) {
|
|
93
|
+
throw new Error(`Failed to fetch gist (${res.status}): ${await res.text()}`);
|
|
94
|
+
}
|
|
95
|
+
const data = await res.json();
|
|
96
|
+
const files = {};
|
|
97
|
+
for (const [name, file] of Object.entries(data.files)) {
|
|
98
|
+
files[name] = file.content;
|
|
99
|
+
}
|
|
100
|
+
return files;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Collect all files from a directory into a flat map.
|
|
104
|
+
* Directory separators are encoded as __ in keys.
|
|
105
|
+
*/
|
|
106
|
+
function collectFilesFromDir(dir) {
|
|
107
|
+
const files = {};
|
|
108
|
+
if (!fs.existsSync(dir))
|
|
109
|
+
return files;
|
|
110
|
+
collectRecursive(dir, '', files);
|
|
111
|
+
return files;
|
|
112
|
+
}
|
|
113
|
+
function collectRecursive(dir, prefix, files) {
|
|
114
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
115
|
+
if (entry.name === '.git')
|
|
116
|
+
continue;
|
|
117
|
+
const key = prefix ? `${prefix}__${entry.name}` : entry.name;
|
|
118
|
+
const fullPath = path.join(dir, entry.name);
|
|
119
|
+
if (entry.isDirectory()) {
|
|
120
|
+
collectRecursive(fullPath, key, files);
|
|
121
|
+
}
|
|
122
|
+
else if (entry.isFile()) {
|
|
123
|
+
files[key] = fs.readFileSync(fullPath, 'utf8');
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Write flat gist files back to a directory.
|
|
129
|
+
* Keys with __ are expanded to subdirectories.
|
|
130
|
+
*/
|
|
131
|
+
function writeGistFilesToDir(dir, files) {
|
|
132
|
+
for (const [key, content] of Object.entries(files)) {
|
|
133
|
+
const relPath = key.split('__').join(path.sep);
|
|
134
|
+
const fullPath = path.join(dir, relPath);
|
|
135
|
+
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
136
|
+
fs.writeFileSync(fullPath, content, 'utf8');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=gist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gist.js","sourceRoot":"","sources":["../../src/storage/gist.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,gCAmBC;AAGD,gCAmBC;AAGD,8BAqBC;AAMD,kDAKC;AAwBD,kDAUC;AAnID,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,UAAU,GAAG,wBAAwB,CAAC;AAO5C,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO;QACL,eAAe,EAAE,UAAU,KAAK,EAAE;QAClC,QAAQ,EAAE,6BAA6B;QACvC,sBAAsB,EAAE,YAAY;QACpC,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,cAAc;KAC7B,CAAC;AACJ,CAAC;AAED,+CAA+C;AACxC,KAAK,UAAU,UAAU,CAAC,KAAa;IAC5C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,UAAU,QAAQ,EAAE;QAC7C,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;QACvB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;YACnB,WAAW,EAAE,gCAAgC;YAC7C,MAAM,EAAE,KAAK;YACb,KAAK,EAAE;gBACL,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE;aACtE;SACF,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,0BAA0B,GAAG,CAAC,MAAM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,CAAC;aAAM,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1B,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CACjC,GAAW,EACX,KAA6B;IAE7B,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACnD,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACzC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
package/dist/storage/github.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface RepoInfo {
|
|
|
6
6
|
}
|
|
7
7
|
/** Get the authenticated user's login */
|
|
8
8
|
export declare function getAuthenticatedUser(token: string): Promise<string>;
|
|
9
|
-
/** Create a private repo named
|
|
9
|
+
/** Create a private repo named mcpocket-sync (idempotent — returns existing if 422) */
|
|
10
10
|
export declare function createRepo(token: string, owner: string): Promise<RepoInfo>;
|
|
11
11
|
/** Clone the repo to a local directory. Uses HTTPS with token auth. */
|
|
12
12
|
export declare function cloneRepo(cloneUrl: string, token: string, localDir: string): void;
|
package/dist/storage/github.js
CHANGED
|
@@ -49,7 +49,7 @@ function headers(token) {
|
|
|
49
49
|
'Accept': 'application/vnd.github+json',
|
|
50
50
|
'X-GitHub-Api-Version': '2022-11-28',
|
|
51
51
|
'Content-Type': 'application/json',
|
|
52
|
-
'User-Agent': '
|
|
52
|
+
'User-Agent': 'mcpocket-cli',
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
/** Get the authenticated user's login */
|
|
@@ -61,16 +61,16 @@ async function getAuthenticatedUser(token) {
|
|
|
61
61
|
const data = await res.json();
|
|
62
62
|
return data.login;
|
|
63
63
|
}
|
|
64
|
-
/** Create a private repo named
|
|
64
|
+
/** Create a private repo named mcpocket-sync (idempotent — returns existing if 422) */
|
|
65
65
|
async function createRepo(token, owner) {
|
|
66
|
-
const repoName = '
|
|
66
|
+
const repoName = 'mcpocket-sync';
|
|
67
67
|
// Try creating
|
|
68
68
|
const res = await fetch(`${GITHUB_API}/user/repos`, {
|
|
69
69
|
method: 'POST',
|
|
70
70
|
headers: headers(token),
|
|
71
71
|
body: JSON.stringify({
|
|
72
72
|
name: repoName,
|
|
73
|
-
description: '
|
|
73
|
+
description: 'mcpocket: AI agent config sync',
|
|
74
74
|
private: true,
|
|
75
75
|
auto_init: true,
|
|
76
76
|
}),
|
|
@@ -125,7 +125,7 @@ function pullRepo(localDir, token, remoteUrl) {
|
|
|
125
125
|
run('git', ['pull', '--rebase', 'origin', 'main'], { cwd: localDir });
|
|
126
126
|
}
|
|
127
127
|
/** Stage all changes, commit, and push */
|
|
128
|
-
function commitAndPush(localDir, token, remoteUrl, message = '
|
|
128
|
+
function commitAndPush(localDir, token, remoteUrl, message = 'mcpocket: sync') {
|
|
129
129
|
const authUrl = remoteUrl.replace('https://', `https://${token}@`);
|
|
130
130
|
run('git', ['remote', 'set-url', 'origin', authUrl], { cwd: localDir });
|
|
131
131
|
run('git', ['add', '-A'], { cwd: localDir });
|
|
@@ -135,7 +135,7 @@ function commitAndPush(localDir, token, remoteUrl, message = 'carry-on: sync') {
|
|
|
135
135
|
encoding: 'utf8',
|
|
136
136
|
});
|
|
137
137
|
if (!status.stdout?.trim()) {
|
|
138
|
-
console.log('[
|
|
138
|
+
console.log('[mcpocket] Nothing changed — remote is already up to date.');
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
run('git', ['commit', '-m', message], { cwd: localDir });
|
|
@@ -145,11 +145,11 @@ function commitAndPush(localDir, token, remoteUrl, message = 'carry-on: sync') {
|
|
|
145
145
|
function ensureGitConfig(localDir) {
|
|
146
146
|
const name = child_process.spawnSync('git', ['config', 'user.name'], { encoding: 'utf8' });
|
|
147
147
|
if (!name.stdout?.trim()) {
|
|
148
|
-
run('git', ['config', 'user.name', '
|
|
148
|
+
run('git', ['config', 'user.name', 'mcpocket'], { cwd: localDir });
|
|
149
149
|
}
|
|
150
150
|
const email = child_process.spawnSync('git', ['config', 'user.email'], { encoding: 'utf8' });
|
|
151
151
|
if (!email.stdout?.trim()) {
|
|
152
|
-
run('git', ['config', 'user.email', '
|
|
152
|
+
run('git', ['config', 'user.email', 'mcpocket@localhost'], { cwd: localDir });
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
function run(cmd, args, opts = {}) {
|
package/dist/sync/plugins.js
CHANGED
|
@@ -56,7 +56,7 @@ function readPluginManifests() {
|
|
|
56
56
|
manifests[relPath] = JSON.parse(fs.readFileSync(fullPath, 'utf8'));
|
|
57
57
|
}
|
|
58
58
|
catch {
|
|
59
|
-
console.warn(`[
|
|
59
|
+
console.warn(`[mcpocket] Could not read ${fullPath}`);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -80,7 +80,7 @@ function readPluginManifestsFromRepo(repoDir) {
|
|
|
80
80
|
manifests[relPath] = JSON.parse(fs.readFileSync(fullPath, 'utf8'));
|
|
81
81
|
}
|
|
82
82
|
catch {
|
|
83
|
-
console.warn(`[
|
|
83
|
+
console.warn(`[mcpocket] Could not read repo file ${fullPath}`);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
}
|
package/dist/utils/crypto.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare function encrypt(plaintext: string, passphrase: string): string;
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function decrypt(encryptedValue: string, passphrase: string): string;
|
|
12
12
|
/**
|
|
13
|
-
* Returns true if the value is an encrypted
|
|
13
|
+
* Returns true if the value is an encrypted mcpocket secret.
|
|
14
14
|
*/
|
|
15
15
|
export declare function isEncrypted(value: string): boolean;
|
|
16
16
|
/**
|
package/dist/utils/crypto.js
CHANGED
|
@@ -68,7 +68,7 @@ function encrypt(plaintext, passphrase) {
|
|
|
68
68
|
*/
|
|
69
69
|
function decrypt(encryptedValue, passphrase) {
|
|
70
70
|
if (!encryptedValue.startsWith(ENCRYPTED_PREFIX)) {
|
|
71
|
-
throw new Error('Value is not an encrypted
|
|
71
|
+
throw new Error('Value is not an encrypted mcpocket secret');
|
|
72
72
|
}
|
|
73
73
|
const parts = encryptedValue.slice(ENCRYPTED_PREFIX.length).split(':');
|
|
74
74
|
if (parts.length !== 4) {
|
|
@@ -91,7 +91,7 @@ function decrypt(encryptedValue, passphrase) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* Returns true if the value is an encrypted
|
|
94
|
+
* Returns true if the value is an encrypted mcpocket secret.
|
|
95
95
|
*/
|
|
96
96
|
function isEncrypted(value) {
|
|
97
97
|
return typeof value === 'string' && value.startsWith(ENCRYPTED_PREFIX);
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -47,11 +47,11 @@ export declare function getClaudeHomeDir(): string;
|
|
|
47
47
|
*/
|
|
48
48
|
export declare function getOpenCodeConfigPath(): string;
|
|
49
49
|
/**
|
|
50
|
-
* Get the
|
|
50
|
+
* Get the mcpocket config directory
|
|
51
51
|
*/
|
|
52
|
-
export declare function
|
|
52
|
+
export declare function getMcpocketConfigDir(): string;
|
|
53
53
|
/**
|
|
54
|
-
* Get the
|
|
54
|
+
* Get the mcpocket config file path
|
|
55
55
|
*/
|
|
56
|
-
export declare function
|
|
56
|
+
export declare function getMcpocketConfigPath(): string;
|
|
57
57
|
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU5C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAQtD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAOnD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAUnD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAM9C;AAED;;GAEG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU5C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAQtD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAOnD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAUnD;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAM9C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAE9C"}
|
package/dist/utils/paths.js
CHANGED
|
@@ -43,8 +43,8 @@ exports.getClaudeDesktopConfigPath = getClaudeDesktopConfigPath;
|
|
|
43
43
|
exports.getClaudeCodeSettingsPath = getClaudeCodeSettingsPath;
|
|
44
44
|
exports.getClaudeHomeDir = getClaudeHomeDir;
|
|
45
45
|
exports.getOpenCodeConfigPath = getOpenCodeConfigPath;
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
46
|
+
exports.getMcpocketConfigDir = getMcpocketConfigDir;
|
|
47
|
+
exports.getMcpocketConfigPath = getMcpocketConfigPath;
|
|
48
48
|
const os = __importStar(require("os"));
|
|
49
49
|
const path = __importStar(require("path"));
|
|
50
50
|
const HOME = os.homedir();
|
|
@@ -155,15 +155,15 @@ function getOpenCodeConfigPath() {
|
|
|
155
155
|
return path.join(HOME, '.config', 'opencode', 'config.json');
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
|
-
* Get the
|
|
158
|
+
* Get the mcpocket config directory
|
|
159
159
|
*/
|
|
160
|
-
function
|
|
161
|
-
return path.join(HOME, '.
|
|
160
|
+
function getMcpocketConfigDir() {
|
|
161
|
+
return path.join(HOME, '.mcpocket');
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
|
-
* Get the
|
|
164
|
+
* Get the mcpocket config file path
|
|
165
165
|
*/
|
|
166
|
-
function
|
|
167
|
-
return path.join(
|
|
166
|
+
function getMcpocketConfigPath() {
|
|
167
|
+
return path.join(getMcpocketConfigDir(), 'config.json');
|
|
168
168
|
}
|
|
169
169
|
//# sourceMappingURL=paths.js.map
|
package/dist/utils/paths.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,sCASC;AAOD,gCAUC;AAMD,4CAEC;AAOD,sCAEC;AAKD,sCAQC;AAKD,gCAOC;AAKD,gEAUC;AAKD,8DAEC;AAKD,4CAEC;AAKD,sDAMC;AAKD,
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,sCASC;AAOD,gCAUC;AAMD,4CAEC;AAOD,sCAEC;AAKD,sCAQC;AAKD,gCAOC;AAKD,gEAUC;AAKD,8DAEC;AAKD,4CAEC;AAKD,sDAMC;AAKD,oDAEC;AAKD,sDAEC;AArID,uCAAyB;AACzB,2CAA6B;AAE7B,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAE1B;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,CAAS;IACrC,uCAAuC;IACvC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,UAAU,GAAG,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IACD,2CAA2C;IAC3C,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK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AC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,aAAa,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whimsical CLI animations & personality for mcpocket.
|
|
3
|
+
* Because syncing your AI setup should feel like magic, not homework.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Print the mcpocket ASCII art banner — a friendly hello.
|
|
7
|
+
*/
|
|
8
|
+
export declare function printBanner(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Animated spinner that returns a stop() function.
|
|
11
|
+
* Call stop() when your async work is done.
|
|
12
|
+
*/
|
|
13
|
+
export declare function spinner(message: string): {
|
|
14
|
+
stop: (finalMsg?: string) => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Sparkle trail effect — prints a cascade of sparkles, then your message.
|
|
18
|
+
*/
|
|
19
|
+
export declare function sparkle(message: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Print a success celebration.
|
|
22
|
+
*/
|
|
23
|
+
export declare function celebrate(message: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Print a whimsical section header with a decorative line.
|
|
26
|
+
*/
|
|
27
|
+
export declare function section(title: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Print a friendly stat line (for summaries).
|
|
30
|
+
*/
|
|
31
|
+
export declare function stat(label: string, value: string | number): void;
|
|
32
|
+
/**
|
|
33
|
+
* Print a warm, friendly error — problems happen, we're chill about it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function oops(message: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Print a gentle warning.
|
|
38
|
+
*/
|
|
39
|
+
export declare function heads_up(message: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Witty progress messages for different operations.
|
|
42
|
+
*/
|
|
43
|
+
export declare const WITTY: {
|
|
44
|
+
readonly pulling: "Reaching into the cloud pocket...";
|
|
45
|
+
readonly pushing: "Tucking your setup into the pocket...";
|
|
46
|
+
readonly encrypting: "Wrapping secrets in tinfoil...";
|
|
47
|
+
readonly decrypting: "Unwrapping the secret sauce...";
|
|
48
|
+
readonly cloning: "Setting up your secret stash...";
|
|
49
|
+
readonly verifying: "Checking your credentials (no judgment)...";
|
|
50
|
+
readonly readingMCP: "Rounding up your MCP servers...";
|
|
51
|
+
readonly readingPlugins: "Collecting plugin souvenirs...";
|
|
52
|
+
readonly readingAgents: "Gathering your agent squad...";
|
|
53
|
+
readonly readingSkills: "Packing up your skill tree...";
|
|
54
|
+
readonly done: "All pocketed!";
|
|
55
|
+
readonly nothingNew: "Already in sync — you're living in the future.";
|
|
56
|
+
readonly pushDone: "Your setup is safe in the cloud pocket!";
|
|
57
|
+
readonly pullDone: "Your setup landed safely! Welcome back.";
|
|
58
|
+
readonly initDone: "mcpocket is ready to roll!";
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=sparkle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkle.d.ts","sourceRoot":"","sources":["../../src/utils/sparkle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,CAiB9E;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG7C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAG/C;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAG3C;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEhE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;GAEG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;CAgBR,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Whimsical CLI animations & personality for mcpocket.
|
|
4
|
+
* Because syncing your AI setup should feel like magic, not homework.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.WITTY = void 0;
|
|
8
|
+
exports.printBanner = printBanner;
|
|
9
|
+
exports.spinner = spinner;
|
|
10
|
+
exports.sparkle = sparkle;
|
|
11
|
+
exports.celebrate = celebrate;
|
|
12
|
+
exports.section = section;
|
|
13
|
+
exports.stat = stat;
|
|
14
|
+
exports.oops = oops;
|
|
15
|
+
exports.heads_up = heads_up;
|
|
16
|
+
const POCKET_ART = `
|
|
17
|
+
╭─────────────────────────╮
|
|
18
|
+
│ ┌─────────┐ │
|
|
19
|
+
│ │ mcpocket│ ✨ │
|
|
20
|
+
│ └────┬────┘ │
|
|
21
|
+
│ │ Your AI setup. │
|
|
22
|
+
│ │ Every pocket. │
|
|
23
|
+
╰───────┴─────────────────╯
|
|
24
|
+
`;
|
|
25
|
+
const FRAMES_SYNC = ['◐', '◓', '◑', '◒'];
|
|
26
|
+
const FRAMES_SPARKLE = ['✦', '✧', '✦', '★', '✧', '⋆'];
|
|
27
|
+
const FRAMES_ROCKET = ['🚀', '🌟', '✨', '💫'];
|
|
28
|
+
/**
|
|
29
|
+
* Print the mcpocket ASCII art banner — a friendly hello.
|
|
30
|
+
*/
|
|
31
|
+
function printBanner() {
|
|
32
|
+
console.log('\x1b[36m' + POCKET_ART + '\x1b[0m');
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Animated spinner that returns a stop() function.
|
|
36
|
+
* Call stop() when your async work is done.
|
|
37
|
+
*/
|
|
38
|
+
function spinner(message) {
|
|
39
|
+
let i = 0;
|
|
40
|
+
const interval = setInterval(() => {
|
|
41
|
+
const frame = FRAMES_SYNC[i % FRAMES_SYNC.length];
|
|
42
|
+
process.stdout.write(`\r ${frame} ${message}`);
|
|
43
|
+
i++;
|
|
44
|
+
}, 120);
|
|
45
|
+
return {
|
|
46
|
+
stop(finalMsg) {
|
|
47
|
+
clearInterval(interval);
|
|
48
|
+
process.stdout.write('\r' + ' '.repeat(message.length + 10) + '\r');
|
|
49
|
+
if (finalMsg) {
|
|
50
|
+
console.log(` ${finalMsg}`);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sparkle trail effect — prints a cascade of sparkles, then your message.
|
|
57
|
+
*/
|
|
58
|
+
function sparkle(message) {
|
|
59
|
+
const frame = FRAMES_SPARKLE[Math.floor(Math.random() * FRAMES_SPARKLE.length)];
|
|
60
|
+
console.log(` ${frame} ${message}`);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Print a success celebration.
|
|
64
|
+
*/
|
|
65
|
+
function celebrate(message) {
|
|
66
|
+
const frame = FRAMES_ROCKET[Math.floor(Math.random() * FRAMES_ROCKET.length)];
|
|
67
|
+
console.log(`\n ${frame} \x1b[32m${message}\x1b[0m ${frame}`);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Print a whimsical section header with a decorative line.
|
|
71
|
+
*/
|
|
72
|
+
function section(title) {
|
|
73
|
+
const line = '─'.repeat(Math.max(0, 44 - title.length));
|
|
74
|
+
console.log(`\n \x1b[36m── ${title} ${line}\x1b[0m`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Print a friendly stat line (for summaries).
|
|
78
|
+
*/
|
|
79
|
+
function stat(label, value) {
|
|
80
|
+
console.log(` \x1b[33m${label}\x1b[0m ${value}`);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Print a warm, friendly error — problems happen, we're chill about it.
|
|
84
|
+
*/
|
|
85
|
+
function oops(message) {
|
|
86
|
+
console.error(`\n \x1b[31m✗ Oops!\x1b[0m ${message}`);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Print a gentle warning.
|
|
90
|
+
*/
|
|
91
|
+
function heads_up(message) {
|
|
92
|
+
console.log(` \x1b[33m⚡\x1b[0m ${message}`);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Witty progress messages for different operations.
|
|
96
|
+
*/
|
|
97
|
+
exports.WITTY = {
|
|
98
|
+
pulling: 'Reaching into the cloud pocket...',
|
|
99
|
+
pushing: 'Tucking your setup into the pocket...',
|
|
100
|
+
encrypting: 'Wrapping secrets in tinfoil...',
|
|
101
|
+
decrypting: 'Unwrapping the secret sauce...',
|
|
102
|
+
cloning: 'Setting up your secret stash...',
|
|
103
|
+
verifying: 'Checking your credentials (no judgment)...',
|
|
104
|
+
readingMCP: 'Rounding up your MCP servers...',
|
|
105
|
+
readingPlugins: 'Collecting plugin souvenirs...',
|
|
106
|
+
readingAgents: 'Gathering your agent squad...',
|
|
107
|
+
readingSkills: 'Packing up your skill tree...',
|
|
108
|
+
done: 'All pocketed!',
|
|
109
|
+
nothingNew: 'Already in sync — you\'re living in the future.',
|
|
110
|
+
pushDone: 'Your setup is safe in the cloud pocket!',
|
|
111
|
+
pullDone: 'Your setup landed safely! Welcome back.',
|
|
112
|
+
initDone: 'mcpocket is ready to roll!',
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=sparkle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkle.js","sourceRoot":"","sources":["../../src/utils/sparkle.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAmBH,kCAEC;AAMD,0BAiBC;AAKD,0BAGC;AAKD,8BAGC;AAKD,0BAGC;AAKD,oBAEC;AAKD,oBAEC;AAKD,4BAEC;AAvFD,MAAM,UAAU,GAAG;;;;;;;;CAQlB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACzC,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACtD,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAE9C;;GAEG;AACH,SAAgB,WAAW;IACzB,OAAO,CAAC,GAAG,CAAC,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,OAAe;IACrC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;QAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC,EAAE,CAAC;IACN,CAAC,EAAE,GAAG,CAAC,CAAC;IAER,OAAO;QACL,IAAI,CAAC,QAAiB;YACpB,aAAa,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,MAAM,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zD,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,OAAe;IACtC,OAAO,CAAC,GAAG,CAAC,sBAAsB,OAAO,EAAE,CAAC,CAAC;AAC/C,CAAC;AAED;;GAEG;AACU,QAAA,KAAK,GAAG;IACnB,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAE,uCAAuC;IAChD,UAAU,EAAE,gCAAgC;IAC5C,UAAU,EAAE,gCAAgC;IAC5C,OAAO,EAAE,iCAAiC;IAC1C,SAAS,EAAE,4CAA4C;IACvD,UAAU,EAAE,iCAAiC;IAC7C,cAAc,EAAE,gCAAgC;IAChD,aAAa,EAAE,+BAA+B;IAC9C,aAAa,EAAE,+BAA+B;IAC9C,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,iDAAiD;IAC7D,QAAQ,EAAE,yCAAyC;IACnD,QAAQ,EAAE,yCAAyC;IACnD,QAAQ,EAAE,4BAA4B;CAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpocket",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Your AI setup.
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Your AI setup. Every pocket. Syncs agents, skills, plugins, and MCPs across all your machines like magic.",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"mcpocket": "./dist/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dotfiles",
|
|
29
29
|
"opencode"
|
|
30
30
|
],
|
|
31
|
-
"author": "
|
|
31
|
+
"author": "David Morais <david@davidmorais.com>",
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|