50c 1.1.0 → 1.2.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.
Files changed (4) hide show
  1. package/LICENSE +6 -8
  2. package/README.md +71 -108
  3. package/bin/50c.js +135 -26
  4. package/package.json +6 -6
package/LICENSE CHANGED
@@ -1,14 +1,13 @@
1
1
  PROPRIETARY SOFTWARE LICENSE
2
2
 
3
- Copyright (c) 2026 genxis.com. All Rights Reserved.
3
+ Copyright (c) 2026 genxis. All Rights Reserved.
4
4
 
5
5
  This software and associated documentation files (the "Software") are the
6
- proprietary property of genxis.com.
6
+ proprietary property of genxis.
7
7
 
8
8
  USAGE TERMS:
9
- 1. You may install and use this Software only with a valid API key purchased
10
- from genxis.com.
11
- 2. Each use of the Software requires credits purchased at $0.50 per problem.
9
+ 1. You may install and use this Software only with a valid API key.
10
+ 2. Each use of the Software requires credits at published rates.
12
11
  3. You may NOT copy, modify, merge, publish, distribute, sublicense, or sell
13
12
  copies of the Software.
14
13
  4. You may NOT reverse engineer, decompile, or disassemble the Software.
@@ -26,8 +25,7 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
25
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
27
26
 
28
27
  LIMITATION OF LIABILITY:
29
- IN NO EVENT SHALL GENXIS.COM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ IN NO EVENT SHALL GENXIS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30
29
  LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
31
30
 
32
- For licensing inquiries: sales@genxis.com
33
- Purchase credits: https://genxis.com/50c
31
+ Contact: https://genxis.one
package/README.md CHANGED
@@ -1,26 +1,56 @@
1
- # 50c - Genius Problem Solving for Any IDE
1
+ # 50c - AI Augmentation CLI & MCP Server
2
2
 
3
- **$0.50 per problem solved**
3
+ **Augment any AI with genius-level problem solving**
4
4
 
