{"id":17383032,"url":"https://github.com/yukaii/hx-utils","last_synced_at":"2026-02-27T18:11:04.158Z","repository":{"id":247020493,"uuid":"824829828","full_name":"Yukaii/hx-utils","owner":"Yukaii","description":"Helix utility scripts that works for tmux or wezterm user","archived":false,"fork":false,"pushed_at":"2025-02-27T08:34:12.000Z","size":1612,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T04:49:14.279Z","etag":null,"topics":["helix","shell-scripts","tmux","wezterm"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yukaii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T04:19:34.000Z","updated_at":"2025-03-17T15:55:49.000Z","dependencies_parsed_at":"2024-11-05T14:40:19.543Z","dependency_job_id":null,"html_url":"https://github.com/Yukaii/hx-utils","commit_stats":null,"previous_names":["yukaii/hx-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Fhx-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Fhx-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Fhx-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yukaii%2Fhx-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yukaii","download_url":"https://codeload.github.com/Yukaii/hx-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837287,"owners_count":21169374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helix","shell-scripts","tmux","wezterm"],"created_at":"2024-10-16T07:40:22.418Z","updated_at":"2026-02-27T18:11:04.131Z","avatar_url":"https://github.com/Yukaii.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hx-utils\n\nhx-utils is a collection of utility scripts designed to enhance the Helix editor experience, particularly when used with terminal multiplexers like tmux or WezTerm.\n\n## Acknowledgements\n\nThis project was inspired by and initially based on the work of Quan Tong Anh:\n\n- Original scripts: [helix-wezterm](https://github.com/quantonganh/helix-wezterm)\n- Blog post: [Turning Helix into an IDE with the help of WezTerm and CLI tools](https://quantonganh.com/2023/08/19/turn-helix-into-ide.md)\n\nThe original scripts have been significantly modified and extended to support multiple terminal multiplexers and provide additional functionality.\n\n## Features\n\n- Open files in Helix from the terminal\n- Integrate Helix with other tools (git blame, file explorer, fuzzy finder, web browser)\n- Cross-multiplexer window management (supports tmux and WezTerm)\n- Fuzzy file search and opening\n- Git file and changed file listing\n- Web browsing integration for files at specific line numbers\n- Harpoon-liked bookmark jumping feature\n\n## Screenshots\n\nFile explorer with broot\n\nhttps://github.com/user-attachments/assets/d193c18e-81c4-4bbd-98fc-c170ac34602e\n\nTUI apps integrations\n![winmux-lazygit](./docs/images/winmux-lazygit.png)\n\nfzf git files\n![fzf-git-files](./docs/images/fzf-git-files.png)\n\nHarpoon-liked quick jumping\n\nhttps://github.com/user-attachments/assets/ee79e402-c172-4e0c-998d-69d903a5ad3e\n\n## Prerequisites\n\n- Helix editor\n- Either tmux or WezTerm\n- ripgrep (rg)\n- fzf\n- bat\n- Git\n- `broot` (for the file explorer functionality)\n- `gh` (GitHub CLI for browsing files in a web browser)\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Yukaii/hx-utils.git\n   cd hx-utils\n   ```\n\n2. Run the setup script:\n\n   ```bash\n   ./setup.sh\n   ```\n\n   This script will check for dependencies, install the utilities, and add them to your PATH.\n\n## Usage\n\n### Example Helix Configuration\n\nBelow is an example configuration for integrating hx-utils with Helix.\n\n```toml\n# Terminal actions\n[keys.normal.space.t]\nb = \":sh winmux sp fish \u003e /dev/null\"\nB = \":sh hx-utils blame \u003e /dev/null\"\nl = \":sh winmux popup lazygit \u003e /dev/null\"\n\n[keys.normal.space]\ne = \":sh hx-utils explorer \u003e /dev/null\"\n\n[keys.normal.space.f]\ng = \":sh hx-utils git-files \u003e /dev/null\"\nw = \":sh hx-utils grep \u003e /dev/null\"\nd = \":sh hx-utils git-changed-files \u003e /dev/null\"\n\n# Harpoon mode\n[keys.normal.space.o]\nl = \":sh hx-utils harpoon list\"\na = \":sh hx-utils harpoon add\"\nd = \":sh hx-utils harpoon remove\"\n1 = \":sh winmux -p 1 sp 'hx-utils harpoon open 1'\"\n2 = \":sh winmux -p 1 sp 'hx-utils harpoon open 2'\"\n3 = \":sh winmux -p 1 sp 'hx-utils harpoon open 3'\"\n4 = \":sh winmux -p 1 sp 'hx-utils harpoon open 4'\"\n5 = \":sh winmux -p 1 sp 'hx-utils harpoon open 5'\"\n6 = \":sh winmux -p 1 sp 'hx-utils harpoon open 6'\"\n7 = \":sh winmux -p 1 sp 'hx-utils harpoon open 7'\"\n8 = \":sh winmux -p 1 sp 'hx-utils harpoon open 8'\"\n9 = \":sh winmux -p 1 sp 'hx-utils harpoon open 9'\"\n```\n\n### hx-utils Commands\n\nThe main utility script `hx-utils` provides several subcommands:\n\n- **open**: Opens a file in Helix, with options for split direction, pane type, and size.\n- **blame**: Displays Git blame information for the current file.\n- **explorer**: Opens a file explorer using `broot` and integrates with tmux or WezTerm.\n- **grep**: Performs a search using `ripgrep` within the project.\n- **browse**: Opens the current file at the specified line in a web browser using `gh browse`.\n- **git-files**: Lists files tracked by Git.\n- **git-changed-files**: Lists files that have changed in Git.\n\n```bash\nhx-utils open [FILE]\nhx-utils blame\nhx-utils explorer\nhx-utils grep\nhx-utils browse\nhx-utils git-files\nhx-utils git-changed-files\n```\n\n### Subcommands Overview\n\n- **open**: Opens files in Helix, with options to control how the file is opened within the editor.\n\n  ```bash\n  hx-utils open [FILE] [DIRECTION] [SPLIT] [PERCENT]\n  ```\n\n  Options:\n\n  - `FILE`: The file to open.\n  - `DIRECTION`: The direction to split the pane (default: right).\n  - `SPLIT`: The type of split ('v' for vertical, 'h' for horizontal, default: vertical).\n  - `PERCENT`: The percentage size of the pane (default: 80%).\n\n- **blame**: Displays Git blame information for the current file in a pane.\n\n  ```bash\n  hx-utils blame\n  ```\n\n- **explorer**: Opens a file explorer using `broot` with integration for tmux or WezTerm.\n\n  ```bash\n  hx-utils explorer\n  ```\n\n- **grep**: Searches for a pattern using `ripgrep` and displays the results.\n\n  ```bash\n  hx-utils grep [PATTERN]\n  ```\n\n- **browse**: Opens the current file and line number in the web browser using GitHub’s `gh browse`.\n\n  ```bash\n  hx-utils browse\n  ```\n\n- **git-files**: Lists all files tracked by Git.\n\n  ```bash\n  hx-utils git-files\n  ```\n\n- **git-changed-files**: Lists all files changed in the current Git branch.\n\n  ```bash\n  hx-utils git-changed-files\n  ```\n\n### winmux\n\nA cross-multiplexer window management utility. It supports both tmux and WezTerm for managing windows and panes.\n\n```bash\nwinmux [OPTION]... [COMMAND] [ARGS]...\n```\n\nOptions:\n\n- `-m, --mode`: Set the mode to 'tmux' or 'wezterm'.\n- `-p, --percent`: Set the size of the panel as a percentage.\n- `-h, --help`: Display help and exit.\n\nCommands:\n\n- `vsp`: Split vertically.\n- `sp`: Split horizontally.\n- `focus-left`, `focus-right`, `focus-up`, `focus-down`: Focus on adjacent panes.\n- `popup`: Create a popup window.\n\n### hx-open\n\n`hx-open` is a standalone script designed to open files in the Helix editor from the terminal or other programs. It supports both tmux and WezTerm terminal multiplexers.\n\n#### Usage\n\n```bash\nhx-open [OPTIONS] [FILE]\n```\n\n#### Options\n\n- `-m, --mode [tmux|wezterm]`: Specify the multiplexer mode. Auto-detected if not specified.\n- `-d, --direction [DIRECTION]`: Specify the pane direction ('top', 'bottom', 'left', 'right'). Default is 'right'.\n- `-s, --split [TYPE]`: Specify the split type ('v' for vertical, 'h' for horizontal, 'none' for no split).\n- `-p, --percent [PERCENT]`: Specify the default panel size percentage. Default is 80%.\n- `-h, --help`: Display help and exit.\n\n## Updating\n\nTo update hx-utils to the latest version:\n\n1. Pull the latest changes from the repository:\n\n   ```bash\n   git pull origin main\n   ```\n\n2. Run the update script:\n\n   ```bash\n   make update\n   ```\n\n## Uninstalling\n\nTo uninstall hx-utils:\n\n```bash\nmake uninstall\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukaii%2Fhx-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyukaii%2Fhx-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyukaii%2Fhx-utils/lists"}