termexo 0.3.2
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 +37 -0
- package/bin/termexo.js +56 -0
- package/lib/launcher.js +57 -0
- package/package.json +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Termexo npm launcher
|
|
2
|
+
|
|
3
|
+
This package is the official Windows launcher for
|
|
4
|
+
[Termexo](https://www.termexo.com/), a local-first workspace for AI coding
|
|
5
|
+
agents, models, and terminals.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Termexo currently supports Windows.
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
npm install --global termexo
|
|
13
|
+
termexo
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The npm package contains the launcher, not the desktop application. Install the
|
|
17
|
+
latest Termexo desktop release first:
|
|
18
|
+
|
|
19
|
+
```powershell
|
|
20
|
+
termexo download
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
termexo Start Termexo
|
|
27
|
+
termexo start Start Termexo
|
|
28
|
+
termexo download Open the latest release page
|
|
29
|
+
termexo --version Show the launcher version
|
|
30
|
+
termexo --help Show command help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If Termexo is installed in a custom directory, set `TERMEXO_PATH` to the full
|
|
34
|
+
path of `termexo.exe`.
|
|
35
|
+
|
|
36
|
+
Project source and desktop releases are available at
|
|
37
|
+
[github.com/gemron/Termexo](https://github.com/gemron/Termexo).
|
package/bin/termexo.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import {
|
|
6
|
+
RELEASES_URL,
|
|
7
|
+
findExecutable,
|
|
8
|
+
launchExecutable,
|
|
9
|
+
openDownloadPage,
|
|
10
|
+
} from '../lib/launcher.js';
|
|
11
|
+
|
|
12
|
+
const packageJsonPath = fileURLToPath(new URL('../package.json', import.meta.url));
|
|
13
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
14
|
+
const command = process.argv[2]?.toLowerCase() ?? 'start';
|
|
15
|
+
|
|
16
|
+
function printHelp() {
|
|
17
|
+
console.log(`Termexo ${packageJson.version}
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
termexo Start the installed Termexo desktop app
|
|
21
|
+
termexo start Start the installed Termexo desktop app
|
|
22
|
+
termexo download Open the latest Termexo release page
|
|
23
|
+
termexo --version Print the launcher version
|
|
24
|
+
termexo --help Show this help
|
|
25
|
+
|
|
26
|
+
Set TERMEXO_PATH to the full path of termexo.exe when using a custom
|
|
27
|
+
installation directory.`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (command === '--help' || command === '-h' || command === 'help') {
|
|
31
|
+
printHelp();
|
|
32
|
+
} else if (command === '--version' || command === '-v' || command === 'version') {
|
|
33
|
+
console.log(packageJson.version);
|
|
34
|
+
} else if (command === 'download') {
|
|
35
|
+
openDownloadPage();
|
|
36
|
+
console.log(`Opened ${RELEASES_URL}`);
|
|
37
|
+
} else if (command === 'start') {
|
|
38
|
+
const executable = findExecutable();
|
|
39
|
+
if (!executable) {
|
|
40
|
+
console.error(`Termexo is not installed in a standard location.
|
|
41
|
+
|
|
42
|
+
Download the Windows installer:
|
|
43
|
+
termexo download
|
|
44
|
+
${RELEASES_URL}
|
|
45
|
+
|
|
46
|
+
For a custom installation, set TERMEXO_PATH to the full path of termexo.exe.`);
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
} else {
|
|
49
|
+
launchExecutable(executable);
|
|
50
|
+
console.log(`Started Termexo from ${executable}`);
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
console.error(`Unknown command: ${process.argv[2]}`);
|
|
54
|
+
printHelp();
|
|
55
|
+
process.exitCode = 1;
|
|
56
|
+
}
|
package/lib/launcher.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { win32 } from 'node:path';
|
|
4
|
+
|
|
5
|
+
export const RELEASES_URL = 'https://github.com/gemron/Termexo/releases/latest';
|
|
6
|
+
|
|
7
|
+
export function executableCandidates(environment = process.env) {
|
|
8
|
+
const candidates = [];
|
|
9
|
+
const add = (value) => {
|
|
10
|
+
if (value && !candidates.includes(value)) {
|
|
11
|
+
candidates.push(value);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
add(environment.TERMEXO_PATH);
|
|
16
|
+
|
|
17
|
+
if (environment.LOCALAPPDATA) {
|
|
18
|
+
add(win32.join(environment.LOCALAPPDATA, 'Termexo', 'termexo.exe'));
|
|
19
|
+
add(win32.join(environment.LOCALAPPDATA, 'Programs', 'Termexo', 'termexo.exe'));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (environment.ProgramFiles) {
|
|
23
|
+
add(win32.join(environment.ProgramFiles, 'Termexo', 'termexo.exe'));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (environment['ProgramFiles(x86)']) {
|
|
27
|
+
add(win32.join(environment['ProgramFiles(x86)'], 'Termexo', 'termexo.exe'));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return candidates;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function findExecutable(environment = process.env, fileExists = existsSync) {
|
|
34
|
+
return executableCandidates(environment).find((candidate) => fileExists(candidate));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function launchExecutable(executable, spawnProcess = spawn) {
|
|
38
|
+
const child = spawnProcess(executable, [], {
|
|
39
|
+
detached: true,
|
|
40
|
+
stdio: 'ignore',
|
|
41
|
+
windowsHide: false,
|
|
42
|
+
});
|
|
43
|
+
child.unref();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function openDownloadPage(spawnProcess = spawn) {
|
|
47
|
+
const child = spawnProcess(
|
|
48
|
+
'rundll32.exe',
|
|
49
|
+
['url.dll,FileProtocolHandler', RELEASES_URL],
|
|
50
|
+
{
|
|
51
|
+
detached: true,
|
|
52
|
+
stdio: 'ignore',
|
|
53
|
+
windowsHide: true,
|
|
54
|
+
},
|
|
55
|
+
);
|
|
56
|
+
child.unref();
|
|
57
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "termexo",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Official Windows launcher for the Termexo AI development workspace",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"termexo": "bin/termexo.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"lib/",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"os": [
|
|
15
|
+
"win32"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18.18.0"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"test": "node --test",
|
|
22
|
+
"prepublishOnly": "npm test"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"termexo",
|
|
26
|
+
"terminal",
|
|
27
|
+
"ai",
|
|
28
|
+
"agent",
|
|
29
|
+
"claude",
|
|
30
|
+
"codex",
|
|
31
|
+
"desktop"
|
|
32
|
+
],
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/gemron/Termexo.git",
|
|
36
|
+
"directory": "packages/termexo"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://www.termexo.com/",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/gemron/Termexo/issues"
|
|
41
|
+
},
|
|
42
|
+
"license": "UNLICENSED",
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"registry": "https://registry.npmjs.org/"
|
|
46
|
+
}
|
|
47
|
+
}
|