Action Language Interpreter - One command for every tool
Project description
ALI - Action Language Interpreter
Compose complex tmux commands from regular phrases. Pure command aggregator - outputs commands, never executes them.
Quickstart
# Install
uv tool install ali-tool # Recommended
# OR
pip install ali-tool
# Initialize tmux integration
ali --init tmux
# Then reload tmux: tmux source ~/.tmux.conf
# Use
ali GO .2 # → tmux select-pane -t .2
ali SPLIT pop # → tmux display-popup -w 80% -h 80% -d "$PWD" -E 'bash'
ali EDIT file.txt pop # → tmux display-popup ... 'micro file.txt'
ali WIDTH 012 # → Distribute panes evenly
ali ECHO ed? # → Popup editor, pipe output to send-keys
Press C-b a in tmux to open ALI prompt after initialization.
Architecture
ALI is a pure command aggregator - it only outputs commands, never executes them.
Input → Parser → Router → Resolver → Output
↓ ↓ ↓
Grammar Commands Templates
Core Components
- Parser - Tokenizes input using plugin grammars
- Router - Matches patterns to find commands
- Resolver - Expands templates with conditionals and services
- Registry - Manages plugins and their services
Template Engine
# Conditionals
exec: "{?target:tmux select-pane -t {target} && }command"
# Array lookups
exec: "{direction[left:-h -b,right:-h,up:-v -b,down:-v,pop:display-popup]}"
# Service composition
exec: "{split} 'micro {file}'" # Uses split service from tmux
Plugin Development
Plugins are YAML-only data files that define grammar, commands, and services.
# plugin.yaml
name: example
version: 1.0
description: Example plugin
# Grammar
grammar:
item: {type: string}
direction: {values: [left, right, up, down, pop]}
# Commands
commands:
- match: {verb: ACTION, item: present}
exec: "{split} '{item}'"
# Services
services:
process: "tool --process"
# Selectors
selectors:
item?:
type: stream
exec: "selector"
See the plugin documentation for more patterns.
Examples
Navigation
ali GO .2 # Go to pane 2
ali GO :3 # Go to window 3
ali GO ? # Visual pane selector
Splits & Layout
ali SPLIT # Split right (default)
ali SPLIT left # Split left
ali SPLIT pop # Open popup shell
ali WIDTH 012 # Distribute panes evenly
Editing
ali EDIT file.txt # Edit in right split
ali EDIT file.txt pop # Edit in popup
ali VIEW file.txt # Read-only view
Stream Operations
ali ECHO ed? # Edit in popup, pipe to send-keys
ali COPY br? # Browse in popup, copy to clipboard
Development
# Clone and install dev version
git clone https://github.com/angelsen/ali.git
cd ali
uv tool install -e .
# Test a command
ali GO .2
License
MIT - see LICENSE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ali_tool-0.1.0.tar.gz.
File metadata
- Download URL: ali_tool-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8154eb9b58c161196bca6793b729ca170d4c6ee3300c452847c9cb67befdf078
|
|
| MD5 |
67637b48c10948cbbdee46850441def5
|
|
| BLAKE2b-256 |
d183101987e7a61b88e5a6534a73ae246fa2b75077cbbf4c4a2298c42e4d0614
|
File details
Details for the file ali_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ali_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b67295aa177b23c9e25fa4f4b1867457678055fe46841776412a732d0d6eb32
|
|
| MD5 |
edcfb6986b8a26cd22752c5981349972
|
|
| BLAKE2b-256 |
e3928f3136ff0a3df30cc2fe7ca4489090242556f51e8db515d320b78af583a0
|