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

@jakkrichm/redmine-toolkit

v0.1.0

Published

Standalone Redmine CLI toolkit & Setup Wizard for developers and AI agents.

Readme

Standalone Redmine Toolkit (TypeScript / Node.js CLI)

Redmine Toolkit เป็น CLI สำหรับให้ทีมและ AI/Agent ใช้งาน Redmine ได้อย่างเป็นระบบ: ค้นหาและอ่าน issue, project, wiki, time entry และ metadata ที่จำเป็น รวมถึงช่วยสร้าง comment, แนบไฟล์, ปิดงาน และลงเวลาโดยมี guard ลดความเสี่ยงก่อนเขียนข้อมูลจริง

เป้าหมายของ project นี้คือทำให้การทำงานกับ Redmine ทำซ้ำได้ ตรวจสอบได้ Zero-Setup ผ่าน npx และปลอดภัยสำหรับ automation โดยคำสั่งอ่านข้อมูลใช้ได้ทันที ส่วนคำสั่งที่แก้ข้อมูลต้องยืนยันด้วย --yes


🚀 Setup & Installation

🌟 วิธีที่ 1: One-Click Setup Wizard (แนะนำ)

เปิด Terminal ในโฟลเดอร์โปรเจกต์ที่ต้องการใช้งาน แล้วสั่งรัน:

npx redmine-toolkit init
# หรือหาก build ในเครื่อง:
node dist/bin/rtk.js init

ระบบจะมี Interactive Wizard ถาม Redmine Server URL และ API Key พร้อมสร้างไฟล์ .env และทดสอบเชื่อมต่อ rtk me ให้โดยอัตโนมัติ


📦 วิธีที่ 2: ติดตั้งเป็น Global CLI Tool บนเครื่อง

npm run build
npm link

หลังจากนี้สามารถสั่งใช้คำสั่ง rtk ได้จากทุก directory:

rtk me
rtk backlog
rtk issue 12096

⚙️ Environment Configuration (.env)

REDMINE_URL=https://mobileapp.nstda.or.th/redmine/
REDMINE_API_KEY=your_api_key_here
REDMINE_OUTPUT_DIR=redmine_exports
REDMINE_CLOSED_STATUS_ID=
REDMINE_DEFAULT_ACTIVITY_ID=

🔒 หลักความปลอดภัย

  1. คำสั่งที่แก้ข้อมูล Redmine ต้องใส่ --yes ทุกครั้ง เช่น create, comment, close, upload, sync-desc และ time-add
  2. คำสั่งที่แก้ issue จะเช็กก่อนว่า user ปัจจุบันเป็น author หรือ assignee ของ issue นั้น ยกเว้นสั่ง --allow-non-assigned เพื่อให้ Redmine permission ตัดสินแทน
  3. ห้ามใส่ icon หรือ emoji ในข้อความที่เขียนลง Redmine (ระบบมีตัวตรวจจับและปฏิเสธคำสั่งอัตโนมัติ)
  4. Spent time comment ต้องไม่เกิน 200 ตัวอักษร

📋 คำสั่งที่ใช้งานบ่อย (Commands Reference)

1. ข้อมูลผู้ใช้ & Master Data

# ตรวจสอบ API Key และข้อมูลผู้ใช้ปัจจุบัน
rtk me

# ดึงและแคช Master Data ลงไฟล์ JSON
rtk master-data --cache

# ดูรายการ Trackers, Statuses, Priorities, Activities, Projects
rtk trackers
rtk statuses
rtk priorities
rtk activities
rtk projects [query]

2. ค้นหาและอ่าน Issue

# ดูงานค้างของตัวเอง (Backlog)
rtk backlog

# เลือกงานถัดไปที่มีความสำคัญสูงสุด
rtk next

# ค้นหา Issue ด้วย Thai NLP Keywords
rtk search "bug ระบบ login"
rtk search --ask "ช่วยค้นหางานเกี่ยวกับ odoo"

# อ่านรายละเอียด Issue พร้อม Journals และ Attachments
rtk issue 12096
rtk issue 12096 --json

# Export Issue เป็น JSON และดาวน์โหลด Attachments ทั้งหมด
rtk get 12096

3. สร้างและแก้ไข Issue (ต้องใส่ --yes)

# สร้าง Issue ใหม่
rtk create --project <PROJECT_ID> --subject "หัวข้องาน" --description "รายละเอียดงาน" --yes

# เพิ่ม Comment / Journal Note
rtk comment 12096 "บันทึกความคืบหน้างาน" --yes

# ปิดงาน (Close) พร้อมลงเวลา Spent Time
rtk close 12096 --note "ดำเนินการเสร็จสิ้น" --hours 2 --comment "แก้ไขและทดสอบระบบ" --yes

# แนบไฟล์ขึ้น Issue
rtk upload 12096 "path/to/document.pdf" --description "เอกสารแนบ" --yes

# Sync คำอธิบายจากไฟล์ Markdown/Textile
rtk sync-desc 12096 "path/to/spec.md" --yes

4. บันทึกและตรวจสอบเวลาทำงาน (Time Tracking)

# ดูรายการลงเวลาของตัวเอง
rtk time-entries --from 2026-09-01 --to 2026-09-15

# บันทึกเวลาทำงาน
rtk time-add 12096 1.5 --activity 9 --comment "แก้ไขบั๊กในส่วน validate token" --yes

🧪 Testing & Development

# Run Unit Tests (Vitest)
npm test

# Run Typecheck & Tests
npm run check

# Build Distribution
npm run build