@synsci/cli 1.0.0 → 1.1.47

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/bin/synsc.js ADDED
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env node
2
+
3
+ const childProcess = require("child_process")
4
+ const fs = require("fs")
5
+ const path = require("path")
6
+ const os = require("os")
7
+
8
+ function run(target) {
9
+ const result = childProcess.spawnSync(target, process.argv.slice(2), {
10
+ stdio: "inherit",
11
+ })
12
+ if (result.error) {
13
+ console.error(result.error.message)
14
+ process.exit(1)
15
+ }
16
+ const code = typeof result.status === "number" ? result.status : 0
17
+ process.exit(code)
18
+ }
19
+
20
+ // Helper: check if a path points to a real binary (not this wrapper script)
21
+ function isBinary(p) {
22
+ try {
23
+ if (!fs.existsSync(p)) return false
24
+ const real = fs.realpathSync(p)
25
+ // Skip if it resolves to this script (self-reference via symlink)
26
+ if (real === fs.realpathSync(__filename)) return false
27
+ // Skip if it's a .js file (another wrapper)
28
+ if (real.endsWith(".js")) return false
29
+ return true
30
+ } catch {
31
+ return false
32
+ }
33
+ }
34
+
35
+ // 1. Check SYNSCI_BIN_PATH env var
36
+ const envPath = process.env.SYNSCI_BIN_PATH
37
+ if (envPath && isBinary(envPath)) {
38
+ run(envPath)
39
+ }
40
+
41
+ const binary = os.platform() === "win32" ? "synsc.exe" : "synsc"
42
+
43
+ // 2. Check ~/.synsc/bin (primary install location)
44
+ const homeBin = path.join(os.homedir(), ".synsc", "bin", binary)
45
+ if (isBinary(homeBin)) {
46
+ run(homeBin)
47
+ }
48
+
49
+ // 3. Check /opt/homebrew/bin (macOS)
50
+ if (os.platform() === "darwin" && isBinary("/opt/homebrew/bin/synsc")) {
51
+ run("/opt/homebrew/bin/synsc")
52
+ }
53
+
54
+ // 4. Check /usr/local/bin
55
+ if (isBinary("/usr/local/bin/synsc")) {
56
+ run("/usr/local/bin/synsc")
57
+ }
58
+
59
+ // 5. Search node_modules for platform package
60
+ const scriptPath = fs.realpathSync(__filename)
61
+ const scriptDir = path.dirname(scriptPath)
62
+
63
+ const platformMap = { darwin: "darwin", linux: "linux", win32: "windows" }
64
+ const archMap = { x64: "x64", arm64: "arm64", arm: "arm" }
65
+ const platform = platformMap[os.platform()] || os.platform()
66
+ const arch = archMap[os.arch()] || os.arch()
67
+ const base = "synsc-" + platform + "-" + arch
68
+ const scopedBase = "cli-" + platform + "-" + arch
69
+
70
+ let current = scriptDir
71
+ while (true) {
72
+ const modules = path.join(current, "node_modules")
73
+ if (fs.existsSync(modules)) {
74
+ try {
75
+ const entries = fs.readdirSync(modules)
76
+ for (const entry of entries) {
77
+ if (entry.startsWith(base)) {
78
+ const candidate = path.join(modules, entry, "bin", binary)
79
+ if (isBinary(candidate)) run(candidate)
80
+ }
81
+ }
82
+ // Check scoped packages (@synsci/cli-darwin-arm64)
83
+ const scoped = path.join(modules, "@synsci")
84
+ if (fs.existsSync(scoped)) {
85
+ const scopedEntries = fs.readdirSync(scoped)
86
+ for (const entry of scopedEntries) {
87
+ if (entry.startsWith(scopedBase)) {
88
+ const candidate = path.join(scoped, entry, "bin", binary)
89
+ if (isBinary(candidate)) run(candidate)
90
+ }
91
+ }
92
+ }
93
+ } catch {}
94
+ }
95
+ const parent = path.dirname(current)
96
+ if (parent === current) break
97
+ current = parent
98
+ }
99
+
100
+ console.error("synsc binary not found.")
101
+ console.error("Install with: curl -fsSL https://syntheticsciences.ai/install | bash")
102
+ console.error("Or set SYNSCI_BIN_PATH environment variable.")
103
+ process.exit(1)
package/package.json CHANGED
@@ -1,44 +1,14 @@
1
1
  {
2
2
  "name": "@synsci/cli",
3
- "version": "1.0.0",
4
- "description": "Synthetic Sciences CLI - AI coding agent for machine learning engineers",
5
- "publishConfig": {
6
- "access": "restricted"
7
- },
8
- "main": "src/index.js",
3
+ "version": "1.1.47",
4
+ "description": "Synthetic Sciences CLI - AI research agent",
9
5
  "bin": {
10
- "synsc": "./bin/cli.js"
11
- },
12
- "type": "module",
13
- "scripts": {
14
- "start": "node bin/cli.js",
15
- "test": "node --test"
6
+ "synsc": "./bin/synsc.js"
16
7
  },
17
- "keywords": [
18
- "ai",
19
- "ml",
20
- "machine-learning",
21
- "deep-learning",
22
- "cli",
23
- "coding-agent",
24
- "synthetic-sciences"
25
- ],
26
- "author": "Synthetic Sciences",
27
- "license": "UNLICENSED",
8
+ "files": ["bin/"],
9
+ "license": "MIT",
28
10
  "repository": {
29
11
  "type": "git",
30
- "url": "https://github.com/inkvell/synsc-cli.git"
31
- },
32
- "homepage": "https://syntheticsciences.com",
33
- "bugs": {
34
- "url": "https://github.com/inkvell/synsc-cli/issues"
35
- },
36
- "engines": {
37
- "node": ">=18.0.0"
38
- },
39
- "dependencies": {
40
- "chalk": "^5.3.0",
41
- "inquirer": "^9.2.12",
42
- "ora": "^8.0.1"
12
+ "url": "https://github.com/ishaan1124/synthetisciences-cli"
43
13
  }
44
14
  }
