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

luxion-cli

v1.2.0

Published

AI System Diagnostics & Security CLI — hardware health, process monitoring, and AI risk analysis powered by Google Gemini

Readme

🌟 Luxion (AI System Diagnostics & Security CLI)

"แสงสว่างแห่งการตรวจสอบ — AI อัจฉริยะผู้พิทักษ์และดูแลคอมพิวเตอร์ของคุณ"

Luxion (ลุคซิออน) คือเครื่องมือ Command Line Interface (CLI) ที่ผสานพลังของ Generative AI (Google Gemini) เข้ากับการตรวจสอบระบบปฏิบัติการระดับลึก เพื่อทำหน้าที่ประเมินสุขภาพฮาร์ดแวร์ ตรวจจับการทำงานที่ผิดปกติของโปรเซส และวิเคราะห์ความเสี่ยงด้านความปลอดภัยภายในเครื่องคอมพิวเตอร์ของคุณ พร้อมให้คำแนะนำที่แม่นยำ กระชับ และตรงไปตรงมา


✨ Features (ฟีเจอร์หลัก)

  • 📊 Hardware Diagnostics: ดึงข้อมูลเชิงลึกของ CPU, RAM, อุณหภูมิ และตรวจเช็คค่า S.M.A.R.T. ของ Storage (SSD/HDD) เพื่อประเมินอายุการใช้งาน
  • 🛡️ Security & Process Monitoring: สแกนโปรเซสที่ใช้ทรัพยากรผิดปกติ ตรวจสอบจุดเสี่ยง (Startup Items) และคำนวณ SHA-256 ของไฟล์ต้องสงสัยเพื่อนำไปเทียบกับฐานข้อมูลอย่าง VirusTotal
  • 🧠 AI Insights Engine: วิเคราะห์ข้อมูลดิบของระบบด้วย AI และสรุปผลออกมาเป็นระดับความเสี่ยง (LOW / MEDIUM / HIGH) พร้อมข้อเสนอแนะในการดูแลเครื่องแบบทันที
  • 📡 Real-time Monitoring: เฝ้าดูสถานะเครื่องแบบ live dashboard อัปเดตต่อเนื่อง พร้อมตรวจจับความผิดปกติอัตโนมัติ (CPU/RAM พุ่ง, โปรเซสกินทรัพยากร)
  • 📜 Event Log: ทุกความผิดปกติที่ตรวจพบถูกบันทึกพร้อมเวลา ดูย้อนหลังได้ว่าเครื่องเคยเจออะไรแปลก ๆ บ้าง
  • 🔌 Offline Mode: ไม่มี API Key ก็ยังใช้งานได้ — วิเคราะห์ด้วยกฎในเครื่อง (rule-based) โดยอัตโนมัติ และสลับมาใช้เองเมื่อเรียก AI ไม่สำเร็จ
  • Lightweight & Fast: ทำงานผ่าน Terminal อย่างรวดเร็ว กินทรัพยากรต่ำ และแสดงผลด้วยสีสันที่สแกนสายตาอ่านได้ง่าย

🛠️ Technology Stack

  • Core: Node.js (TypeScript, ESM)
  • AI Provider: Google Gemini API (ค่าเริ่มต้น: gemini-2.5-flash — เปลี่ยนรุ่นได้)
  • CLI Tools:
    • commander — จัดการโครงสร้างคำสั่ง
    • chalk — แต่งสีสันข้อความแจ้งเตือน
    • ora — Loading Spinner อนิเมชัน
  • System Data: systeminformation — ดึงสเปคระดับ OS (รองรับ Windows, macOS, Linux)

🚀 Installation (การติดตั้ง)

ติดตั้งผ่าน npm ได้เลย (ต้องมี Node.js 20 ขึ้นไป) — รองรับ Windows, macOS, Linux:

npm install -g luxion-cli

หรือติดตั้งจาก source สำหรับนักพัฒนา:

git clone <repo> && cd Luxion
npm install && npm run build && npm link

📖 Usage (การใช้งาน)

ตั้งค่า API Key (สำหรับโหมด AI)

รับ API Key ฟรีได้ที่ Google AI Studio แล้วผูกเข้ากับเครื่อง:

luxion config --key <YOUR_API_KEY>   # เก็บที่ ~/.luxionconfig (สิทธิ์ 600)
luxion config --show                 # ดูค่าปัจจุบัน (คีย์ถูกมาส์ก)

หรือใช้ผ่าน environment variable: GEMINI_API_KEY (มีลำดับความสำคัญเหนือไฟล์ config)

คำสั่งหลัก

luxion hardware          # ตรวจสุขภาพฮาร์ดแวร์ (alias: hw)
luxion monitor           # Live dashboard เฝ้าดูเครื่องแบบ real-time (alias: mon)
luxion monitor --notify  # + เด้งแจ้งเตือนบนจอเมื่อพบความผิดปกติ
luxion daemon start      # เฝ้าเครื่อง background ตลอดเวลา แม้ปิด terminal
luxion events            # ดู Event Log แยก 7 หมวดหมู่ (alias: log)
luxion history           # กราฟ sparkline ย้อนหลัง + พยากรณ์ดิสก์เต็ม/แบตเสื่อม
luxion security          # สแกนโปรเซสผิดปกติ + Startup items (alias: sec)
luxion security --deep   # + connections ราย process, ลายเซ็นไบนารี, extensions
luxion hash <f> --check  # เช็คไฟล์กับ VirusTotal 70+ engines (ตั้ง key ก่อน)
luxion fix               # ตรวจ + แก้ปัญหาพื้นฐาน (ถามยืนยันทุกรายการ)
luxion hash <file>       # SHA-256 ของไฟล์ต้องสงสัย พร้อมลิงก์ค้น VirusTotal
luxion analyze           # วิเคราะห์ระบบด้วย AI สรุประดับความเสี่ยง (alias: ai)
luxion analyze --offline # บังคับวิเคราะห์แบบ rule-based ไม่เรียก AI
luxion analyze --model gemini-2.5-pro   # เลือกรุ่น Gemini เอง

🧩 Project Structure

src/
├── index.ts              # CLI entry point
├── commands/             # เลเยอร์แสดงผล (commander + chalk + ora)
│   ├── analyze.ts        # luxion analyze
│   ├── config.ts         # luxion config
│   ├── hardware.ts       # luxion hardware
│   └── security.ts       # luxion security, luxion hash
└── lib/                  # เลเยอร์ logic (ไม่ยุ่งกับการแสดงผล)
    ├── ai.ts             # Gemini API client
    ├── config.ts         # อ่าน/เขียน ~/.luxionconfig
    ├── hardware.ts       # เก็บข้อมูล CPU/RAM/Storage
    ├── rules.ts          # rule-based analysis (offline)
    └── security.ts       # สแกนโปรเซส, startup items, hash

🧑‍💻 Development

npm run dev -- hardware   # รันจาก source ด้วย tsx โดยไม่ต้อง build
npm run build             # คอมไพล์ TypeScript ลง dist/