Skip to content

WinriseF/CtxRun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

827 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


CtxRun is an AI-powered productivity tool designed for developers. It integrates code context assembly, code diff, prompt management, and a always-ready global AI terminal, seamlessly connecting your IDE with Large Language Models (LLMs).

alt text alt text alt text alt text alt text

✨ Core Features

  • 🚀 Context Forge (File Assembly): Intelligently package your project files into LLM-friendly formats with automatic comment removal, binary file filtering, and real-time token estimation. Supports configuration persistence and project memory.
  • 💡 Spotlight (Global AI Terminal): Summon anytime with global hotkey (Alt+S). Quickly search and execute commands, or have streaming AI conversations from any application.
    • Calculator: Type =1+1, =sin(pi) for quick math
    • Shell Commands: Type >ls, >dir to execute terminal commands
    • Scope Search: /app for apps, /cmd for commands, /pmt for prompts
    • Template AI: Configure prompts as chat templates for auto-application
    • App Launcher: Search and launch installed applications quickly
  • 📚 Prompt Verse (Prompt Library): Efficiently manage your common commands and AI prompts. Supports variable templates, group management, and downloading offline prompt packs from the official library. Supports executable commands and chat template configuration.
  • 🔄 Patch Weaver (AI Completer & Git Diff): Apply AI-generated code patches with smart fuzzy matching for precise modification location. Also a powerful Git Diff visualizer with Working Directory comparison, version comparison, and diverse export formats.
  • 🛡️ Privacy Security Scan: Built-in sensitive information detection engine with whitelist management to prevent API key and other secrets leakage.
  • 📋 Refinery (Clipboard History): Comprehensive clipboard history manager supporting text and images. Features search/filtering, pinning important entries, note-taking, auto-cleanup, calendar view, and Spotlight quick paste integration.
  • 🖱️ Automator (Workflow Automation): Visual workflow automation system with node graph orchestration and conditional branching. Integrates browser automation (headless_chrome), keyboard input simulation, mouse operations, color detection, loop control, and more. Features semantic UI element targeting via Windows UIAutomation API with physical input fallback.
  • ⛏️ Model Miner (Web Content Mining): Intelligent web scraper that extracts clean content from web pages using Readability.js, converts to Markdown, and supports concurrent crawling with depth/page limits and hierarchical file storage.
  • 📡 Transfer (LAN Transfer): LAN file transfer and instant chat. Starts a local HTTP server — other devices can connect by scanning a QR code. Supports file transfer progress tracking and real-time text chat.
  • 🛡️ Guard (Idle Guard): Automatic screen lock on idle timeout. Uses Windows low-level hooks for global input interception. Unlock via a 1.5s long-press circular progress ring. Supports preventing system sleep.
  • 🤖 Agent Tool Runtime (AI Tool Runtime): Invoke tools during AI conversations (file system operations, web search, content extraction). Supports sandbox security policies and an approval mechanism.
  • 🔒 Exec Runtime (Command Execution Runtime): Secure command execution sandbox with approval, termination, and terminal interaction support.
  • 👁️ Peek (Standalone Preview): Pop-up file preview window supporting DOCX/PDF/HTML/Markdown and more formats.
  • 📡 Network Speed Test: Integrated M-Lab NDT7 network speed testing.
  • 📊 System Monitor Enhanced: Battery info, disk details, network traffic, port and process monitoring.

🚀 Want to learn how to use it?

👉 Check out the Detailed Usage Guide

🛠️ Tech Stack

Built with a modern high-performance desktop application architecture, balancing minimal resource usage with smooth user experience (~10MB install size, ~30MB memory footprint):

  • Core: Tauri 2 (Rust + WebView2) - Native-level performance with minimal install size, multi-window support.
  • Frontend: React 19 + TypeScript + Vite 7 - Modern frontend development experience.
  • State Management: Zustand 5 - Lightweight yet powerful state management.
  • Internationalization: i18next + react-i18next - JSON-based multi-language support.
  • Styling: Tailwind CSS + tailwindcss-animate - Beautiful UIs built fast.
  • Icons: Lucide React.
  • Database: SQLite (rusqlite) + Refinery - Local data persistence and migration management.
  • Editor: Monaco Editor - VSCode-level code editing experience.
  • Testing: Vitest + Testing Library - Fast unit and component testing.
  • Backend: axum (HTTP server), tokio-util, qrcode, starship-battery - LAN transfer server, QR code generation, battery status.
  • Document Preview: docx-preview, @wooorm/starry-night - DOCX rendering, syntax highlighting.
  • Interaction: react-zoom-pan-pinch, @spaceymonk/react-radial-menu - Zoom/pan, radial menu for Guard unlock.
  • Network: @m-lab/ndt7 - M-Lab NDT7 network speed testing.

📥 Download & Installation

Download installers for your OS from the Releases page, or download the portable version (CtxRun.exe) - no installation required, click to run (data stored in %localappdata%\com.ctxrun):

  • Windows: .msi or .exe

⚠️ About Virus Alerts

When launching the app, you may see a "Windows has protected your computer" (Microsoft Defender SmartScreen) blue warning window.

This is normal. Since CtxRun is an open-source project maintained by an individual without an EV Code Signing Certificate, it will be flagged as "unknown publisher".

How to run:

  1. In the blue warning window, click More info.
  2. Click the Run anyway button that appears below.

🔒 Security Commitment: This project is fully open-source, built automatically by GitHub Actions, and contains no malicious code. If you have concerns, feel free to review the source and build it yourself. alt text

Credits & Open Source Notice

Special thanks to the following projects for data support and inspiration:

  • tldr-pages: Command pack data partially sourced from this project.
  • Awesome ChatGPT Prompts: Prompt pack data partially sourced from this project.
  • gitleaks: Sensitive information detection logic and rules partially inspired by this project.

CtxRun - Run with context, AI at your fingertips.