synap 0.1.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/.claude/skills/synap-assistant/SKILL.md +476 -0
- package/README.md +200 -0
- package/package.json +50 -0
- package/scripts/postinstall.js +58 -0
- package/src/cli.js +1734 -0
- package/src/deletion-log.js +105 -0
- package/src/preferences.js +175 -0
- package/src/skill-installer.js +175 -0
- package/src/storage.js +803 -0
- package/src/templates/user-preferences-template.md +16 -0
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "synap",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A CLI for externalizing your working memory",
|
|
5
|
+
"main": "src/cli.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"synap": "src/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "vitest",
|
|
11
|
+
"test:run": "vitest run",
|
|
12
|
+
"lint": "eslint src/",
|
|
13
|
+
"postinstall": "node scripts/postinstall.js"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"cli",
|
|
17
|
+
"synap",
|
|
18
|
+
"productivity",
|
|
19
|
+
"notes",
|
|
20
|
+
"todos",
|
|
21
|
+
"ideas",
|
|
22
|
+
"ai-agent"
|
|
23
|
+
],
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/dparedesi/synap"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@inquirer/prompts": "^8.1.0",
|
|
32
|
+
"boxen": "^8.0.0",
|
|
33
|
+
"chalk": "^5.4.0",
|
|
34
|
+
"commander": "^14.0.0",
|
|
35
|
+
"update-notifier": "^7.0.0",
|
|
36
|
+
"uuid": "^11.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"eslint": "^9.0.0",
|
|
40
|
+
"vitest": "^3.0.0"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"src/",
|
|
47
|
+
"scripts/",
|
|
48
|
+
".claude/skills/"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* postinstall.js - Run after npm install
|
|
5
|
+
* Shows hints and optionally auto-updates the skill
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
|
|
12
|
+
const SKILL_NAME = 'synap-assistant';
|
|
13
|
+
const TARGET_SKILL_DIR = path.join(os.homedir(), '.claude', 'skills', SKILL_NAME);
|
|
14
|
+
const TARGET_SKILL_FILE = path.join(TARGET_SKILL_DIR, 'SKILL.md');
|
|
15
|
+
|
|
16
|
+
// ANSI colors
|
|
17
|
+
const CYAN = '\x1b[36m';
|
|
18
|
+
const RESET = '\x1b[0m';
|
|
19
|
+
const BOLD = '\x1b[1m';
|
|
20
|
+
|
|
21
|
+
async function main() {
|
|
22
|
+
console.log('');
|
|
23
|
+
console.log(`${BOLD}synap${RESET} - A CLI for externalizing your working memory`);
|
|
24
|
+
console.log('');
|
|
25
|
+
|
|
26
|
+
// Check if skill is installed
|
|
27
|
+
if (fs.existsSync(TARGET_SKILL_FILE)) {
|
|
28
|
+
try {
|
|
29
|
+
const skillInstaller = require('../src/skill-installer');
|
|
30
|
+
const result = await skillInstaller.install();
|
|
31
|
+
if (result.installed) {
|
|
32
|
+
console.log(`${CYAN}Skill auto-updated.${RESET}`);
|
|
33
|
+
} else if (result.skipped) {
|
|
34
|
+
console.log(`${CYAN}Skill already up to date.${RESET}`);
|
|
35
|
+
} else if (result.needsForce) {
|
|
36
|
+
console.log(`${CYAN}Skill modified locally.${RESET} Run 'synap install-skill --force' to update.`);
|
|
37
|
+
}
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.log(`${CYAN}Skill update failed.${RESET} Run 'synap install-skill' to retry.`);
|
|
40
|
+
}
|
|
41
|
+
} else {
|
|
42
|
+
console.log('To enable AI agent integration, run:');
|
|
43
|
+
console.log(` ${CYAN}synap install-skill${RESET}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
console.log('');
|
|
47
|
+
console.log('Quick start:');
|
|
48
|
+
console.log(` ${CYAN}synap add "My first idea"${RESET} # Capture a thought`);
|
|
49
|
+
console.log(` ${CYAN}synap todo "Something to do"${RESET} # Add a todo`);
|
|
50
|
+
console.log(` ${CYAN}synap list${RESET} # See all entries`);
|
|
51
|
+
console.log(` ${CYAN}synap stats${RESET} # Overview statistics`);
|
|
52
|
+
console.log('');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
main().catch(err => {
|
|
56
|
+
console.error(err);
|
|
57
|
+
process.exit(1);
|
|
58
|
+
});
|