@heetmehta18/autodev 0.1.6 → 0.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.
@@ -0,0 +1,49 @@
1
+
2
+
3
+ > @heetmehta18/autodev@0.1.6 test /media/heet18/Futuristic/Heet/Github/Autodev/packages/npm-cli
4
+ > node bin/index.js --help
5
+
6
+
7
+ █████╗ ██╗ ██╗████████╗ ██████╗ ██████╗ ███████╗██╗ ██╗
8
+ ██╔══██╗██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██╔════╝██║ ██║
9
+ ███████║██║ ██║ ██║ ██║ ██║██║ ██║█████╗ ██║ ██║
10
+ ██╔══██║██║ ██║ ██║ ██║ ██║██║ ██║██╔══╝ ╚██╗ ██╔╝
11
+ ██║ ██║╚██████╔╝ ██║ ╚██████╔╝██████╔╝███████╗ ╚████╔╝
12
+ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═══╝
13
+
14
+ The App Store for Developers.
15
+ Run with no arguments to open the interactive installer.
16
+
17
+ Usage:
18
+ autodev [flags]
19
+ autodev [command]
20
+
21
+ Available Commands:
22
+ audit Audit repository dependencies for security vulnerabilities
23
+ clean Remove AutoDev cache and temp files
24
+ clone Clone a Git repository, scan it, and install all missing dependencies
25
+ completion Generate the autocompletion script for the specified shell
26
+ doctor Check the health of your development environment
27
+ export Export environment as a reproducible JSON lockfile
28
+ github Scan all public repositories for a GitHub user
29
+ help Help about any command
30
+ install Install a specific package by ID
31
+ mcp Start a Model Context Protocol (MCP) server
32
+ profile Install a pre-defined developer profile (role-based tool set)
33
+ report Generate a detailed environment report (HTML, JSON, Markdown)
34
+ scan Scan a repository for languages, frameworks, and dependencies
35
+ setup Detect and install all missing runtimes and dependencies
36
+ skills Generate a personalized learning roadmap based on detected technologies
37
+ ui Start the local AutoDev interactive web dashboard
38
+ update Check for and apply updates to managed packages
39
+
40
+ Flags:
41
+ --config string config file (default: .autodev.yaml)
42
+ --dry-run preview actions without executing
43
+ -h, --help help for autodev
44
+ --json output results as JSON
45
+ --no-color disable color output
46
+ -v, --verbose verbose output
47
+ --version version for autodev
48
+
49
+ Use "autodev [command] --help" for more information about a command.
package/bin/index.js CHANGED
@@ -35,15 +35,33 @@ const pkgJson = require('../package.json');
35
35
  const fallbackVersion = `v${pkgJson.version}`;
36
36
 
37
37
  function getLatestReleaseTag() {
38
- try {
39
- const out = execSync(
40
- 'curl -fsSL https://api.github.com/repos/HEETMEHTA18/autodev/releases/latest',
41
- { encoding: 'utf8', timeout: 10000 }
42
- );
43
- const match = out.match(/"tag_name"\s*:\s*"([^"]+)"/);
44
- if (match && match[1]) return match[1];
45
- } catch (_) { /* fall through */ }
46
- return fallbackVersion;
38
+ return new Promise((resolve) => {
39
+ const options = {
40
+ hostname: 'api.github.com',
41
+ path: '/repos/HEETMEHTA18/autodev/releases/latest',
42
+ headers: {
43
+ 'User-Agent': 'autodev-npm-cli'
44
+ },
45
+ timeout: 5000
46
+ };
47
+
48
+ https.get(options, (res) => {
49
+ let body = '';
50
+ res.on('data', (chunk) => body += chunk);
51
+ res.on('end', () => {
52
+ try {
53
+ const json = JSON.parse(body);
54
+ if (json.tag_name) {
55
+ resolve(json.tag_name);
56
+ return;
57
+ }
58
+ } catch (_) {}
59
+ resolve(fallbackVersion);
60
+ });
61
+ }).on('error', () => {
62
+ resolve(fallbackVersion);
63
+ });
64
+ });
47
65
  }
48
66
 
49
67
  // Resolve target paths
@@ -101,7 +119,7 @@ function download(url, destPath, maxRedirects = 5) {
101
119
  }
102
120
 
103
121
  async function downloadBinary() {
104
- const version = getLatestReleaseTag();
122
+ let version = await getLatestReleaseTag();
105
123
  console.log(`\n[autodev] Native binary not found. Downloading AutoDev ${version} for ${platform}/${arch}...`);
106
124
 
107
125
  if (!fs.existsSync(binDir)) {
@@ -111,7 +129,7 @@ async function downloadBinary() {
111
129
  // Construct download URL
112
130
  const archiveName = `autodev_${platform}_${arch}`;
113
131
  const archiveFile = `${archiveName}.${ext}`;
114
- const url = `https://github.com/HEETMEHTA18/autodev/releases/download/${version}/${archiveFile}`;
132
+ let url = `https://github.com/HEETMEHTA18/autodev/releases/download/${version}/${archiveFile}`;
115
133
 
116
134
  const tempFile = path.join(os.tmpdir(), `autodev_download_${Date.now()}.${ext}`);
117
135
 
@@ -119,7 +137,29 @@ async function downloadBinary() {
119
137
  try {
120
138
  console.log(`[autodev] Downloading from: ${url}`);
121
139
  await download(url, tempFile);
140
+ } catch (err) {
141
+ const stableFallback = 'v0.2.0';
142
+ if (version !== stableFallback) {
143
+ console.warn(`\n[autodev] Failed to download version ${version}: ${err.message}`);
144
+ console.warn(`[autodev] Falling back to last known stable release: ${stableFallback}...`);
145
+ version = stableFallback;
146
+ url = `https://github.com/HEETMEHTA18/autodev/releases/download/${version}/${archiveFile}`;
147
+ try {
148
+ console.log(`[autodev] Downloading from: ${url}`);
149
+ await download(url, tempFile);
150
+ } catch (retryErr) {
151
+ console.error(`\n[autodev] Error downloading stable release asset: ${retryErr.message}`);
152
+ console.error(`[autodev] Please verify your network connection.`);
153
+ process.exit(1);
154
+ }
155
+ } else {
156
+ console.error(`\n[autodev] Error downloading release asset: ${err.message}`);
157
+ console.error(`[autodev] URL: ${url}`);
158
+ process.exit(1);
159
+ }
160
+ }
122
161
 
162
+ try {
123
163
  // Verify the file was actually downloaded
124
164
  if (!fs.existsSync(tempFile)) {
125
165
  throw new Error('Download completed but file not found on disk.');
@@ -130,9 +170,7 @@ async function downloadBinary() {
130
170
  }
131
171
  console.log(`[autodev] Downloaded ${(stat.size / 1024 / 1024).toFixed(1)} MB`);
132
172
  } catch (err) {
133
- console.error(`\n[autodev] Error downloading release asset: ${err.message}`);
134
- console.error(`[autodev] URL: ${url}`);
135
- console.error(`[autodev] Please verify that the release version ${version} exists and has compiled assets.`);
173
+ console.error(`\n[autodev] Error verifying download: ${err.message}`);
136
174
  process.exit(1);
137
175
  }
138
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heetmehta18/autodev",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "The App Store for Developers. Install languages, frameworks, and databases with a single command.",
5
5
  "main": "bin/index.js",
6
6
  "bin": {