nolimit-cli 1.0.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 +50 -0
- package/bin/run.js +29 -0
- package/package.json +28 -0
- package/scripts/install.js +96 -0
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# NoLimit CLI
|
|
2
|
+
|
|
3
|
+
**Free AI coding assistant. No API keys. No subscription.**
|
|
4
|
+
|
|
5
|
+
Watch a 30-second ad, get 8,000 tokens. That's it.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g nolimit-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd your-project
|
|
17
|
+
nolimit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- **Full Coding Agent** - Read files, write code, run commands
|
|
23
|
+
- **Free Forever** - Ads, not subscriptions
|
|
24
|
+
- **Zero Config** - No API keys needed
|
|
25
|
+
- **Powered by Gemini 2.0 Flash** - Fast, capable AI
|
|
26
|
+
|
|
27
|
+
## How It Works
|
|
28
|
+
|
|
29
|
+
1. Run `nolimit` in any project directory
|
|
30
|
+
2. Chat with AI to write, debug, and understand code
|
|
31
|
+
3. When tokens run low, run `/earn` to watch a 30-second ad
|
|
32
|
+
4. Get 8,000 tokens instantly
|
|
33
|
+
5. Continue coding
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
| Command | Action |
|
|
38
|
+
|---------|--------|
|
|
39
|
+
| `/earn` | Watch ad to get tokens |
|
|
40
|
+
| `/balance` | Check token balance |
|
|
41
|
+
| `/help` | Show help |
|
|
42
|
+
|
|
43
|
+
## Links
|
|
44
|
+
|
|
45
|
+
- Website: https://nolimit.dev
|
|
46
|
+
- Issues: https://github.com/yogeba/nolimit/issues
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
**No subscription. No API keys. Just code.**
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
const platform = process.platform;
|
|
8
|
+
const ext = platform === 'win32' ? '.exe' : '';
|
|
9
|
+
const binaryPath = path.join(__dirname, `nolimit${ext}`);
|
|
10
|
+
|
|
11
|
+
if (!fs.existsSync(binaryPath)) {
|
|
12
|
+
console.error('NoLimit binary not found. Running installer...');
|
|
13
|
+
require('../scripts/install.js');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
18
|
+
stdio: 'inherit',
|
|
19
|
+
env: process.env
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
child.on('error', (err) => {
|
|
23
|
+
console.error('Failed to start NoLimit:', err.message);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
child.on('exit', (code) => {
|
|
28
|
+
process.exit(code || 0);
|
|
29
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nolimit-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Free AI coding assistant - No API keys, no subscription",
|
|
5
|
+
"keywords": ["ai", "coding", "assistant", "cli", "gemini", "free"],
|
|
6
|
+
"author": "NoLimit",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://nolimit.dev",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/buzzernetwork/nolimit.git"
|
|
12
|
+
},
|
|
13
|
+
"bin": {
|
|
14
|
+
"nolimit": "./bin/run.js"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"postinstall": "node scripts/install.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin",
|
|
21
|
+
"scripts"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=16"
|
|
25
|
+
},
|
|
26
|
+
"os": ["darwin", "linux", "win32"],
|
|
27
|
+
"cpu": ["x64", "arm64"]
|
|
28
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const http = require('http');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const zlib = require('zlib');
|
|
8
|
+
const { execSync } = require('child_process');
|
|
9
|
+
|
|
10
|
+
// Binary download URL
|
|
11
|
+
const DOWNLOAD_BASE = process.env.NOLIMIT_DOWNLOAD_URL || 'https://github.com/buzzernetwork/usenolimit/releases/download/v1.0.0';
|
|
12
|
+
|
|
13
|
+
function getPlatform() {
|
|
14
|
+
const platform = process.platform;
|
|
15
|
+
if (platform === 'darwin') return 'darwin';
|
|
16
|
+
if (platform === 'linux') return 'linux';
|
|
17
|
+
if (platform === 'win32') return 'windows';
|
|
18
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getArch() {
|
|
22
|
+
const arch = process.arch;
|
|
23
|
+
if (arch === 'x64') return 'amd64';
|
|
24
|
+
if (arch === 'arm64') return 'arm64';
|
|
25
|
+
throw new Error(`Unsupported architecture: ${arch}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function download(url) {
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
const client = url.startsWith('https') ? https : http;
|
|
31
|
+
|
|
32
|
+
client.get(url, (response) => {
|
|
33
|
+
// Handle redirects
|
|
34
|
+
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
35
|
+
return download(response.headers.location).then(resolve).catch(reject);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (response.statusCode !== 200) {
|
|
39
|
+
reject(new Error(`Download failed: ${response.statusCode}`));
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const chunks = [];
|
|
44
|
+
response.on('data', (chunk) => chunks.push(chunk));
|
|
45
|
+
response.on('end', () => resolve(Buffer.concat(chunks)));
|
|
46
|
+
response.on('error', reject);
|
|
47
|
+
}).on('error', reject);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async function install() {
|
|
52
|
+
const platform = getPlatform();
|
|
53
|
+
const arch = getArch();
|
|
54
|
+
|
|
55
|
+
console.log(`\n NoLimit CLI Installer`);
|
|
56
|
+
console.log(` Platform: ${platform}-${arch}\n`);
|
|
57
|
+
|
|
58
|
+
const filename = `nolimit-${platform}-${arch}.gz`;
|
|
59
|
+
const url = `${DOWNLOAD_BASE}/${filename}`;
|
|
60
|
+
|
|
61
|
+
console.log(` Downloading from ${url}...`);
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
const gzData = await download(url);
|
|
65
|
+
console.log(` Downloaded ${(gzData.length / 1024 / 1024).toFixed(1)}MB`);
|
|
66
|
+
|
|
67
|
+
// Decompress
|
|
68
|
+
console.log(` Extracting...`);
|
|
69
|
+
const binary = zlib.gunzipSync(gzData);
|
|
70
|
+
|
|
71
|
+
// Write to bin directory
|
|
72
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
73
|
+
if (!fs.existsSync(binDir)) {
|
|
74
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const ext = platform === 'windows' ? '.exe' : '';
|
|
78
|
+
const binaryPath = path.join(binDir, `nolimit${ext}`);
|
|
79
|
+
|
|
80
|
+
fs.writeFileSync(binaryPath, binary);
|
|
81
|
+
fs.chmodSync(binaryPath, 0o755);
|
|
82
|
+
|
|
83
|
+
console.log(` Installed to ${binaryPath}`);
|
|
84
|
+
console.log(`\n ✓ NoLimit installed successfully!`);
|
|
85
|
+
console.log(` Run 'nolimit' to start.\n`);
|
|
86
|
+
|
|
87
|
+
} catch (error) {
|
|
88
|
+
console.error(`\n ✗ Installation failed: ${error.message}`);
|
|
89
|
+
console.error(`\n Try building from source instead:`);
|
|
90
|
+
console.error(` git clone https://github.com/buzzernetwork/nolimit.git`);
|
|
91
|
+
console.error(` cd nolimit/nolimit-cli && go build -o nolimit .`);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
install();
|