4runr-os

中文文档
2.11.13发布于 2026/07/31MITTypeScriptES Module近 30 天下载 1万

4Runr AI Agent OS - Secure terminal interface for AI agents. v2.11.13: Fix Windows updater hang (remove findstr/timeout wait; reliable start handoff).

原始使用文档
文档目录33 节
  1. ⚠️ Work in Progress
  2. Monorepo development
  3. 🔒 Security Notice
  4. 📸 Screenshots
  5. Boot Screen
  6. Main Interface
  7. 🚀 Quick Start
  8. Installation
  9. Usage
  10. ✨ Features
  11. 🎨 Complete Operating System
  12. 🔒 Enterprise Safety Features
  13. 📊 Real-time Monitoring
  14. 🔄 Auto-Update System
  15. 🛠️ Developer Experience
  16. 📋 Commands
  17. Global Commands
  18. In-Terminal Commands
  19. ⚙️ Configuration
  20. Auto-Update Settings
  21. Environment Variables
  22. Configuration File
  23. 📦 Requirements
  24. 🏗️ Architecture
  25. 📚 Documentation
  26. 🔧 Troubleshooting
  27. "os-tui binary not found"
  28. "4r: command not found"
  29. Terminal too small
  30. Connection issues
  31. 🤝 Support
  32. 📄 License
  33. 🙏 Acknowledgments

4Runr OS

4Runr OS License Node

Complete operating system for AI agents - includes terminal interface (TUI), gateway component for AI agent credentials, underlying orchestration structure, and connections to external tools.

Installation • Features • Documentation • Support


⚠️ Work in Progress

This package is currently in active development and is NOT in MVP (Minimum Viable Product) state.

  • Features are being actively developed and may change
  • Some functionality may be incomplete or experimental
  • Breaking changes may occur between versions
  • Not recommended for production use at this time

Status: Pre-MVP / Development Phase

Monorepo development

If you are working inside the 4Runr-AI-Agent-OS repo: Gateway and MK3 TUI source live under apps/os-server and apps/os-tui. The copies under packages/os-cli/apps/os-server and packages/os-cli/os-tui are for the npm package. After editing the apps, run:

cd packages/os-cli
npm run sync:vendored

See docs/CANONICAL-SOURCES.md (repo root) for the full rule.

🔒 Security Notice

Version 2.2.0+ includes comprehensive security protections:

✅ Fixed (v2.2.0):

  • Command injection protection
  • SSRF (Server-Side Request Forgery) protection
  • Encrypted storage (AES-256-GCM) for all sensitive data
  • JSON schema validation
  • Package integrity verification

✅ Fixed (v2.1.56):

  • Arbitrary code execution (tool testing disabled)
  • Path traversal attacks (username validation)
  • Insecure file permissions

Still pre-MVP - Use with caution:

  • ⚠️ Do not use in production environments
  • ⚠️ Do not run with administrator/root privileges
  • ⚠️ Do not connect to untrusted gateways

What's protected:

  • ✅ Configuration files encrypted in ~/.4runr/
  • ✅ Session tokens encrypted
  • ✅ Private IP addresses blocked
  • ✅ Package updates verified for integrity

See SECURITY-FIXES-2.2.0.md for complete details.


📸 Screenshots

Note: Screenshots are hosted on GitHub. If images don't display, they may need to be pushed to the repository.

Boot Screen

4Runr OS Boot Screen

Initialization screen showing system startup and readiness status.

Main Interface

4Runr OS Terminal Interface

Full terminal interface showing system status, operations log, resources, and capabilities.


🚀 Quick Start

Installation

npm install -g 4runr-os

Usage

4r

That's it! The terminal interface launches automatically.


✨ Features

🎨 Complete Operating System

  • Terminal Interface (TUI) - Rust + Ratatui high-performance native terminal UI
  • Gateway Component - Built-in component for AI agent credentials and authentication
  • Orchestration Layer - Node.js backend managing system operations and structure
  • Real-time Updates - Live monitoring of agent runs, system resources, and network status
  • Beautiful Design - Clean, professional interface with 4Runr brand colors
  • Cross-platform - Works on Windows, macOS, and Linux

🔒 Enterprise Safety Features

  • Shield System - PII detection, injection blocking, hallucination checks
  • Sentinel Monitoring - Real-time safety monitoring and alerting
  • Policy Enforcement - Configurable safety policies and controls
  • Audit Logging - Complete audit trail of all operations

📊 Real-time Monitoring

  • System Status - CPU, memory, network monitoring
  • Agent Operations - Live log streaming and status updates
  • Gateway Component Health - Internal gateway component status and metrics
  • External Gateway Connections - Status of connections to external tools and services
  • Resource Tracking - Active runs, connections, and capabilities

🔄 Auto-Update System

  • Automatic Updates - Checks for and installs new versions automatically
  • Configurable - Enable/disable auto-updates via config command
  • Zero Downtime - Updates happen seamlessly in the background

🛠️ Developer Experience

  • Zero Configuration - Works out of the box
  • Pre-built Binaries - No Rust or build tools required
  • Fast Startup - Optimized for quick launch times
  • Comprehensive Logging - Detailed logs for debugging

📋 Commands

Global Commands

CommandDescription
4rLaunch the 4Runr OS terminal interface (recommended)
4runrAlias for 4r
4runr-osAlias for 4r
4runr-setupRun initial setup wizard

In-Terminal Commands