5
- MCP server that augments ANY AI with genius-level problem solving.
6
- **Product of [genxis.com](https://genxis.com)**
5
+ Works as both:
6
+ - **CLI** for agents and scripts
7
+ - **MCP server** for IDEs (Claude Desktop, Cursor, VS Code, etc.)
7
8
 
8
9
  ---
9
10
 
10
- ## Quick Start
11
+ ## CLI Mode (for Agents)
11
12
 
12
- ### 1. Get API Key
13
- Visit https://genxis.com/50c
13
+ ```bash
14
+ # Install globally (optional)
15
+ npm install -g 50c
16
+
17
+ # Or use directly with npx
18
+ export FIFTYC_API_KEY="your-key"
19
+
20
+ # Deep problem solving ($0.50)
21
+ 50c genius "How do I scale PostgreSQL to 10M rows?"
22
+
23
+ # Quick hints ($0.05)
24
+ 50c hints "api design"
25
+
26
+ # Expanded hints ($0.10)
27
+ 50c hints+ "microservices architecture"
28
+
29
+ # Creative ideas ($0.05)
30
+ 50c vibe "building a CLI tool"
31
+ ```
14
32
 
15
- ### 2. Configure Your IDE (pick one)
33
+ **Agent-friendly:** Output is plain text, ready for piping:
16
34
 
17
- > `npx -y 50c` auto-downloads on first run - no install needed!
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
+ ```
18
43
 
19
44
  ---
20
45
 
46
+ ## MCP Mode (for IDEs)
47
+
48
+ When run without arguments, starts JSON-RPC server on stdin/stdout.
49
+
21
50
  ### Claude Desktop
22
51
 
23
- Config file: `~/.claude/claude_desktop_config.json` (Mac/Linux) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
52
+ **Mac/Linux:** `~/.claude/claude_desktop_config.json`
53
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
24
54
 
25
55
  ```json
26
56
  {
@@ -36,11 +66,9 @@ Config file: `~/.claude/claude_desktop_config.json` (Mac/Linux) or `%APPDATA%\Cl
36
66
  }
37
67
  ```
38
68
 
39
- ---
40
-
41
69
  ### Cursor
42
70
 
43
- Config file: `~/.cursor/mcp.json`
71
+ **Config:** `~/.cursor/mcp.json`
44
72
 
45
73
  ```json
46
74
  {
@@ -56,11 +84,9 @@ Config file: `~/.cursor/mcp.json`
56
84
  }
57
85
  ```
58
86
 
59
- ---
60
-
61
87
  ### VS Code (Copilot)
62
88
 
63
- Config file: `.vscode/mcp.json` in workspace or user settings
89
+ **Config:** `.vscode/mcp.json`
64
90
 
65
91
  ```json
66
92
  {
@@ -76,13 +102,9 @@ Config file: `.vscode/mcp.json` in workspace or user settings
76
102
  }
77
103
  ```
78
104
 
79
- Or via Command Palette: `MCP: Add Server`
80
-
81
- ---
82
-
83
105
  ### Windsurf
84
106
 
85
- Config file: `~/.codeium/windsurf/mcp_config.json`
107
+ **Config:** `~/.codeium/windsurf/mcp_config.json`
86
108
 
87
109
  ```json
88
110
  {
@@ -98,20 +120,9 @@ Config file: `~/.codeium/windsurf/mcp_config.json`
98
120
  }
99
121
  ```
100
122
 
101
- ---
102
-
103
- ### JetBrains (IntelliJ, WebStorm, PyCharm, etc.)
104
-
105
- 1. Go to **Settings → Tools → MCP Server**
106
- 2. Click **Enable MCP Server**
107
- 3. Add external server with command: `npx -y 50c`
108
- 4. Set environment variable: `FIFTYC_API_KEY=<YOUR_API_KEY>`
109
-
110
- ---
111
-
112
123
  ### Zed
113
124
 
114
- Config file: `~/.config/zed/settings.json`
125
+ **Config:** `~/.config/zed/settings.json`
115
126
 
116
127
  ```json
117
128
  {
@@ -131,79 +142,49 @@ Config file: `~/.config/zed/settings.json`
131
142
 
132
143
  ---
133
144
 
134
- ### ChatGPT (Developer Mode)
135
-
136
- 1. Go to **Settings → Connectors → Advanced Settings**
137
- 2. Enable **Developer Mode (beta)**
138
- 3. Click **Create** under Browser connectors
139
- 4. Add MCP server URL: `https://50c.ai/mcp`
140
- 5. Add header: `Authorization: Bearer <YOUR_API_KEY>`
141
-
142
- ---
143
-
144
- ### OpenAI Codex CLI
145
-
146
- Config file: `~/.codex/config.toml`
147
-
148
- ```toml
149
- [mcp.50c]
150
- command = "npx"
151
- args = ["-y", "50c"]
152
-
153
- [mcp.50c.env]
154
- FIFTYC_API_KEY = "<YOUR_API_KEY>"
155
- ```
156
-
157
- Or run: `codex mcp add 50c`
158
-
159
- ---
160
-
161
- > **Warning:** Never commit your API key to version control.
162
-
163
- ---
164
-
165
- ## Tools
145
+ ## Tools & Pricing
166
146
 
167
147
  | Tool | Cost | Description |
168
148
  |------|------|-------------|
169
- | `genius_mode` | $0.50 | Deep problem solver with research |
170
- | `quick_vibe` | $0.50 | Quick idea injection |
171
- | `check_balance` | FREE | Check remaining credits |
149
+ | `genius` | $0.50 | Deep problem solving with research |
150
+ | `hints` | $0.05 | 5 brutal 2-word hints |
151
+ | `hints+` | $0.10 | 10 expanded hints (4 words each) |
152
+ | `vibe` | $0.05 | 3 unconventional ideas |
172
153
 
173
154
  ---
174
155
 
175
- ## Pricing
176
-
177
- - **Starter:** $5 = 10 problems
178
- - **Developer:** $25 = 50 problems
179
- - **Pro:** $100 = 200 problems
156
+ ## HTTP API
180
157
 
181
- No subscriptions. Credits never expire.
182
-
183
- ---
184
-
185
- ## CLI Usage
158
+ Direct access at `https://genxis.one`:
186
159
 
187
160
  ```bash
188
- # Check version
189
- 50c --version
161
+ curl -X POST https://genxis.one \
162
+ -H "Content-Type: application/json" \
163
+ -d '{"m": "genius", "q": "your problem"}'
164
+
165
+ # Recipe chains
166
+ curl -X POST https://genxis.one \
167
+ -d '{"chain": ["vibe", "hints+"], "q": "your idea"}'
190
168
 
191
- # Show help
192
- 50c --help
169
+ # OpenAI-compatible
170
+ curl -X POST https://genxis.one/v1/chat/completions \
171
+ -d '{"model": "50c-genius", "messages": [{"role": "user", "content": "problem"}]}'
193
172
  ```
194
173
 
195
174
  ---
196
175
 
197
- ## Requirements
176
+ ## Environment Variables
198
177
 
199
- - Node.js 18+
200
- - API key from genxis.com
178
+ | Variable | Description |
179
+ |----------|-------------|
180
+ | `FIFTYC_API_KEY` | Your API key (required) |
181
+ | `FIFTYC_ENDPOINT` | Custom endpoint (optional) |
201
182
 
202
183
  ---
203
184
 
204
- ## Web Apps & Cloudflare Workers
185
+ ## SDK
205
186
 
206
- For programmatic access (not IDE integration), use the SDK:
187
+ For programmatic use in Node.js, browsers, or Cloudflare Workers:
207
188
 
208
189
  ```bash
209
190
  npm install 50c-sdk
@@ -211,28 +192,10 @@ npm install 50c-sdk
211
192
 
212
193
  ```typescript
213
194
  import { FiftyC } from '50c-sdk';
214
-
215
- const ai = new FiftyC('your-api-key');
216
- const answer = await ai.genius('How do I optimize this SQL query?');
195
+ const ai = new FiftyC('your-key');
196
+ const answer = await ai.genius('your problem');
217
197
  ```
218
198
 
219
- Works in Node.js, browsers, Cloudflare Workers, Deno, Bun.
220
-
221
- See [50c-sdk on npm](https://www.npmjs.com/package/50c-sdk) for full API docs.
222
-
223
- ---
224
-
225
- ## Troubleshooting
226
-
227
- **"FIFTYC_API_KEY environment variable required"**
228
- Set your API key in the MCP config env section.
229
-
230
- **Request timeout**
231
- Check your internet connection. Server may be temporarily unavailable.
232
-
233
- **IDE not detecting MCP server**
234
- Restart your IDE after adding the config. Check the config file path is correct.
235
-
236
199
  ---
237
200
 
238
- **Built by genxis.com** | https://genxis.com/50c
201
+ **Built by genxis**
package/bin/50c.js CHANGED
@@ -2,51 +2,160 @@
2
2
  const https = require('https');
3
3
  const readline = require('readline');
4
4
 
5
+ const API_ENDPOINT = process.env.FIFTYC_ENDPOINT || 'https://genxis.one';
6
+ const MCP_ENDPOINT = API_ENDPOINT + '/mcp';
7
+ const API_KEY = process.env.FIFTYC_API_KEY;
8
+
9
+ // Version
5
10
  if (process.argv.includes('--version') || process.argv.includes('-v')) {
6
11
  console.log(require('../package.json').version);
7
12
  process.exit(0);
8
13
  }
9
14
 
15
+ // Help (only show if explicitly requested or if running interactively with no args)
10
16
  if (process.argv.includes('--help') || process.argv.includes('-h')) {
17
+ showHelp();
18
+ process.exit(0);
19
+ }
20
+
21
+ function showHelp() {
11
22
  console.log(`
12
- 50c - Genius Problem Solving MCP Server
13
- Usage: 50c (reads JSON-RPC from stdin)
23
+ 50c - AI Augmentation CLI & MCP Server
24
+
25
+ USAGE:
26
+ 50c <command> <input> Direct CLI mode (for agents)
27
+ 50c MCP mode (JSON-RPC via stdin)
28
+
29
+ COMMANDS:
30
+ genius <problem> Deep problem solving ($0.50)
31
+ hints <topic> 5 brutal 2-word hints ($0.05)
32
+ hints+ <topic> 10 expanded hints ($0.10)
33
+ vibe <working_on> 3 unconventional ideas ($0.05)
14
34
 
15
- Environment:
35
+ EXAMPLES:
36
+ 50c genius "How do I scale PostgreSQL?"
37
+ 50c hints "api design"
38
+ 50c hints+ "microservices"
39
+ 50c vibe "building a CLI tool"
40
+
41
+ ENVIRONMENT:
16
42
  FIFTYC_API_KEY Your API key (required)
17
43
  FIFTYC_ENDPOINT Custom endpoint (optional)
18
44
 
19
- Get your API key at https://genxis.com/50c
45
+ MCP MODE:
46
+ When run without arguments, starts JSON-RPC server on stdin/stdout
47
+ for IDE integration (Claude Desktop, Cursor, VS Code, etc.)
20
48
  `);
21
- process.exit(0);
22
49
  }
23
50
 
24
- const MCP_ENDPOINT = process.env.FIFTYC_ENDPOINT || 'https://50c.ai/mcp';
25
- const API_KEY = process.env.FIFTYC_API_KEY;
26
-
51
+ // Check API key
27
52
  if (!API_KEY) {
28
53
  console.error('Error: FIFTYC_API_KEY environment variable required');
29
- console.error('Get your key at https://genxis.com/50c');
30
54
  process.exit(1);
31
55
  }
32
56
 
33
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false });
34
-
35
- rl.on('line', async (line) => {
36
- try {
37
- const clean = line.trim();
38
- if (!clean) return;
39
- const request = JSON.parse(clean);
40
- const response = await callRemoteMCP(request);
41
- process.stdout.write(JSON.stringify(response) + '\n');
42
- } catch (e) {
43
- process.stdout.write(JSON.stringify({
44
- jsonrpc: '2.0',
45
- id: null,
46
- error: { code: -32603, message: e.message }
47
- }) + '\n');
57
+ // CLI mode - direct commands
58
+ const command = process.argv[2];
59
+ const input = process.argv.slice(3).join(' ');
60
+
61
+ if (command && ['genius', 'hints', 'hints+', 'vibe'].includes(command)) {
62
+ if (!input) {
63
+ console.error(`Error: ${command} requires input`);
64
+ console.error(`Usage: 50c ${command} "your input here"`);
65
+ process.exit(1);
48
66
  }
49
- });
67
+
68
+ runCLI(command, input).then(result => {
69
+ console.log(result);
70
+ process.exit(0);
71
+ }).catch(err => {
72
+ console.error('Error:', err.message);
73
+ process.exit(1);
74
+ });
75
+ } else if (command) {
76
+ // Unknown command - maybe MCP mode with piped input
77
+ // Fall through to MCP mode
78
+ startMCPMode();
79
+ } else {
80
+ // No command - MCP mode
81
+ startMCPMode();
82
+ }
83
+
84
+ async function runCLI(cmd, query) {
85
+ const modelMap = {
86
+ 'genius': 'genius',
87
+ 'hints': 'hints',
88
+ 'hints+': 'hints+',
89
+ 'vibe': 'vibe'
90
+ };
91
+
92
+ const body = { m: modelMap[cmd], q: query };
93
+
94
+ return new Promise((resolve, reject) => {
95
+ const url = new URL(API_ENDPOINT);
96
+ const postData = JSON.stringify(body);
97
+
98
+ const options = {
99
+ hostname: url.hostname,
100
+ port: url.port || 443,
101
+ path: '/',
102
+ method: 'POST',
103
+ headers: {
104
+ 'Content-Type': 'application/json',
105
+ 'Content-Length': Buffer.byteLength(postData),
106
+ 'Authorization': `Bearer ${API_KEY}`
107
+ }
108
+ };
109
+
110
+ const req = https.request(options, (res) => {
111
+ let data = '';
112
+ res.on('data', chunk => data += chunk);
113
+ res.on('end', () => {
114
+ try {
115
+ const json = JSON.parse(data);
116
+ if (json.error) {
117
+ reject(new Error(json.error));
118
+ } else if (json.out) {
119
+ resolve(json.out);
120
+ } else {
121
+ resolve(JSON.stringify(json, null, 2));
122
+ }
123
+ } catch (e) {
124
+ reject(new Error(`Invalid response: ${data.substring(0, 200)}`));
125
+ }
126
+ });
127
+ });
128
+
129
+ req.setTimeout(60000, () => {
130
+ req.destroy();
131
+ reject(new Error('Request timeout'));
132
+ });
133
+
134
+ req.on('error', reject);
135
+ req.write(postData);
136
+ req.end();
137
+ });
138
+ }
139
+
140
+ function startMCPMode() {
141
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false });
142
+
143
+ rl.on('line', async (line) => {
144
+ try {
145
+ const clean = line.trim();
146
+ if (!clean) return;
147
+ const request = JSON.parse(clean);
148
+ const response = await callRemoteMCP(request);
149
+ process.stdout.write(JSON.stringify(response) + '\n');
150
+ } catch (e) {
151
+ process.stdout.write(JSON.stringify({
152
+ jsonrpc: '2.0',
153
+ id: null,
154
+ error: { code: -32603, message: e.message }
155
+ }) + '\n');
156
+ }
157
+ });
158
+ }
50
159
 
51
160
  function callRemoteMCP(request) {
52
161
  return new Promise((resolve, reject) => {
@@ -77,7 +186,7 @@ function callRemoteMCP(request) {
77
186
  });
78
187
  });
79
188
 
80
- req.setTimeout(30000, () => {
189
+ req.setTimeout(60000, () => {
81
190
  req.destroy();
82
191
  reject(new Error('Request timeout'));
83
192
  });
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "50c",
3
- "version": "1.1.0",
4
- "description": "AI hints + genius mode. hints=$0.05 (5x2 words), hints_plus=$0.10 (10x4 words), genius_mode=$0.50. Product of genxis.com.",
3
+ "version": "1.2.0",
4
+ "description": "AI augmentation CLI & MCP server. genius=$0.50, hints=$0.05, hints+=$0.10, vibe=$0.05.",
5
5
  "bin": {
6
6
  "50c": "./bin/50c.js"
7
7
  },
8
8
  "scripts": {
9
- "postinstall": "node -e \"console.log('\\n50c installed. Set FIFTYC_API_KEY env var. Get key at https://genxis.com/50c\\n')\""
9
+ "postinstall": "node -e \"console.log('\\n50c installed. Set FIFTYC_API_KEY env var.\\n')\""
10
10
  },
11
- "keywords": ["mcp", "ai", "llm", "augmentation", "genxis", "50c", "agent", "intelligence", "problem-solving"],
12
- "author": "genxis.com",
11
+ "keywords": ["mcp", "ai", "llm", "cli", "agent", "genxis", "50c", "intelligence", "problem-solving", "hints", "genius"],
12
+ "author": "genxis",
13
13
  "license": "SEE LICENSE IN LICENSE",
14
- "homepage": "https://genxis.com/50c",
14
+ "homepage": "https://genxis.one",
15
15
  "engines": {
16
16
  "node": ">=18.0.0"
17
17
  },