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

ctrz

v1.2.2

Published

C/C++ 대화형 디버깅 CLI (Linux only, no server)

Readme

CtrZ CLI

C/C++ 코드를 AI로 분석하고 디버깅하는 Linux 전용 CLI 도구

🚀 빠른 시작

1. 설치

# Node.js 20+ 설치
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# CLI 설치
npm install -g ctrz

# 의존성 자동 설치 (선택사항)
ctrz check-deps

💡 자동 의존성 설치: CLI가 실행될 때 필요한 시스템 도구(tmux, inotify-tools, gcc, python3, make)를 자동으로 확인하고 설치합니다.

2. API 키 설정

방법 1: 환경 변수로 설정 (임시)

export GEMINI_API_KEY="your_api_key_here"
export GEMINI_BASE_URL="https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent"

방법 2: CLI로 설정 (권장)

# API 키만 설정하면 됩니다 (BASE_URL은 자동으로 설정됨)
ctrz status --set KEY=your_api_key_here

방법 3: .env 파일 직접 생성

# 홈 디렉토리에 .debug-mate.env 파일 생성
echo "GEMINI_API_KEY=your_api_key_here" > ~/.debug-mate.env
echo "GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent" >> ~/.debug-mate.env

API 키 발급 방법: Google AI Studio에서 무료로 발급받을 수 있습니다.

3. 사용하기

# 테스트 코드 생성 (test.c 파일 생성)
ctrz generate

# tmux 분할 화면으로 디버깅 시작
ctrz debug test.c

# 또는 파일명만 입력 (기본 명령어)
ctrz test.c

🎯 사용법

기본 워크플로우

  1. 시작: ctrz debug test.c 또는 ctrz test.c 실행
  2. 왼쪽 패널: vi 편집기가 자동으로 열림 (50% 크기)
  3. 코드 편집: vi에서 코드 수정
  4. 저장: :w 명령어로 저장
  5. 자동 분석: 오른쪽에서 자동으로 AI 분석 실행
  6. 결과 확인: 오른쪽에서 AI 분석 결과 확인
  7. 반복: 다시 편집 → 저장 → 자동 분석 반복

패널 크기 조절

# 기본 50:50 분할
ctrz debug test.c

# 왼쪽 패널 크기 조절 (예: 30%)
ctrz debug test.c --left 30

# 왼쪽 패널 크기 조절 (예: 70%)
ctrz debug test.c --left 70

AI 분석 기능

  • 자동 코드 분석: 파일 저장 시 자동으로 코드 분석 실행
  • 문제점 진단: 코드의 버그, 메모리 누수, 성능 문제 등 자동 진단
  • 개선 제안: 더 효율적인 코드로 개선하는 방법 제안
  • 보안 검사: 보안 취약점 및 안전하지 않은 코드 패턴 검사

📋 주요 명령어

| 명령어 | 설명 | 예시 | |--------|------|------| | debug <file> | tmux 분할 화면으로 vi 편집기 + AI 분석 | ctrz debug test.c | | generate | 테스트 코드 자동 생성 (test.c) | ctrz generate | | check-deps | 의존성 체크 및 자동 설치 | ctrz check-deps | | status | 시스템 상태 및 설정 확인 | ctrz status | | status --set | 환경변수 설정 | ctrz status --set KEY=your_key_here | | info | 프로그램 정보 | ctrz info | | --version | 버전 정보 표시 | ctrz --version | | --help | 도움말 표시 | ctrz --help |

🎯 주요 기능

  • tmux 분할 화면: 왼쪽에서 vi 편집기, 오른쪽에서 AI 분석 결과 (기본 50:50 분할)
  • 자동 파일 감시: 파일 저장 시 자동으로 AI 분석 실행
  • AI 기반 분석: 코드의 문제점, 개선점, 보안 취약점 자동 진단
  • 자동화된 워크플로우: 편집 → 저장 → 자동 분석 반복
  • 테스트 코드 생성: 9가지 타입의 테스트 코드 자동 생성
  • 의존성 자동 설치: 필요한 시스템 도구를 자동으로 확인하고 설치
  • 간단한 CLI: 중복 없는 깔끔한 명령어 구조

⚠️ 요구사항

  • OS: Linux (Ubuntu, Debian 등)
  • Node.js: 20.x 이상
  • 시스템 패키지: tmux, inotify-tools, gcc/g++, python3, make (자동 설치됨)

🔧 트러블슈팅

의존성 자동 설치

# 모든 필수 도구를 한 번에 확인하고 설치
ctrz check-deps

# 또는 개별 명령어 실행 시 자동으로 의존성 체크됨
ctrz debug test.c
ctrz status
ctrz generate

수동 설치 (자동 설치 실패 시)

# tmux가 감지되지 않는 경우
sudo apt install -y tmux

# inotify-tools 오류
sudo apt install -y inotify-tools

# 모든 의존성 한 번에 설치
sudo apt update && sudo apt install -y tmux inotify-tools build-essential python3 make

vi 편집기 사용법

# vi 기본 명령어
i          # 입력 모드
Esc        # 명령 모드
:w          # 파일 저장
:q          # 종료
:wq         # 저장 후 종료
:q!         # 저장하지 않고 종료

환경변수 설정 문제

# CLI로 환경변수 설정 (권장)
ctrz status --set KEY=your_api_key_here

# 환경변수가 제대로 설정되었는지 확인
echo $GEMINI_API_KEY
echo $GEMINI_BASE_URL

# 또는 CLI로 확인
ctrz status

Windows/macOS 사용자

  • WSL2 (Windows Subsystem for Linux) 사용
  • Linux 가상머신 사용
  • GitHub Codespaces 사용

📖 자세한 사용법

# 도움말
ctrz --help

# 특정 명령어 도움말
ctrz debug --help
ctrz generate --help
ctrz check-deps --help
ctrz status --help

🔗 링크

📄 라이선스

MIT