Skip to content

BingMoeNone/crun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

88 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

crun

Python License Platform GitHub release

crun is a cross-platform TUI tool for interactively selecting Claude Code startup flags. Browse 71 flags across 15 groups, search by name / description / pinyin, and launch claude <flags> โ€” no more memorizing CLI arguments.

ไธญๆ–‡ๆ–‡ๆกฃ

Quick Install

Linux (amd64 / arm64):

curl -fsSL https://raw.githubusercontent.com/BingMoeNone/crun/main/scripts/install.sh | bash

Windows (amd64, Windows Terminal recommended):

irm https://raw.githubusercontent.com/BingMoeNone/crun/main/scripts/install.ps1 | iex

Specify a version: CRUN_VERSION=v0.6.1 (Linux) or $env:CRUN_VERSION="v0.6.1" (Windows). See releases for all versions.

Prerequisite: The claude CLI must be installed and available in PATH.

Features

  • 71 flags, 15 groups โ€” full Claude Code CLI reference, organized and browsable
  • / instant search โ€” filter by flag name, Chinese/English description, or choice values
  • Pinyin fuzzy search โ€” type moxing to match ๆจกๅž‹, supports partial pinyin
  • Search highlighting โ€” matched characters highlighted in yellow bold
  • Mutual exclusion โ€” conflicting flags (--chrome โ†” --no-chrome) auto-deselected
  • Sub-argument prompts โ€” single / value flags prompt immediately on toggle
  • Inline tooltips โ€” cursor-focused flag shows usage tip at screen bottom
  • Command history โ€” 9-entry ring buffer, adaptive layout (A/B), number-to-reuse
  • Parameter presets โ€” save/load named flag combinations for different workflows
  • Custom keybindings โ€” configure in preferences.json, conflict detection at startup
  • Custom flags โ€” extend via ~/.config/crun/flags_custom.json
  • Bilingual UI โ€” first-run wizard (Chinese / English)

Usage

crun
Key Action
โ†‘ / โ†“ or j / k Move cursor
Space Toggle flag
Enter Confirm selection
/ Enter search mode
Backspace Delete search char
Esc Exit search / quit selector
Ctrl+C Cancel
Ctrl+D / Ctrl+U Page up/down (Vim)

Customize keybindings via keybindings in ~/.config/crun/preferences.json.

Configuration

~/.config/crun/                        # Windows: %LOCALAPPDATA%\crun\
โ”œโ”€โ”€ preferences.json                   # language, search_mode, keybindings, etc.
โ”œโ”€โ”€ flags_custom.json                  # custom/override flag definitions
โ”œโ”€โ”€ history.json                       # 9 most recent runs (ring buffer)
โ”œโ”€โ”€ presets.json                       # saved parameter presets
โ””โ”€โ”€ flags_default.json                 # built-in flags (read-only, embedded)

Custom Flags

Add or override flags in ~/.config/crun/flags_custom.json:

{
  "version": 1,
  "flags": [
    {
      "flag": "--my-custom-flag",
      "description": { "zh": "ๆˆ‘็š„่‡ชๅฎšไน‰ๅ‚ๆ•ฐ", "en": "My custom flag" },
      "required_args": [],
      "type": "multi",
      "group": "custom"
    }
  ]
}

Development

git clone git@github.com:BingMoeNone/crun.git
cd crun

# uv is required: curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync --all-groups
uv pip install -e .

# Run tests
uv run pytest tests/ -v

# Build binary
uv run pyinstaller --onefile --name crun --paths src \
  --add-data "data/flags_default.json:data" \
  --add-data "pyproject.toml:." \
  --copy-metadata crun \
  src/claude_run/__main__.py

See CONTRIBUTING.md for PR guidelines and SECURITY.md for vulnerability reporting.

License

Apache 2.0

About

๐Ÿ–ฅ๏ธ crun โ€” TUI flag selector for Claude Code. 71 flags, 15 groups, pinyin fuzzy search, presets, command history. Cross-platform (Linux/macOS/Windows).

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors