og
A smart file opener acting as a routing gateway.
og (Open Gateway) is a rule-based file opener. It works like a network gateway, but for your local files: it intercepts "open" requests and routes them to different applications based on rules you define.
Most operating systems enforce a simple "1-to-1" mapping between file extensions and applications, but og allows for "1-to-many" logic based on context.
For example, you can tell og to:
- Open
.mdfiles in your~/workdirectory with Obsidian. - Open
.mdfiles in~/devwith VS Code. - Open
.tsfiles that are actually MPEG-TS video with QuickTime Player, while keeping your TypeScript files in your code editor.
Features
- Context-aware Routing: Match files using glob patterns, file extensions, MIME types, or magic bytes.
- TUI Config Manager(WIP): Includes a terminal user interface for managing rules and testing matches without editing TOML files manually.
- Performance: Written in Rust for minimal latency.
- System Fallback: Seamlessly falls back to system defaults when no rules match.
Installation
Usage
# Routes according to your rules
# Shows which rule would match this file
# Show help for more function
Configuration
See toml config files in example/
License
MIT License