nolimit-cli 1.2.0 → 1.3.1

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/nolimit ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolimit-cli",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Free AI coding assistant - No API keys, no subscription",
5
5
  "keywords": ["ai", "coding", "assistant", "cli", "gemini", "free"],
6
6
  "author": "NoLimit",
@@ -7,8 +7,9 @@ const path = require('path');
7
7
  const zlib = require('zlib');
8
8
  const { execSync } = require('child_process');
9
9
 
10
- // Binary download URL
11
- const DOWNLOAD_BASE = process.env.NOLIMIT_DOWNLOAD_URL || 'https://api.usenolimit.com/releases';
10
+ // Binary download from GitHub Releases (public repo)
11
+ const GITHUB_REPO = 'buzzernetwork/nolimit-releases';
12
+ const GITHUB_RELEASES_API = `https://api.github.com/repos/${GITHUB_REPO}/releases/latest`;
12
13
 
13
14
  function getPlatform() {
14
15
  const platform = process.platform;
@@ -28,15 +29,17 @@ function getArch() {
28
29
  function download(url) {
29
30
  return new Promise((resolve, reject) => {
30
31
  const client = url.startsWith('https') ? https : http;
32
+ const options = typeof url === 'string' ? new URL(url) : url;
33
+ options.headers = { 'User-Agent': 'nolimit-cli/1.3.0' };
31
34
 
32
- client.get(url, (response) => {
35
+ client.get(options, (response) => {
33
36
  // Handle redirects
34
37
  if (response.statusCode === 301 || response.statusCode === 302) {
35
38
  return download(response.headers.location).then(resolve).catch(reject);
36
39
  }
37
40
 
38
41
  if (response.statusCode !== 200) {
39
- reject(new Error(`Download failed: ${response.statusCode}`));
42
+ reject(new Error(`Download failed: ${response.statusCode} from ${url}`));
40
43
  return;
41
44
  }
42
45
 
@@ -56,9 +59,16 @@ async function install() {
56
59
  console.log(` Platform: ${platform}-${arch}\n`);
57
60
 
58
61
  const filename = `nolimit-${platform}-${arch}.gz`;
59
- const url = `${DOWNLOAD_BASE}/${filename}`;
60
62
 
61
- console.log(` Downloading from ${url}...`);
63
+ // Get latest release URL from GitHub
64
+ const releaseData = await download(GITHUB_RELEASES_API);
65
+ const release = JSON.parse(releaseData.toString());
66
+ const asset = release.assets && release.assets.find(a => a.name === filename);
67
+ const url = asset
68
+ ? asset.browser_download_url
69
+ : `https://github.com/${GITHUB_REPO}/releases/latest/download/${filename}`;
70
+
71
+ console.log(` Downloading v${(release.tag_name || '').replace('v', '')}...`);
62
72
 
63
73
  try {
64
74
  const gzData = await download(url);