freecode-sh 0.1.0-alpha.12 → 0.1.0-alpha.18
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 +9 -4
- package/check-platform.mjs +20 -0
- package/freecode.mjs +156 -340
- package/install.ps1 +653 -0
- package/install.sh +642 -0
- package/package.json +10 -20
- package/THIRD_PARTY_NOTICES.md +0 -115
- package/engine.manifest.json +0 -8
- package/release-manifest.json +0 -38
- package/standalone.tsx +0 -28
package/README.md
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
Free Code is a free coding agent for your terminal. Ask it to build, fix,
|
|
4
4
|
explain, and test code in your own projects.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
This npm package is a small macOS and Windows bootstrapper. On first launch it
|
|
7
|
+
installs the matching native Free Code release, verifies its publisher signature
|
|
8
|
+
and checksum, and then runs the native executable. Application code and prompts
|
|
9
|
+
are not shipped in the npm package.
|
|
10
|
+
|
|
11
|
+
Both `freecode` and `freecode-sh` launch the same Free Code CLI.
|
|
8
12
|
|
|
9
13
|
## Install
|
|
10
14
|
|
|
11
15
|
```bash
|
|
12
|
-
npm install -g freecode-sh
|
|
16
|
+
npm install -g freecode-sh
|
|
13
17
|
freecode --version
|
|
14
18
|
freecode doctor
|
|
15
19
|
freecode
|
|
@@ -18,6 +22,7 @@ freecode
|
|
|
18
22
|
```bash
|
|
19
23
|
freecode logout
|
|
20
24
|
npm uninstall -g freecode-sh
|
|
25
|
+
rm -rf ~/.local/share/freecode # macOS: optionally remove downloaded native versions
|
|
21
26
|
```
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
Free Code supports Apple Silicon and Intel Macs, plus Windows x64.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const requestedPlatform = process.env.FREECODE_INSTALL_OS
|
|
4
|
+
const platform = requestedPlatform === 'Darwin'
|
|
5
|
+
? 'darwin'
|
|
6
|
+
: requestedPlatform === 'Windows_NT'
|
|
7
|
+
? 'win32'
|
|
8
|
+
: process.platform
|
|
9
|
+
const architecture = process.env.FREECODE_INSTALL_ARCH || process.arch
|
|
10
|
+
const supportedHost = (
|
|
11
|
+
(platform === 'darwin' && ['arm64', 'x64'].includes(architecture))
|
|
12
|
+
|| (platform === 'win32' && architecture === 'x64')
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
if (!supportedHost) {
|
|
16
|
+
process.stderr.write(
|
|
17
|
+
`freecode: Free Code's native npm installer supports macOS arm64/x64 and Windows x64 (detected ${platform}/${architecture}).\n`,
|
|
18
|
+
)
|
|
19
|
+
process.exit(1)
|
|
20
|
+
}
|