runex-core 0.1.0

Core library for runex – a cross-shell abbreviation expansion engine
Documentation
runex-core-0.1.0 has been yanked.

runex

English | 日本語

Turn runes into commands.

runex is a cross-shell abbreviation engine that expands short tokens into full commands in real-time.

Features

  • Cross-shell support (bash / pwsh / cmd / nu)
  • Real-time expansion (space-triggered)
  • Single config file
  • Conditional rules (OS / shell / command existence)
  • Fast and lightweight (Rust core)

Concept

runex treats short inputs as runes, and expands them into full casts.

gcm␣ → git commit -m
ls␣  → lsd

Installation

cargo install runex

Setup

PowerShell

Temporary:

Invoke-Expression (& runex export pwsh)

Persistent ($PROFILE):

if (!(Test-Path $PROFILE)) { New-Item -Type File -Path $PROFILE -Force }
Add-Content $PROFILE 'Invoke-Expression (& runex export pwsh)'

bash

Temporary:

eval "$(runex export bash)"

Persistent (~/.bashrc):

echo 'eval "$(runex export bash)"' >> ~/.bashrc

Nushell

Temporary:

runex export nu | save ~/.config/nu/runex.nu

Persistent (config.nu):

mkdir ~/.config/nu
runex export nu | save -f ~/.config/nu/runex.nu
open ~/.config/nu/config.nu

Then add this line to config.nu:

source ~/.config/nu/runex.nu

cmd (Clink)

Temporary / install script:

runex export clink > %LOCALAPPDATA%\clink\runex.lua

Persistent: If Clink is installed and loads %LOCALAPPDATA%\clink\*.lua, the file above is enough.

Config

~/.config/runex/config.toml

version = 1

[[abbr]]
key = "ls"
expand = "lsd"


[[abbr]]

key = "gcm"

expand = "git commit -m"

Commands

runex expand --token ls   # expand a single token

runex list                # list all runes

runex doctor              # check config and environment

runex export <shell>      # generate shell integration script

Example

Input:  gcm␣
Output: git commit -m ␣

Why not alias?

Feature alias runex
Cross-shell No Yes
Real-time expand No Yes
Conditional rules No Yes

Philosophy

  • One config, all shells
  • Minimal typing, maximal power
  • Runes over repetition

Future

  • Fuzzy suggestions
  • Interactive picker
  • Editor integrations

Name

  • run (execute)
  • ex (expand / execute)
  • rune (compressed command)

License

MIT