pctools-terminal-utilities
v2.2.0
Published
Modern TUI for System Administration with Chat Assistant, Natural Language Commands, Real-time Monitoring, and Beautiful Interface
Maintainers
Readme
PCTools Terminal Utilities
Modern AI-powered terminal utilities for Unix/Unix-like systems, built with Node.js and Ink (React for CLI).
Version 2.2.0 - Chat Assistant Added! 💬
✨ Features
💬 Chat Assistant (NEW in v2.2)
일반 대화형 AI 어시스턴트 - 명령 실행 없이 순수하게 대화만!
주요 기능:
- ✅ 스트리밍 응답 - 한 글자씩 실시간 표시
- ✅ 대화 히스토리 - 메시지가 위로 쌓이는 터미널 스타일
- ✅ 멀티턴 대화 - 최근 10턴 컨텍스트 유지
- ✅ 한국어 지원 - 자연스러운 한국어 대화
사용 예시:
> 지금 몇시야?
AI: 현재 시간은 2026년 2월 6일 오후 3시 15분입니다.
> 고마워
AI: 천만에요! 다른 궁금한 것이 있으면 언제든 물어보세요.
> Python으로 피보나치 수열 코드 짜줘
AI: 물론이죠! 다음은 피보나치 수열을 생성하는 Python 코드입니다:
```python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
**단축키:**
- `Ctrl+N`: 새 대화 시작
- `q/ESC`: 메인 메뉴로 돌아가기
### 🤖 Enhanced Natural Language Commands (v2.1)
Execute commands using plain English with **advanced AI features**:
**New in v2.1:**
- ✅ **50+ Commands** (expanded from 15)
- ✅ **Conversational Context** (remembers last 5 turns)
- ✅ **AI Result Interpretation** (explains what happened)
- ✅ **Smart Confidence Handling** (asks when unsure)
**Supported Commands:**
- **File Operations** (15): ls, find, tree, stat, mkdir, touch, grep, cat, etc.
- **Network** (10): ping, curl, wget, dig, traceroute, ifconfig, etc.
- **System** (17): ps, top, kill, journalctl, dmesg, systemctl, etc.
- **Package Management** (9): apt, brew, npm, pip, gem, cargo, etc.
- **Dev Tools** (12): git, docker, kubectl, node, python, etc.
**Conversational Examples:**
```bash
> show top 5 processes
✓ Executed: ps aux --sort=-pcpu | head -5
> kill that process
✓ Killed process 1234 (referenced from previous command)
> what about memory?
✓ Showing memory usage (context-aware)AI Interpretation:
> df -h
💡 Summary: Your disk is 85% full. Consider cleaning up.
Key Points:
• /dev/sda1: 85% used (340GB / 400GB)
• /home partition is nearly full
⚠️ Warnings:
• Disk usage above 80% threshold
💡 Suggestions:
• Run 'du -sh /* | sort -h' to find large directories
• Consider removing old logs or temporary files📊 Real-time Dashboard
Live system monitoring with:
- CPU usage with progress bars and sparklines
- Memory usage with historical graphs
- Disk usage for all filesystems
- Network traffic (RX/TX)
- System uptime and process count
- Adjustable update interval (500ms - 10s)
🖥️ System Monitoring
- System Information - OS, CPU, Memory stats (table format)
- Disk Usage - All filesystems with usage percentages
- Process Monitor - Top 10 processes by CPU/memory
- Network Statistics - Interfaces and traffic stats
📁 File Management
- File Browser - Navigate directories with keyboard
- Text Viewer - View file contents with scrolling
- File Operations - Copy, move, delete, rename files
🚀 Quick Start
Installation
npm install
npm run build
npm startConfigure Ollama (Recommended)
# Install Ollama
curl https://ollama.ai/install.sh | sh
# Pull model
ollama pull llama2
# Start server
ollama serve📖 Usage
Menu Options
💬 Chat Assistant - AI 대화형 어시스턴트
📊 Real-time Dashboard - Live system monitoring
⚙️ System Information - OS, CPU, Memory details
💾 Disk Usage - Filesystem usage statistics
📈 Process Monitor - Top processes by resource usage
🌐 Network Statistics - Network interfaces and traffic
📁 File Browser - Navigate and manage files
⚙️ Settings - Configure app settings
🚪 Exit - Quit application🎮 Keyboard Shortcuts
Main Menu
↑/↓: Navigate menuEnter: Select optionq/ESC: Exit
Natural Language Command
Enter: Execute commandh: Toggle helpc: Clear resultq/ESC: Back to menu
Settings
k: Set API key (when LLM provider selected)↑/↓: Navigate optionsEnter: Selectq/ESC: Back
Real-time Dashboard
+/-: Adjust update speedq/ESC: Back to menu
File Browser
↑/↓: Navigate filesEnter: Open directory/fileq/ESC: Back to menu
Text Viewer
↑/↓,j/k: Scroll line by lineSpace/PgDn: Page downb/PgUp: Page upg: Jump to topG: Jump to bottomq/ESC: Back to browser
💡 Natural Language Command Examples
Conversational Commands (NEW!)
> show top 5 processes
✓ Showing top 5 CPU processes
> kill that process
✓ Killed process 1234 (from previous command)
> what about memory?
✓ Showing memory usage (context-aware)
> find python files
✓ Found 42 .py files
> how big are they?
✓ Total size: 2.3MB (context-aware)File Operations
find all .log files
find files modified today
find large files over 100MB
list files in src
count files in logsNetwork Operations
ping google.com
check network interfaces
curl https://api.example.com
dig example.comSystem Operations
show top 10 processes
check disk space
show memory usage
show system info
kill process 1234
restart nginx servicePackage Management
list installed packages
search for nginx package
show npm global packages
check python packagesDev Tools
git status
docker ps
show running containers
check node version🏗️ Development
npm run dev # Run in development mode
npm run build # Build TypeScript
npm start # Run built version🛠️ Tech Stack
Core
- Node.js + TypeScript
- Ink (React for CLI)
- systeminformation (cross-platform system info)
- fs-extra (enhanced file operations)
AI & NLP
- Pattern matching with regex (20+ patterns)
- OpenAI API integration
- Claude (Anthropic) API integration
- Ollama local LLM support
UI Components
- ink-select-input (interactive menus)
- ink-text-input (text input)
- Custom Table component (data display)
- Progress bars & sparklines
Configuration
- Persistent settings (~/.pctools/config.json)
- API key management
- Theme system
📊 Project Statistics
- Version: 2.2.0
- Components: 15 UI components
- Libraries: 10 business logic modules
- Lines of Code: ~6,800
- Command Support: 71+ commands
- Features: 16 major tools
🎯 Completed Phases
- ✅ Phase 1: File Management Foundation
- ✅ Phase 2.1: Natural Language Commands (Pattern Matching)
- ✅ Phase 2.2: LLM Integration (Ollama)
- ✅ Phase 3.1: Real-time Dashboard
- ✅ Phase 3.2: Theme System
- ✅ Phase 3.3: Settings Management
- ✅ Phase 4: NL Command Enhancement (v2.1)
- Command expansion (71+ commands)
- Conversational context
- Result interpretation
- Smart confidence handling
- ✅ Phase 5: Chat Assistant (v2.2)
- Streaming responses
- Message history UI
- Multi-turn conversations
- Korean language support
🔮 Future Enhancements
- Multi-option command suggestions
- Confirmation dialog for dangerous commands
- Docker/Git monitoring
- Automation & Macros
- Plugin System
- Multi-language support
🔒 Privacy & Security
API Keys
- Stored locally in
~/.pctools/config.json - Masked input (*****)
- Never committed to git
- User-controlled
Privacy Options
- No LLM: Use pattern matching only (no data sent)
- Cloud LLM: OpenAI/Claude (data sent to API)
- Local LLM: Ollama (all processing local, no data sent)
Recommendation:
- Sensitive environments: Use Ollama (local)
- Best accuracy: Use OpenAI or Claude
- Offline use: Use pattern matching or Ollama
📝 Documentation
docs/01-plan/- Project planning documentsdocs/04-report/- Implementation reportsphase1-completion-report.mdphase2.1-completion-report.mdall-phases-complete-report.mdfinal-completion-report.md
🐛 Known Limitations
- Ollama Required: Requires Ollama server running
- Response Time: AI interpretation adds 1-3s delay
- English Only: Commands in English only
- Context Limit: Remembers last 5 turns only
- File Size Limit: Text viewer limited to 1MB files
🤝 Contributing
This is a demonstration project showcasing modern CLI development with React (Ink), TypeScript, and AI integration.
📄 License
ISC
🎉 Highlights
- 🚀 Fast: < 1s startup, < 500ms command execution
- 🤖 Smart: AI-powered with conversational context
- 💬 Conversational: Chat assistant with streaming responses
- 🎨 Beautiful: Modern UI with borders, icons, and colors
- 📊 Informative: Real-time monitoring with graphs
- ⌨️ Efficient: Keyboard-driven navigation
- 🔧 Configurable: Persistent settings
- 🌐 Cross-platform: macOS, Linux
Built with ❤️ using Ink, TypeScript, and AI
Version 2.2.0 - Chat Assistant Added! 💬
> find all .log files
> copy README.md to backup/
> show processes using more than 50% CPU
> delete all .tmp files in temp
> search for "TODO" in src20+ Supported Commands:
- File operations (find, copy, move, delete, rename, create, list, count)
- Search (by extension, time, size, content)
- System queries (processes, disk, memory, network)
- Complex operations (bulk copy/delete)
📊 Real-time Dashboard (NEW!)
Live system monitoring with:
- CPU usage with progress bars and sparklines
- Memory usage with historical graphs
- Disk usage for all filesystems
- Network traffic (RX/TX)
- System uptime and process count
- Adjustable update interval (500ms - 10s)
🖥️ System Monitoring
- System Information - OS, CPU, Memory stats (table format)
- Disk Usage - All filesystems with usage percentages
- Process Monitor - Top 10 processes by CPU/memory
- Network Statistics - Interfaces and traffic stats
📁 File Management
- File Browser - Navigate directories with keyboard
- 📁 Directory navigation with arrow keys
- 📄 File selection to view contents
- ⬆️ Parent directory navigation
- Sorted display (directories first)
- Text Viewer - View file contents with scrolling
- Line numbers and file info
- Keyboard navigation (↑/↓, j/k, Space, PgUp/PgDn, g/G)
- File size limit: 1MB
- File Operations Library - Copy, move, delete, rename files
- Safe operations with error handling
- Overwrite protection
- Recursive directory operations
🚀 Installation
npm install
npm run build📖 Usage
Interactive TUI Menu
npm start
# or
node dist/cli.jsNavigate with arrow keys, select with Enter, press 'q' or ESC to go back.
Menu Options
💬 Natural Language Command - Execute commands in plain English
📊 Real-time Dashboard - Live system monitoring
⚙️ System Information - OS, CPU, Memory details
💾 Disk Usage - Filesystem usage statistics
📈 Process Monitor - Top processes by resource usage
🌐 Network Statistics - Network interfaces and traffic
📁 File Browser - Navigate and manage files
🚪 Exit - Quit application🎮 Keyboard Shortcuts
Main Menu
↑/↓: Navigate menuEnter: Select optionq/ESC: Exit
Natural Language Command
Enter: Execute commandh: Toggle helpc: Clear resultq/ESC: Back to menu
Real-time Dashboard
+/-: Adjust update speedq/ESC: Back to menu
File Browser
↑/↓: Navigate filesEnter: Open directory/fileq/ESC: Back to menu
Text Viewer
↑/↓,j/k: Scroll line by lineSpace/PgDn: Page downb/PgUp: Page upg: Jump to topG: Jump to bottomq/ESC: Back to browser
💡 Natural Language Command Examples
File Operations
find all .log files
find files modified today
find large files over 100MB
copy file.txt to backup/
move old.txt to archive/
delete temp.txt
rename test.js to app.js
create directory backup
list files in src
count files in logsSearch Operations
search for "TODO" in src
find all .js files
find files modified yesterday
find large files over 1GBSystem Operations
show processes using more than 50% CPU
check disk space
show memory usage
show network interfaces
show system infoComplex Operations
copy all .js files from src to backup
delete all .tmp files in temp🏗️ Development
npm run dev # Run in development mode
npm run build # Build TypeScript
npm start # Run built version
./test-phase1.sh # Test Phase 1 implementation🛠️ Tech Stack
Core
- Node.js + TypeScript
- Ink (React for CLI)
- systeminformation (cross-platform system info)
- fs-extra (enhanced file operations)
UI Components
- ink-select-input (interactive menus)
- ink-text-input (text input)
- Custom Table component (data display)
Natural Language Processing
- Pattern matching with regex
- 20+ command patterns
- Parameter extraction and validation
Real-time Monitoring
- Live data collection (1s interval)
- Progress bars with color coding
- Sparkline graphs for historical data
- Adjustable update frequency
📊 Project Statistics
- Components: 11 UI components
- Libraries: 4 business logic modules
- Lines of Code: ~3,800
- Command Patterns: 20+
- Features: 10 major tools
🎯 Implemented Phases
- ✅ Phase 1: File Management Foundation
- FileBrowser, TextViewer, File Operations
- ✅ Phase 2.1: Natural Language Commands (Pattern Matching)
- 20+ command patterns, Parser, Executor
- ✅ Phase 3.1: Real-time Dashboard
- Live monitoring, Progress bars, Sparklines
🔮 Future Enhancements (Not Implemented)
- Phase 2.2: LLM API Integration (OpenAI/Claude)
- Phase 2.3: Local LLM (Ollama)
- Phase 3.2: Theme System (Dark/Light mode)
- Phase 3.3: Configuration Management
- Phase 4: Docker/Git monitoring, Automation, Plugins
📝 Documentation
docs/01-plan/- Project planning documentsdocs/04-report/- Implementation reportsphase1-completion-report.mdphase2.1-completion-report.mdfinal-completion-report.md
🐛 Known Limitations
- English Only: Natural language commands support English only
- Pattern Matching: Commands must match regex patterns exactly
- No Confirmation: Dangerous operations (delete) have no confirmation
- Large Directories: Searching thousands of files may be slow
- File Size Limit: Text viewer limited to 1MB files
🤝 Contributing
This is a demonstration project showcasing modern CLI development with React (Ink) and natural language processing.
📄 License
ISC
🎉 Highlights
- 🚀 Fast: < 1s startup, < 500ms command execution
- 🎨 Beautiful: Modern UI with borders, icons, and colors
- 🧠 Smart: Natural language command processing
- 📊 Informative: Real-time monitoring with graphs
- ⌨️ Efficient: Keyboard-driven navigation
- 🔧 Extensible: Clean architecture for future enhancements
Built with ❤️ using Ink, TypeScript, and AI-powered development
