npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ripppxyz/zcodex

v1.0.0

Published

Terminal AI agent powered by 9router. Works on Linux, macOS, and Termux.

Readme

ZCodex Agent

Agen AI yang jalan langsung di terminal. Ringan, bisa dipasang di Termux, Linux, atau macOS, dan modelnya bebas kamu atur sendiri lewat 9router — jadi bukan cuma kepasang ke satu provider doang.

╭──────────────────────────────────────────────────────╮
│ ZCodex Agent  v1.0.0                                  │
│ agen AI di terminal kamu, ditenagai 9router           │
╰──────────────────────────────────────────────────────╯
  router   http://localhost:20128/v1
  dir      ~/project

  ketik pesan lalu Enter · /help untuk daftar perintah

you ›

Kenapa 9router

ZCodex sendiri tidak menyimpan model apapun. Semua permintaan chat diteruskan ke instance 9router milikmu, yang bertugas mengatur provider mana yang dipakai, fallback saat rate limit, sampai model apa saja yang tersedia. Jadi ZCodex fokus di sisi antarmuka dan pengalaman pakai di terminal, sementara urusan routing model diserahkan sepenuhnya ke 9router.

Kalau belum punya instance 9router, lihat dokumentasinya di repo 9router — bisa di-deploy sendiri (self-host) dan mendukung endpoint API yang kompatibel dengan format OpenAI.

Instalasi

Termux

pkg update && pkg install nodejs git -y
git clone https://github.com/RipppXyz/zcodex-agent.git
cd zcodex-agent
npm install
npm link
zcodex

Atau pakai script installer yang sudah disediakan:

git clone https://github.com/RipppXyz/zcodex-agent.git
cd zcodex-agent
bash install.sh

Linux / macOS

Butuh Node.js 18 ke atas.

git clone https://github.com/RipppXyz/zcodex-agent.git
cd zcodex-agent
npm install
npm link
zcodex

Pemakaian

ZCodex tidak nanya apa-apa saat pertama kali dijalankan. Begitu git clone selesai dan kamu ketik zcodex, dia langsung coba konek ke 9router pakai nilai default:

  • Base URL: http://localhost:20128/v1
  • Model: full_claude
  • API key: kosong

Kalau instance 9router kamu jalan di alamat/port lain atau butuh API key, set lewat environment variable sebelum menjalankan zcodex:

export ZCODEX_BASE_URL="https://router.punyaku.com"
export ZCODEX_API_KEY="sk-xxxxxxxx"
export ZCODEX_MODEL="full_claude"
zcodex

Nilai ini cuma dipakai sekali di percobaan pertama untuk membuat ~/.zcodex/config.json. Setelah file itu ada, ZCodex selalu baca dari situ. Kalau mau ubah lagi belakangan, pakai /config di dalam chat atau edit langsung file config-nya.

Perintah di dalam chat

| Perintah | Fungsi | |---|---| | /help | tampilkan daftar perintah | | /model | buka menu pilih model — navigasi pakai panah ↑↓ (termasuk tombol arrow di extra keys Termux), atau langsung ketik untuk menyaring dari ratusan model | | /model <nama> | langsung ganti ke model tertentu tanpa buka menu | | /models | lihat daftar model dari router sebagai teks biasa | | /clear | kosongkan riwayat percakapan saat ini | | /config | ulangi setup (ganti api key / base url / model) | | /exit atau /quit | keluar |

Flag CLI

zcodex --config     # buka wizard setup manual
zcodex --version    # cek versi
zcodex --help       # bantuan singkat

Struktur proyek

zcodex-agent/
├── bin/
│   └── zcodex.js        # entry point
├── src/
│   ├── api.js           # komunikasi ke 9router (streaming)
│   ├── chat.js          # loop chat utama
│   ├── config.js        # baca/tulis konfigurasi + nilai default
│   ├── select.js        # menu pilih model (panah + cari)
│   ├── setup.js         # wizard setup manual (/config)
│   ├── spinner.js       # animasi "berpikir"
│   └── ui.js            # banner & tampilan terminal
├── install.sh
└── package.json

Update ke versi terbaru

Kalau kamu ubah kode dan sudah git push, di HP/perangkat lain jangan git clone ulang ke folder yang sama — itu bakal gagal dengan pesan destination path already exists dan diam-diam tetap makai kode lama. Pakai git pull di dalam foldernya:

cd zcodex-agent
git pull
npm install

Kalau mau clean install dari nol:

rm -rf zcodex-agent
git clone https://github.com/RipppXyz/zcodex-agent.git
cd zcodex-agent
npm install
npm link

Publish supaya bisa npm install -g zcodex

Nama paket di package.json sudah diset ke zcodex. Supaya orang lain bisa install langsung tanpa clone repo:

npm login
cd zcodex-agent
npm publish

Cek dulu nama zcodex masih tersedia dengan npm view zcodex sebelum publish — kalau ternyata sudah dipakai orang lain, ganti field "name" di package.json (misalnya jadi @ripppxyz/zcodex sebagai scoped package, lalu publish dengan npm publish --access public).

Setelah published, siapapun tinggal:

npm install -g zcodex
zcodex

Ingat, setiap kali update kode: naikkan "version" di package.json dulu (misal 1.0.1), baru npm publish lagi.

Kontribusi

Pull request terbuka buat siapa saja. Beberapa ide yang masih terbuka:

  • Dukungan multi-turn dengan riwayat percakapan yang bisa disimpan ke file
  • Mode "agent" yang bisa eksekusi perintah shell dengan konfirmasi
  • Tema warna yang bisa dikustomisasi

Kalau nemu bug atau ada ide fitur, buka issue saja.

Lisensi

MIT — bebas dipakai, dimodifikasi, dan disebarluaskan.