termux-dev 1.1.0 → 1.1.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/assets/banner.svg CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  <!-- Tagline & Badge -->
27
27
  <text x="425" y="142" font-family="system-ui, -apple-system, sans-serif" font-size="14" font-weight="600" fill="#8b949e" text-anchor="middle" letter-spacing="3">
28
- THE TERMINAL-NATIVE AI CODING AGENT <tspan fill="#00f2fe" font-weight="bold">v1.1.0</tspan>
28
+ THE TERMINAL-NATIVE AI CODING AGENT <tspan fill="#00f2fe" font-weight="bold">v1.1.1</tspan>
29
29
  </text>
30
30
 
31
31
  <!-- Top Accent Line -->
Binary file
package/dist/cli/index.js CHANGED
@@ -378,7 +378,7 @@ function drawLogo() {
378
378
  pc.cyan(' █▀▀▄ █▀▀▀ █ █ █ █'),
379
379
  pc.cyan(' █ █ █▀▀▀ ▀▄▀ ▀▄▀ '),
380
380
  pc.cyan(' █▄▄▀ █▄▄▄ ▀ ▀ ▀ '),
381
- ' ' + pc.cyan(pc.bold('v1.1.0')),
381
+ ' ' + pc.cyan(pc.bold('v1.1.1')),
382
382
  ''
383
383
  ];
