@nemoobc/opencode-termux 1.18.24 โ†’ 1.18.26

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.
Files changed (2) hide show
  1. package/README.md +55 -19
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -1,39 +1,75 @@
1
- # @nemoobc/opencode-termux
1
+ # ๐Ÿ“ฑ opencode-termux
2
2
 
3
- **opencode CLI native di Termux/Android โ€” TANPA proot.**
3
+ **[opencode](https://opencode.ai) CLI native di Termux/Android โ€” TANPA proot, TANPA root.**
4
4
 
5
- Paket ini menjembatani masalah: `opencode-ai` resmi tidak punya target `android`,
6
- sehingga postinstall gagal di Termux. Solusinya: paket ini mengunduh binary
7
- resmi `opencode-linux-arm64-musl` + **loader musl & libstdc++/libgcc dari Alpine**,
8
- lalu menjalankannya lewat loader tersebut โ€” murni userspace.
5
+ [![npm](https://img.shields.io/npm/v/@nemoobc/opencode-termux?color=cb3837&logo=npm)](https://www.npmjs.com/package/@nemoobc/opencode-termux)
6
+ [![platform](https://img.shields.io/badge/platform-Android%20%7C%20Termux-3DDC84)](#)
7
+ [![arch](https://img.shields.io/badge/arch-arm64-blue)](#)
9
8
 
10
- ## Install
9
+ ---
10
+
11
+ ## Kenapa paket ini ada?
12
+
13
+ Installer resmi `opencode-ai` gagal di Termux karena tidak mengenali
14
+ `process.platform === "android"` dan tidak menyediakan build untuk Bionic libc.
15
+
16
+ Paket ini menjembatani tanpa trik aneh:
17
+
18
+ ```
19
+ opencode-termux (shim Node)
20
+ โ””โ”€ vendor/ld-musl.so โ† musl libc hasil build khusus Termux*
21
+ โ””โ”€ vendor/opencode โ† binary resmi opencode-linux-arm64-musl
22
+ โคณ LD_LIBRARY_PATH โ†’ libstdc++ / libgcc_s (dari Alpine)
23
+ ```
24
+
25
+ \* path `/etc/resolv.conf` & `/etc/hosts` dipatch saat kompilasi menuju
26
+ `$PREFIX/etc/` sehingga DNS jalan tanpa root.
27
+
28
+ ## ๐Ÿš€ Install
11
29
 
12
30
  ```bash
13
31
  pkg update && pkg install nodejs-lts
14
32
  npm i -g @nemoobc/opencode-termux
15
- opencode-termux --version
16
33
  ```
17
34
 
35
+ > Jika muncul warning `install-scripts`, izinkan sekali:
36
+ > ```bash
37
+ > npm config set allow-scripts=@nemoobc/opencode-termux --location=user
38
+ > npm rebuild -g @nemoobc/opencode-termux
39
+ > ```
40
+ > (atau abaikan โ€” shim akan memasang bundle otomatis saat pertama dijalankan)
41
+
18
42
  Alias biar terasa asli:
19
43
 
20
44
  ```bash
21
45
  ln -sf $PREFIX/bin/opencode-termux $PREFIX/bin/opencode
22
46
  ```
23
47
 
24
- Default model gratis: `opencode/x-preview-f-free` (Ox Alpha Free).
25
-
26
- ## Cara kerja
48
+ ## โœ… Verifikasi
27
49
 
50
+ ```bash
51
+ opencode-termux --version # versi upstream opencode
52
+ opencode-termux models # katalog model (tes jaringan/DNS)
28
53
  ```
29
- opencode-termux โ†’ ld-musl-aarch64.so.1 (dibundel) โ†’ opencode (musl, dibundel)
30
- โ†‘ LD_LIBRARY_PATH: libstdc++/libgcc (dibundel)
31
- ```
32
54
 
33
- Tidak ada file sistem Android yang disentuh. Semua ada di `$PREFIX/lib/node_modules/@nemoobc/opencode-termux/vendor`.
55
+ Model gratis default: **`opencode/x-preview-f-free`** (Ox Alpha Free ยท Unlimited).
56
+
57
+ ## ๐Ÿ”ง Troubleshooting
58
+
59
+ | Masalah | Solusi |
60
+ |---|---|
61
+ | `Permission denied` saat menjalankan | `chmod +x $PREFIX/lib/node_modules/@nemoobc/opencode-termux/bin/opencode.js` |
62
+ | Warning `install-scripts` | lihat bagian Install |
63
+ | Perintah jaringan gantung | pastikan `$PREFIX/etc/resolv.conf` ada โ€” installer/shim membuatnya otomatis |
64
+ | Versi upstream lama | `npm i -g @nemoobc/opencode-termux@latest` โ€” installer selalu tarik rilis terbaru |
65
+
66
+ ## โš™๏ธ Variabel lingkungan
67
+
68
+ | Var | Fungsi |
69
+ |---|---|
70
+ | `OCX_UPSTREAM` | paksa versi upstream tertentu (default: terbaru) |
71
+ | `OCX_ARCH` / `OCX_FORCE` | uji bundle di non-Android (`x64`) |
34
72
 
35
- ## Batasan
73
+ ## ๐Ÿ“œ Lisensi
36
74
 
37
- - Arsitektur: **arm64** (hampir semua HP sekarang). x86_64 bisa dipaksa utk uji: `OCX_ARCH=x64 OCX_FORCE=1 npm rebuild ...`
38
- - Butuh koneksi internet saat `npm install` (mengunduh ~200 MB binary)
39
- - Jika upstream opencode rilis versi baru, paket ini perlu bump versi mengikuti
75
+ MIT. Binary opencode adalah milik proyek [opencode](https://github.com/sst/opencode) (MIT).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemoobc/opencode-termux",
3
- "version": "1.18.24",
3
+ "version": "1.18.26",
4
4
  "description": "opencode CLI native untuk Termux/Android tanpa proot โ€” membundel loader musl + binary opencode resmi (upstream opencode-ai)",
5
5
  "bin": {
6
6
  "opencode-termux": "./bin/opencode.js"
@@ -25,5 +25,10 @@
25
25
  "prebuilt",
26
26
  "README.md"
27
27
  ],
28
- "opencodeUpstream": "1.18.21"
28
+ "opencodeUpstream": "1.18.21",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/nemoobc/opencode-termux.git"
32
+ },
33
+ "homepage": "https://github.com/nemoobc/opencode-termux#readme"
29
34
  }