package/README.md DELETED
@@ -1,39 +0,0 @@
1
- # @synsci/cli
2
-
3
- Synthetic Sciences CLI - AI coding agent for machine learning engineers.
4
-
5
- > **Note**: This is a private package. Access requires a Synthetic Sciences subscription.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install -g @synsci/cli
11
- ```
12
-
13
- ## Usage
14
-
15
- ```bash
16
- synsc
17
- ```
18
-
19
- ## Features
20
-
21
- - **82 expert ML skills** built-in (GRPO, vLLM, DeepSpeed, Axolotl, etc.)
22
- - **Native cloud integrations** (HuggingFace, W&B, Modal, Lambda Labs)
23
- - **Tokens included** in your subscription
24
- - **Model selection** (Claude 4.5, GPT-5.2, Gemini 3)
25
-
26
- ## Subscription
27
-
28
- Visit [syntheticsciences.com](https://syntheticsciences.com) to subscribe.
29
-
30
- | Plan | Price | Rate Limits |
31
- |------|-------|-------------|
32
- | Pro | $50/mo | ~1,000 requests/day |
33
- | Pro+ | $200/mo | ~5,000 requests/day |
34
- | Scale | $500/mo | ~20,000 requests/day |
35
- | Enterprise | Custom | Unlimited |
36
-
37
- ## License
38
-
39
- UNLICENSED - Synthetic Sciences
package/bin/cli.js DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { main } from '../src/index.js';
4
-
5
- main().catch((error) => {
6
- console.error('Error:', error.message);
7
- process.exit(1);
8
- });
package/src/agents.js DELETED
@@ -1,81 +0,0 @@
1
- import { existsSync } from 'fs';
2
- import { homedir } from 'os';
3
- import { join } from 'path';
4
-
5
- /**
6
- * Supported coding agents with their global config directories and skills paths
7
- * All agents now support ~/.{agent}/skills/ format
8
- */
9
- export const SUPPORTED_AGENTS = [
10
- {
11
- id: 'claude',
12
- name: 'Claude Code',
13
- configDir: '.claude',
14
- skillsDir: 'skills',
15
- },
16
- {
17
- id: 'cursor',
18
- name: 'Cursor',
19
- configDir: '.cursor',
20
- skillsDir: 'skills',
21
- },
22
- {
23
- id: 'codex',
24
- name: 'Codex',
25
- configDir: '.codex',
26
- skillsDir: 'skills',
27
- },
28
- {
29
- id: 'gemini',
30
- name: 'Gemini CLI',
31
- configDir: '.gemini',
32
- skillsDir: 'skills',
33
- },
34
- {
35
- id: 'qwen',
36
- name: 'Qwen Code',
37
- configDir: '.qwen',
38
- skillsDir: 'skills',
39
- },
40
- ];
41
-
42
- /**
43
- * Detect which coding agents are installed on the system
44
- * @returns {Array} List of detected agents with their paths
45
- */
46
- export function detectAgents() {
47
- const home = homedir();
48
- const detected = [];
49
-
50
- for (const agent of SUPPORTED_AGENTS) {
51
- const configPath = join(home, agent.configDir);
52
-
53
- if (existsSync(configPath)) {
54
- detected.push({
55
- ...agent,
56
- path: `~/${agent.configDir}`,
57
- fullPath: configPath,
58
- skillsPath: join(configPath, agent.skillsDir),
59
- });
60
- }
61
- }
62
-
63
- return detected;
64
- }
65
-
66
- /**
67
- * Get agent by ID
68
- * @param {string} id Agent ID
69
- * @returns {Object|null} Agent configuration or null
70
- */
71
- export function getAgentById(id) {
72
- return SUPPORTED_AGENTS.find(agent => agent.id === id) || null;
73
- }
74
-
75
- /**
76
- * Get all supported agent IDs
77
- * @returns {Array<string>} List of agent IDs
78
- */
79
- export function getSupportedAgentIds() {
80
- return SUPPORTED_AGENTS.map(agent => agent.id);
81
- }
package/src/ascii.js DELETED
@@ -1,126 +0,0 @@
1
- import chalk from 'chalk';
2
-
3
- // Clean capital ORCHESTRA
4
- const logo = `
5
-
6
- ██████╗ ██████╗ ██████╗ ██╗ ██╗ ███████╗ ███████╗ ████████╗ ██████╗ █████╗
7
- ██╔═══██╗██╔══██╗██╔════╝ ██║ ██║ ██╔════╝ ██╔════╝ ╚══██╔══╝ ██╔══██╗ ██╔══██╗
8
- ██║ ██║██████╔╝██║ ███████║ █████╗ ███████╗ ██║ ██████╔╝ ███████║
9
- ██║ ██║██╔══██╗██║ ██╔══██║ ██╔══╝ ╚════██║ ██║ ██╔══██╗ ██╔══██║
10
- ╚██████╔╝██║ ██║╚██████╗ ██║ ██║ ███████╗ ███████║ ██║ ██║ ██║ ██║ ██║
11
- ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
12
-
13
- `;
14
-
15
- /**
16
- * Welcome screen
17
- */
18
- export function showWelcome(skillCount = 82, categoryCount = 20, agentCount = 5) {
19
- console.clear();
20
- console.log(chalk.white(logo));
21
- console.log();
22
- console.log(chalk.bold.white(' AI Research Skills'));
23
- console.log();
24
- console.log();
25
- console.log(chalk.dim(' Expert-level knowledge for AI research engineering'));
26
- console.log();
27
- console.log();
28
- console.log(` ${skillCount} skills · ${categoryCount} categories · ${agentCount} agents`);
29
- console.log();
30
- console.log();
31
- }
32
-
33
- /**
34
- * Agents detected screen
35
- */
36
- export function showAgentsDetected(agents) {
37
- console.clear();
38
- console.log(chalk.white(logo));
39
- console.log();
40
- console.log(chalk.bold.white(' AI Research Skills'));
41
- console.log();
42
- console.log();
43
- console.log(chalk.green(` ✓ Found ${agents.length} coding agent${agents.length !== 1 ? 's' : ''}`));
44
- console.log();
45
-
46
- for (const agent of agents) {
47
- console.log(` ${chalk.green('●')} ${chalk.white(agent.name.padEnd(14))} ${chalk.dim(agent.path)}`);
48
- }
49
-
50
- console.log();
51
- console.log();
52
- }
53
-
54
- /**
55
- * Menu header for inner screens
56
- */
57
- export function showMenuHeader() {
58
- console.clear();
59
- console.log();
60
- console.log(chalk.dim(' ────────────────────────────────────────────────────────────'));
61
- console.log(chalk.white(' ORCHESTRA · AI Research Skills'));
62
- console.log(chalk.dim(' ────────────────────────────────────────────────────────────'));
63
- console.log();
64
- }
65
-
66
- /**
67
- * Success screen
68
- */
69
- export function showSuccess(skillCount, agents) {
70
- console.clear();
71
- console.log();
72
- console.log();
73
- console.log(chalk.green.bold(' ✓ Installation Complete'));
74
- console.log();
75
- console.log();
76
- console.log(` Installed ${chalk.white(skillCount)} skills to ${chalk.white(agents.length)} agent${agents.length !== 1 ? 's' : ''}`);
77
- console.log();
78
- console.log(chalk.dim(' Your skills are now active and will appear when relevant.'));
79
- console.log();
80
- console.log();
81
- console.log(chalk.dim(' ────────────────────────────────────────────────────────────'));
82
- console.log();
83
- console.log(chalk.white(' Examples:'));
84
- console.log();
85
- console.log(chalk.dim(' → "Help me set up GRPO training with verl"'));
86
- console.log(chalk.dim(' → "How do I serve a model with vLLM?"'));
87
- console.log(chalk.dim(' → "Write a NeurIPS paper introduction"'));
88
- console.log();
89
- console.log(chalk.dim(' ────────────────────────────────────────────────────────────'));
90
- console.log();
91
- console.log(chalk.white(' Commands:'));
92
- console.log();
93
- console.log(` ${chalk.dim('$')} ${chalk.cyan('npx @syntheticsciences/ai-research-skills')}`);
94
- console.log(` ${chalk.dim('$')} ${chalk.cyan('npx @syntheticsciences/ai-research-skills list')}`);
95
- console.log(` ${chalk.dim('$')} ${chalk.cyan('npx @syntheticsciences/ai-research-skills update')}`);
96
- console.log();
97
- console.log(chalk.dim(' ────────────────────────────────────────────────────────────'));
98
- console.log();
99
- console.log(chalk.dim(' github.com/syntheticsciences/ai-research-skills'));
100
- console.log();
101
- }
102
-
103
- /**
104
- * No agents found screen
105
- */
106
- export function showNoAgents() {
107
- console.clear();
108
- console.log(chalk.white(logo));
109
- console.log();
110
- console.log(chalk.bold.white(' AI Research Skills'));
111
- console.log();
112
- console.log();
113
- console.log(chalk.yellow(' ⚠ No coding agents detected'));
114
- console.log();
115
- console.log(chalk.dim(' Install one of these supported agents:'));
116
- console.log();
117
- console.log(' ○ Claude Code');
118
- console.log(' ○ Cursor');
119
- console.log(' ○ Codex (OpenAI)');
120
- console.log(' ○ Windsurf');
121
- console.log(' ○ Gemini CLI');
122
- console.log(' ○ Kilo Code');
123
- console.log(' ○ Qwen Code');
124
- console.log();
125
- console.log();
126
- }