50c 1.4.1 → 1.5.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/README.md +28 -19
- package/bin/50c.js +125 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,19 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
**Augment any AI with genius-level problem solving**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx 50c install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That's it. Auto-configures MCP for:
|
|
12
|
+
- **Desktop:** Claude Desktop, Cursor, VS Code, Windsurf, Verdent, Zed
|
|
13
|
+
- **Extensions:** Cline, Continue, Roo Code, Augment
|
|
14
|
+
- **JetBrains:** IntelliJ IDEA and other JetBrains IDEs
|
|
15
|
+
|
|
16
|
+
Get your API key at https://50c.ai and set it:
|
|
17
|
+
- **Windows:** System Properties → Environment Variables → Add `FIFTYC_API_KEY`
|
|
18
|
+
- **Mac/Linux:** `export FIFTYC_API_KEY="your-key"` in your shell profile
|
|
19
|
+
|
|
20
|
+
Restart your IDE.
|
|
8
21
|
|
|
9
22
|
---
|
|
10
23
|
|
|
11
24
|
## CLI Mode (for Agents)
|
|
12
25
|
|
|
13
26
|
```bash
|
|
14
|
-
#
|
|
15
|
-
npm install -g 50c
|
|
16
|
-
|
|
17
|
-
# Or use directly with npx
|
|
27
|
+
# Set key first
|
|
18
28
|
export FIFTYC_API_KEY="your-key"
|
|
19
29
|
|
|
20
30
|
# Deep problem solving ($0.50)
|
|
@@ -30,22 +40,11 @@ export FIFTYC_API_KEY="your-key"
|
|
|
30
40
|
50c vibe "building a CLI tool"
|
|
31
41
|
```
|
|
32
42
|
|
|
33
|
-
**Agent-friendly:** Output is plain text, ready for piping:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# Use in scripts
|
|
37
|
-
ANSWER=$(50c genius "Fix this SQL query")
|
|
38
|
-
echo "$ANSWER" | grep "SELECT"
|
|
39
|
-
|
|
40
|
-
# Chain with other tools
|
|
41
|
-
50c hints "caching strategies" | head -3
|
|
42
|
-
```
|
|
43
|
-
|
|
44
43
|
---
|
|
45
44
|
|
|
46
45
|
## MCP Mode (for IDEs)
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
`npx 50c install` handles this automatically. Manual config if needed:
|
|
49
48
|
|
|
50
49
|
### Claude Desktop
|
|
51
50
|
|
|
@@ -259,4 +258,14 @@ const answer = await ai.genius('your problem');
|
|
|
259
258
|
|
|
260
259
|
---
|
|
261
260
|
|
|
261
|
+
## Hosted IDEs
|
|
262
|
+
|
|
263
|
+
For Bolt.new, Replit, Lovable, Mocha, v0.dev, and other hosted environments:
|
|
264
|
+
|
|
265
|
+
1. Go to MCP/Tools settings in your IDE
|
|
266
|
+
2. Add command: `npx -y 50c`
|
|
267
|
+
3. Set env: `FIFTYC_API_KEY=your-key`
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
262
271
|
**Built by genxis**
|
package/bin/50c.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const https = require('https');
|
|
3
3
|
const readline = require('readline');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const os = require('os');
|
|
4
7
|
|
|
5
8
|
const API_ENDPOINT = process.env.FIFTYC_ENDPOINT || 'https://50c.ai';
|
|
6
9
|
const MCP_ENDPOINT = API_ENDPOINT + '/mcp';
|
|
@@ -12,60 +15,159 @@ if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
|
12
15
|
process.exit(0);
|
|
13
16
|
}
|
|
14
17
|
|
|
18
|
+
// Install MCP to IDE
|
|
19
|
+
if (process.argv.includes('--install') || process.argv.includes('install')) {
|
|
20
|
+
installMCP();
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
15
24
|
// Help
|
|
16
25
|
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
17
26
|
showHelp();
|
|
18
27
|
process.exit(0);
|
|
19
28
|
}
|
|
20
29
|
|
|
30
|
+
function installMCP() {
|
|
31
|
+
const home = os.homedir();
|
|
32
|
+
const isWin = process.platform === 'win32';
|
|
33
|
+
const appData = process.env.APPDATA || path.join(home, 'AppData', 'Roaming');
|
|
34
|
+
const localAppData = process.env.LOCALAPPDATA || path.join(home, 'AppData', 'Local');
|
|
35
|
+
|
|
36
|
+
const ides = [
|
|
37
|
+
// Desktop IDEs
|
|
38
|
+
{ name: 'Claude Desktop', path: isWin ? path.join(appData, 'Claude', 'claude_desktop_config.json') : path.join(home, '.claude', 'claude_desktop_config.json'), key: 'mcpServers' },
|
|
39
|
+
{ name: 'Cursor', path: path.join(home, '.cursor', 'mcp.json'), key: 'mcpServers' },
|
|
40
|
+
{ name: 'Windsurf', path: path.join(home, '.codeium', 'windsurf', 'mcp_config.json'), key: 'mcpServers' },
|
|
41
|
+
{ name: 'VS Code', path: path.join(home, '.vscode', 'mcp.json'), key: 'servers' },
|
|
42
|
+
{ name: 'VS Code Insiders', path: path.join(home, '.vscode-insiders', 'mcp.json'), key: 'servers' },
|
|
43
|
+
{ name: 'VSCodium', path: path.join(home, '.vscodium', 'mcp.json'), key: 'servers' },
|
|
44
|
+
{ name: 'Verdent', path: path.join(home, '.verdent', 'mcp.json'), key: 'mcpServers' },
|
|
45
|
+
// Roo Code / Continue / Cline
|
|
46
|
+
{ name: 'Roo Code', path: path.join(home, '.roo-code', 'mcp.json'), key: 'mcpServers' },
|
|
47
|
+
{ name: 'Roo Code (AppData)', path: isWin ? path.join(appData, 'Roo-Code', 'mcp.json') : null, key: 'mcpServers' },
|
|
48
|
+
{ name: 'Continue', path: path.join(home, '.continue', 'mcp.json'), key: 'mcpServers' },
|
|
49
|
+
{ name: 'Cline', path: path.join(home, '.cline', 'mcp.json'), key: 'mcpServers' },
|
|
50
|
+
{ name: 'Cline (VS Code)', path: isWin ? path.join(appData, 'Code', 'User', 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json') : path.join(home, '.config', 'Code', 'User', 'globalStorage', 'saoudrizwan.claude-dev', 'settings', 'cline_mcp_settings.json'), key: 'mcpServers' },
|
|
51
|
+
// JetBrains IDEs
|
|
52
|
+
{ name: 'JetBrains', path: path.join(home, '.jb-mcp', 'mcp.json'), key: 'mcpServers' },
|
|
53
|
+
{ name: 'IntelliJ IDEA', path: isWin ? path.join(appData, 'JetBrains', 'IntelliJIdea', 'mcp.json') : path.join(home, '.config', 'JetBrains', 'mcp.json'), key: 'mcpServers' },
|
|
54
|
+
// Augment
|
|
55
|
+
{ name: 'Augment', path: path.join(home, '.augment', 'mcp.json'), key: 'mcpServers' },
|
|
56
|
+
// Zed
|
|
57
|
+
{ name: 'Zed', path: path.join(home, '.config', 'zed', 'settings.json'), key: 'context_servers', nested: true },
|
|
58
|
+
].filter(ide => ide.path); // Remove null paths
|
|
59
|
+
|
|
60
|
+
const mcpEntry = {
|
|
61
|
+
command: 'npx',
|
|
62
|
+
args: ['-y', '50c'],
|
|
63
|
+
env: { FIFTYC_API_KEY: API_KEY || '<YOUR_API_KEY>' }
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// Zed uses different format
|
|
67
|
+
const zedEntry = {
|
|
68
|
+
command: { path: 'npx', args: ['-y', '50c'], env: { FIFTYC_API_KEY: API_KEY || '<YOUR_API_KEY>' } }
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
let installed = [];
|
|
72
|
+
let hostedNote = false;
|
|
73
|
+
|
|
74
|
+
for (const ide of ides) {
|
|
75
|
+
try {
|
|
76
|
+
let config = {};
|
|
77
|
+
const dir = path.dirname(ide.path);
|
|
78
|
+
|
|
79
|
+
if (fs.existsSync(ide.path)) {
|
|
80
|
+
config = JSON.parse(fs.readFileSync(ide.path, 'utf8'));
|
|
81
|
+
} else if (fs.existsSync(dir)) {
|
|
82
|
+
// Dir exists but no config file - create it
|
|
83
|
+
} else {
|
|
84
|
+
continue; // IDE not installed
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (!config[ide.key]) config[ide.key] = {};
|
|
88
|
+
if (config[ide.key]['50c']) {
|
|
89
|
+
console.log(`[skip] ${ide.name} - already configured`);
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
config[ide.key]['50c'] = ide.name === 'Zed' ? zedEntry : mcpEntry;
|
|
94
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
95
|
+
fs.writeFileSync(ide.path, JSON.stringify(config, null, 2));
|
|
96
|
+
installed.push(ide.name);
|
|
97
|
+
console.log(`[done] ${ide.name} - added 50c`);
|
|
98
|
+
} catch (e) {
|
|
99
|
+
// Skip silently
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log('');
|
|
104
|
+
if (installed.length > 0) {
|
|
105
|
+
console.log(`Installed to: ${installed.join(', ')}`);
|
|
106
|
+
console.log('');
|
|
107
|
+
if (!API_KEY) {
|
|
108
|
+
console.log('Next: Set FIFTYC_API_KEY in the config or as env var');
|
|
109
|
+
console.log('Get key at: https://50c.ai');
|
|
110
|
+
} else {
|
|
111
|
+
console.log('Restart your IDE to activate 50c tools.');
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
console.log('No local IDEs detected.');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
console.log('');
|
|
118
|
+
console.log('Hosted IDEs (manual setup via their MCP settings):');
|
|
119
|
+
console.log(' Bolt.new, Replit, Lovable, Mocha, v0.dev');
|
|
120
|
+
console.log(' Use: npx -y 50c (command) with FIFTYC_API_KEY env');
|
|
121
|
+
}
|
|
122
|
+
|
|
21
123
|
function showHelp() {
|
|
22
124
|
console.log(`
|
|
23
125
|
50c - AI Augmentation CLI & MCP Server
|
|
24
126
|
|
|
127
|
+
QUICK START:
|
|
128
|
+
npx 50c install Auto-configure MCP for your IDE
|
|
129
|
+
|
|
25
130
|
USAGE:
|
|
26
|
-
50c <command> <input>
|
|
27
|
-
50c
|
|
131
|
+
50c <command> <input> Direct CLI mode
|
|
132
|
+
50c MCP mode (JSON-RPC via stdin)
|
|
28
133
|
|
|
29
134
|
COMMANDS:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
hints
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
135
|
+
install Add 50c to all detected IDEs
|
|
136
|
+
genius <problem> Deep problem solving ($0.50)
|
|
137
|
+
hints <topic> 5 brutal 2-word hints ($0.05)
|
|
138
|
+
hints+ <topic> 10 expanded hints ($0.10)
|
|
139
|
+
vibe <working_on> 3 unconventional ideas ($0.05)
|
|
140
|
+
one-liner <product> Elevator pitch in 8 words ($0.02)
|
|
141
|
+
roast <code> Brutal code review ($0.05)
|
|
142
|
+
name-it <does> 5 names + domain check ($0.03)
|
|
143
|
+
price-it <product> SaaS pricing strategy ($0.05)
|
|
144
|
+
compute <code> Execute Python code ($0.02)
|
|
39
145
|
|
|
40
146
|
EXAMPLES:
|
|
147
|
+
npx 50c install
|
|
41
148
|
50c genius "How do I scale PostgreSQL?"
|
|
42
149
|
50c hints "api design"
|
|
43
|
-
50c one-liner "habit tracker with friends"
|
|
44
|
-
50c roast "const x = localStorage.getItem('jwt')"
|
|
45
|
-
50c name-it "AI that writes emails"
|
|
46
|
-
50c price-it "email automation SaaS"
|
|
47
150
|
|
|
48
151
|
ENVIRONMENT:
|
|
49
152
|
FIFTYC_API_KEY Your API key (required)
|
|
50
|
-
FIFTYC_ENDPOINT Custom endpoint (default: https://50c.ai)
|
|
51
153
|
|
|
52
154
|
MCP MODE:
|
|
53
155
|
Run without arguments for IDE integration (Claude Desktop, Cursor, etc.)
|
|
54
156
|
`);
|
|
55
157
|
}
|
|
56
158
|
|
|
57
|
-
// Check API key
|
|
58
|
-
if (!API_KEY) {
|
|
59
|
-
console.error('Error: FIFTYC_API_KEY environment variable required');
|
|
60
|
-
console.error('Get your key at: https://50c.ai');
|
|
61
|
-
process.exit(1);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
159
|
// CLI commands
|
|
65
160
|
const COMMANDS = ['genius', 'hints', 'hints+', 'vibe', 'compute', 'one-liner', 'roast', 'name-it', 'price-it', 'mind-opener'];
|
|
66
161
|
const command = process.argv[2];
|
|
67
162
|
const input = process.argv.slice(3).join(' ');
|
|
68
163
|
|
|
164
|
+
// Check API key (not needed for install/help/version)
|
|
165
|
+
if (!API_KEY && command && COMMANDS.includes(command)) {
|
|
166
|
+
console.error('Error: FIFTYC_API_KEY environment variable required');
|
|
167
|
+
console.error('Get your key at: https://50c.ai');
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
|
|
69
171
|
if (command && COMMANDS.includes(command)) {
|
|
70
172
|
if (!input) {
|
|
71
173
|
console.error(`Error: ${command} requires input`);
|