384
384
  for (const line of logo) {
@@ -393,7 +393,7 @@ function drawLogo() {
393
393
  indent + pc.cyan('▀▀▀█▀▀▀ █▀▀▀ █▀▀█ █▄ ▄█ █ █ ▀▄ ▄▀ █▀▀▄ █▀▀▀ █ █'),
394
394
  indent + pc.cyan(' █ █▀▀▀ █▄▄▀ █ █ █ █ █ █ ▀▀ █ █ █▀▀▀ █ █'),
395
395
  indent + pc.cyan(' █ █▄▄▄ █ ▀▄ █ █ ▀▄▄▀ ▄▀ ▀▄ █▄▄▀ █▄▄▄ ▀▄▀ '),
396
- indent + pc.cyan(pc.bold('v1.1.0')),
396
+ indent + pc.cyan(pc.bold('v1.1.1')),
397
397
  ''
398
398
  ];
399
399
  for (const line of logo) {
@@ -588,7 +588,7 @@ export async function main() {
588
588
  const maxIter = config.maxIterations || 100;
589
589
  const maxIterLabel = maxIter >= 9999 ? 'Unlimited' : `${maxIter} steps`;
590
590
  const choice = await select({
591
- message: `${pc.bold('⚙️ Settings')} ${pc.dim('(devx v1.1.0 • by ApvCode)')}`,
591
+ message: `${pc.bold('⚙️ Settings')} ${pc.dim('(devx v1.1.1 • by ApvCode)')}`,
592
592
  choices: [
593
593
  {
594
594
  name: `${config.pureBlackTheme !== false ? pc.green('🎨 Pure Black Background: ON') : pc.yellow('🎨 Pure Black Background: OFF')}`,
@@ -624,7 +624,7 @@ export async function main() {
624
624
  description: 'Limit how many tool steps (file edits, terminal commands) agent can do per request'
625
625
  },
626
626
  {
627
- name: `${pc.cyan('✨ About devx')} ${pc.dim('(v1.1.0 by ApvCode)')}`,
627
+ name: `${pc.cyan('✨ About devx')} ${pc.dim('(v1.1.1 by ApvCode)')}`,
628
628
  value: 'about',
629
629
  description: 'Terminal-Native AI Coding Agent created by ApvCode (https://github.com/apvcode/Termux-Dev)'
630
630
  },
@@ -636,7 +636,7 @@ export async function main() {
636
636
  ]
637
637
  });
638
638
  if (choice === 'about') {
639
- p.note(`⚡ devx v1.1.0 — Terminal-Native AI Coding Agent\n` +
639
+ p.note(`⚡ devx v1.1.1 — Terminal-Native AI Coding Agent\n` +
640
640
  `👤 Author: ApvCode (https://github.com/apvcode)\n` +
641
641
  `🌟 Repository: https://github.com/apvcode/Termux-Dev\n` +
642
642
  `📜 License: MIT License (2026)\n` +
@@ -102,75 +102,92 @@ export async function checkForUpdates(timeoutMs = 10000) {
102
102
  };
103
103
  }
104
104
  }
105
+ async function isGitRepository(dir) {
106
+ try {
107
+ await fs.stat(path.join(dir, '.git'));
108
+ return true;
109
+ }
110
+ catch {
111
+ return false;
112
+ }
113
+ }
105
114
  export async function performSelfUpdate(latestVersion) {
106
115
  const __filename = fileURLToPath(import.meta.url);
107
116
  const projectRoot = path.resolve(path.dirname(__filename), '../../');
117
+ const isGit = await isGitRepository(projectRoot);
108
118
  console.log('\n' + pc.bold(pc.cyan('─── 🚀 Starting devx Update ──────────────────────────')));
109
- const steps = [
110
- {
111
- title: '📦 Pulling latest updates from GitHub repository...',
112
- action: () => {
113
- try {
114
- execSync('git pull origin main --quiet', { cwd: projectRoot, stdio: 'pipe' });
115
- }
116
- catch {
117
- // If not git clone or detached, try global git install or fetch
118
- try {
119
- execSync('git pull --quiet', { cwd: projectRoot, stdio: 'pipe' });
120
- }
121
- catch {
122
- execSync(`npm install -g git+${GITHUB_REPO_URL}.git --quiet`, { stdio: 'pipe' });
123
- }
124
- }
125
- }
126
- },
127
- {
128
- title: '🔨 Building and compiling TypeScript sources...',
129
- action: () => {
130
- execSync('npm install --quiet', { cwd: projectRoot, stdio: 'pipe' });
131
- execSync('npm run build --quiet', { cwd: projectRoot, stdio: 'pipe' });
132
- }
133
- },
134
- {
135
- title: '🔑 Ensuring binary execution permissions & linking...',
136
- action: () => {
137
- try {
138
- execSync('chmod +x bin/* 2>/dev/null || true', { cwd: projectRoot, stdio: 'pipe' });
139
- }
140
- catch { }
141
- try {
142
- execSync('npm link --quiet', { cwd: projectRoot, stdio: 'pipe' });
143
- }
144
- catch { }
145
- }
146
- }
147
- ];
148
- for (let i = 0; i < steps.length; i++) {
149
- const step = steps[i];
150
- process.stdout.write(` ${pc.cyan('⚡')} [${i + 1}/${steps.length}] ${pc.white(step.title)}\n`);
151
- // Animation spinner for each step
119
+ if (!isGit) {
120
+ // 1. Installed via global npm package: termux-dev
121
+ process.stdout.write(` ${pc.cyan('⚡')} [1/1] ${pc.white(`Updating termux-dev via npm (v${latestVersion})...`)}\n`);
152
122
  const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
153
123
  let fIdx = 0;
154
124
  const interval = setInterval(() => {
155
- process.stdout.write(`\r ${pc.cyan(frames[fIdx++ % frames.length])} ${pc.dim(step.title)} `);
125
+ process.stdout.write(`\r ${pc.cyan(frames[fIdx++ % frames.length])} ${pc.dim(`npm install -g termux-dev@latest`)} `);
156
126
  }, 80);
157
127
  try {
158
- await new Promise(resolve => setTimeout(resolve, 300));
159
- step.action();
128
+ execSync('npm install -g termux-dev@latest', { stdio: 'pipe' });
160
129
  clearInterval(interval);
161
- process.stdout.write(`\r ${pc.green('✔')} ${pc.bold(pc.white(step.title))}\n`);
130
+ process.stdout.write(`\r ${pc.green('✔')} ${pc.bold(pc.white(`Successfully updated termux-dev to v${latestVersion} via npm!`))}\n`);
162
131
  }
163
132
  catch (err) {
164
133
  clearInterval(interval);
165
- process.stdout.write(`\r ${pc.red('✖')} ${pc.red(step.title)} - ${err.message}\n`);
166
- console.log(pc.red(`\nUpdate failed during step ${i + 1}: ${err.message}`));
134
+ process.stdout.write(`\r ${pc.red('✖')} ${pc.red(`Update failed: ${err.message}`)}\n`);
135
+ console.log(pc.yellow(`\n💡 To update manually, run: ${pc.bold('npm install -g termux-dev')}`));
167
136
  return false;
168
137
  }
169
138
  }
139
+ else {
140
+ // 2. Installed via git clone (Developer mode)
141
+ const steps = [
142
+ {
143
+ title: '📦 Pulling latest updates from GitHub repository...',
144
+ action: () => {
145
+ execSync('git pull origin main', { cwd: projectRoot, stdio: 'pipe' });
146
+ }
147
+ },
148
+ {
149
+ title: '🔨 Building and compiling TypeScript sources...',
150
+ action: () => {
151
+ execSync('npm install', { cwd: projectRoot, stdio: 'pipe' });
152
+ execSync('npm run build', { cwd: projectRoot, stdio: 'pipe' });
153
+ }
154
+ },
155
+ {
156
+ title: '🔑 Ensuring binary execution permissions & linking...',
157
+ action: () => {
158
+ try {
159
+ execSync('npm link', { cwd: projectRoot, stdio: 'pipe' });
160
+ }
161
+ catch { }
162
+ }
163
+ }
164
+ ];
165
+ for (let i = 0; i < steps.length; i++) {
166
+ const step = steps[i];
167
+ process.stdout.write(` ${pc.cyan('⚡')} [${i + 1}/${steps.length}] ${pc.white(step.title)}\n`);
168
+ const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
169
+ let fIdx = 0;
170
+ const interval = setInterval(() => {
171
+ process.stdout.write(`\r ${pc.cyan(frames[fIdx++ % frames.length])} ${pc.dim(step.title)} `);
172
+ }, 80);
173
+ try {
174
+ await new Promise(resolve => setTimeout(resolve, 200));
175
+ step.action();
176
+ clearInterval(interval);
177
+ process.stdout.write(`\r ${pc.green('✔')} ${pc.bold(pc.white(step.title))}\n`);
178
+ }
179
+ catch (err) {
180
+ clearInterval(interval);
181
+ process.stdout.write(`\r ${pc.red('✖')} ${pc.red(step.title)} - ${err.message}\n`);
182
+ console.log(pc.red(`\nUpdate failed during step ${i + 1}: ${err.message}`));
183
+ console.log(pc.yellow(`\n💡 To update manually, run: ${pc.bold('npm install -g termux-dev')}`));
184
+ return false;
185
+ }
186
+ }
187
+ }
170
188
  console.log(pc.bold(pc.green(`\n✅ Successfully updated to v${latestVersion}! Restarting devx...\n`)));
171
189
  console.log(pc.bold(pc.cyan('──────────────────────────────────────────────────────\n')));
172
190
  await new Promise(r => setTimeout(r, 1000));
173
- // Spawn new devx process and exit current
174
191
  try {
175
192
  const child = spawn(process.argv[0], process.argv.slice(1), {
176
193
  stdio: 'inherit',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "termux-dev",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Ultra-fast, terminal-native AI coding assistant and agent built for Android Termux, Windows, macOS, and Linux.",
5
5
  "main": "dist/cli/index.js",
6
6
  "type": "module",