Once the TUI is running, you can use these commands:

  • help - Show all available commands
  • config - Manage configuration settings
  • status - Show system status
  • agents - List available agents
  • runs - View agent run history
  • exit or Ctrl+C - Exit the terminal

⚙️ Configuration

Auto-Update Settings

Control automatic updates from within the OS:

4r
# Then in the terminal:
config auto-update disable   # Disable automatic updates
config auto-update enable    # Enable automatic updates
config auto-update status    # Check current setting

Environment Variables

# Disable auto-update (still checks for updates)
NO_AUTO_UPDATE=1 4r

# Disable update check entirely
NO_UPDATE_CHECK=1 4r

# Set gateway URL (REQUIRED - no default for security)
# You must provide your own gateway URL - the package does not include any default server
GATEWAY_URL=http://your-gateway:3001 4r

# Or connect via command
4r gateway connect http://your-gateway:3001

Configuration File

Settings are saved in ~/.4runr/config.json and persist across sessions.


📦 Requirements

  • Node.js 18.0.0 or higher
  • npm (comes with Node.js)

No Rust or build tools needed! Pre-built binaries are included for:

  • Windows (x64)
  • macOS (x64, ARM64)
  • Linux (x64, ARM64)

🏗️ Architecture

4Runr OS is a complete operating system that includes:

  • Terminal Interface (TUI): Rust + Ratatui frontend - the user interface
  • Gateway Component: Handles AI agent credentials and authentication (part of the OS)
  • Orchestration Layer: Node.js backend managing system operations
  • External Gateway Connections: Links to external tools and services (not local)
  • Underlying Structure: Core OS components for monitoring, safety, and resource management
  • Communication: HTTP/SSE for real-time updates between components
  • Safety Systems: Built-in Shield and Sentinel systems
┌─────────────────────────────────────┐
│         4Runr OS                    │
│  ┌───────────────────────────────┐  │
│  │  Terminal Interface (TUI)     │  │  ← User Interface (Rust + Ratatui)
│  │  (Rust + Ratatui)             │  │
│  └───────────┬───────────────────┘  │
│              │                       │
│  ┌───────────▼───────────────────┐  │
│  │  Orchestration Layer          │  │  ← System Management (Node.js)
│  │  (Node.js)                    │  │
│  └───────────┬───────────────────┘  │
│              │                       │
│  ┌───────────▼───────────────────┐  │
│  │  Gateway Component            │  │  ← AI Agent Credentials (OS Component)
│  │  (AI Agent Auth)              │  │
│  └───────────┬───────────────────┘  │
│              │                       │
│  ┌───────────▼───────────────────┐  │
│  │  External Gateway Connections │  │  ← External Tools & Services
│  │  (Non-local)                  │  │
│  └───────────────────────────────┘  │
└─────────────────────────────────────┘

Key Point: The gateway is a component of the OS (for AI agent credentials), separate from the gateway connections to external tools. The OS includes the TUI, gateway component, orchestration, and underlying structure - not just the interface.


📚 Documentation


🔧 Troubleshooting

"os-tui binary not found"

The package will try to auto-install it. If that fails:

npm install -g 4runr-os-mk3

"4r: command not found"

Make sure npm global bin is in your PATH:

# Check PATH
echo $PATH | grep npm

# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH=$PATH:$(npm config get prefix)/bin

Terminal too small

The TUI requires a minimum terminal size of 80x24. Resize your terminal window.

Connection issues

IMPORTANT: The package does NOT include any default gateway URL for security. You must configure your own:

# Set gateway URL (required)
export GATEWAY_URL=http://your-gateway:3001

# Test gateway connection
curl http://your-gateway:3001/health

# Then run
4r

Security Note: No server URLs, IP addresses, or credentials are included in the package. Users must configure their own gateway connection.


🤝 Support


📄 License

MIT License - see LICENSE file for details.


🙏 Acknowledgments

Built with:

  • Ratatui - Terminal UI library
  • Rust - Systems programming language
  • Node.js - JavaScript runtime

Made with ❤️ by the 4Runr Team

⬆ Back to Top

版本与发布记录

4runr-os 共发布 551 个版本,首次发布于 2025/12/02;过去 12 个月发布了 551 个版本。

版本发布日期距今
2.11.13latest2026/07/313 个月前
2.11.122026/07/303 个月前
2.11.112026/07/303 个月前
2.11.102026/07/293 个月前
2.11.92026/07/293 个月前
2.11.82026/07/293 个月前

关于 4runr-os 的常见问题

4runr-os 是什么?

4Runr AI Agent OS - Secure terminal interface for AI agents. v2.11.13: Fix Windows updater hang (remove findstr/timeout wait; reliable start handoff).

如何安装 4runr-os?

在项目目录运行 npm install 4runr-os,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 4runr、4runr-os、4r、4runr-smoke、4runr-setup,可以用 npx 4runr 直接运行。

4runr-os 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

4runr-os 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

4runr-os 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

4runr-os 可以商用吗?

4runr-os 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

4runr-os 的下载量有多少?

根据 npm 官方下载统计,4runr-os 在 2026/10/04 – 2026/11/02 这 30 天内被下载 10,345 次,日均约 345 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

4runr-os 还在维护吗?

最新版本 2.11.13 发布于 2026/07/31(3 个月前);至今共发布 551 个版本,其中过去 12 个月发布了 551 个;首次发布于 2025/12/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。