{"id":16852547,"url":"https://github.com/denisidoro/abra","last_synced_at":"2025-03-22T06:30:52.942Z","repository":{"id":52878500,"uuid":"326767231","full_name":"denisidoro/abra","owner":"denisidoro","description":"Easily share data between terminal windows!","archived":false,"fork":false,"pushed_at":"2021-04-15T11:37:49.000Z","size":55,"stargazers_count":26,"open_issues_count":6,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T08:53:27.517Z","etag":null,"topics":["cli","rust","socket","unix"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denisidoro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null},"funding":{"github":"denisidoro"}},"created_at":"2021-01-04T18:01:45.000Z","updated_at":"2025-02-16T06:08:15.000Z","dependencies_parsed_at":"2022-08-23T04:30:16.213Z","dependency_job_id":null,"html_url":"https://github.com/denisidoro/abra","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fabra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fabra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fabra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisidoro%2Fabra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisidoro","download_url":"https://codeload.github.com/denisidoro/abra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918500,"owners_count":20531682,"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":["cli","rust","socket","unix"],"created_at":"2024-10-13T13:47:40.480Z","updated_at":"2025-03-22T06:30:52.552Z","avatar_url":"https://github.com/denisidoro.png","language":"Rust","funding_links":["https://github.com/sponsors/denisidoro"],"categories":[],"sub_categories":[],"readme":"# abra ![GitHub release](https://img.shields.io/github/v/release/denisidoro/abra?include_prereleases)\n  \nA tool that makes data sharing between terminal windows easy.\n\n**abra** can be used for displaying info about the current working directory, for splitting stdout and stderr and much more. \n\nIn the example below, whenever I `cd` into a different folder, another terminal window lists the files inside it.\n\n![File tree demo](https://user-images.githubusercontent.com/3226564/103572068-c2878400-4eaa-11eb-86e1-651748a2dcd5.gif)\n\nTable of contents\n-----------------\n\n   * [Installation](#installation)\n   * [Basic concepts](#basic-concepts)\n   * [Common use cases](#common-use-cases)\n   * [Advantages over named pipes](#advantages-over-named-pipes)\n   * [Forcing colorized output](#forcing-colorized-output)\n   * [Similar tools](#similar-tools)\n   * [Etymology](#etymology)\n\nInstallation\n------------\n\nThe recommended way to install **abra** is by running: \n```sh\ncargo install kadabra\n```\n\nYou can also run:\n```sh\nbrew install denisidoro/tools/abra\n```\n\nIf these package managers aren't available, you can download a pre-compiled binary [here](https://github.com/denisidoro/abra/releases/latest) and extract it to your `$PATH`.\n\nBasic concepts\n-----------------\n- **abra** is built over Unix sockets\n- it can publish and subscribe to channels, manipulating text as necessary\n- no terminal multiplexers are necessary\n\nCommon use cases\n-----------------\n\nSome **abra** calls are quite verbose, so the use of [aliases](https://github.com/denisidoro/abra/blob/master/shell/aliases.bash) is recommended. \n\n### File tree sidebar\n\nSince this is a very common use case, **abra** provides a hook for you. \n\nIf you call the following...\n\n```sh\neval \"$(abra hook bash)\" # If you use bash, add this to ~/.bashrc\neval \"$(abra hook zsh)\" # If you use zsh, add this to ~/.zshrc\n```\n\nThen you can open a new terminal window and call `abra rx --channel pwd --cmd 'ls {}'`.\n\nWhenever you `cd` into a directory, the sidebar will reflect the changes.\n\n### Split stdout and stderr into different windows\n\nLet's say that you want to run some tests but errors should appear in a different window.\n\nYou can use anonymous pipes with **abra** for that purpose:\n\n![Split demo](https://user-images.githubusercontent.com/3226564/103569522-383d2100-4ea6-11eb-8deb-c8450d8d66a9.png)\n\nThe commands are:\n```sh\nabra rx --channel test_out # window 1\nabra rx --channel test_err # window 2\ncargo test \u003e \u003e(abra tx --channel test_out) 2\u003e \u003e(abra tx --channel test_err) # window 3\n```\n\n### Filter some output lines\n\nLet's say you want to see the contents of a file in a window but show only the lines that contain \"foo\" in another window:\n\n```sh\nabra rx --channel filter --cmd 'echo \"{}\" | grep foo' # window 1\ncat myfile.txt |\u0026 tee \u003e(abra tx --channel filter) # window 2\n```\n\nForcing colorized output\n-------------\n\nSome CLIs will detect that they are being piped and will hide color information by default. \n\nTo circumvent this, each CLI may offer different parameters: `--color=always` and `export COLORTERM=truecolor` are some examples.\n\nIn some cases, you need to trick an application into thinking its stdout is a terminal, not a pipe. For these cases you can call `abra faketty --cmd '\u003cyour command\u003e'`.\n\n\nAdvantages over named pipes\n-------------\n\nIn theory, you could run the following to achieve similar results:\n```sh\nmkfifo tmp\ntail -f tmp\necho foo \u003e tmp # in another window\n```\n\nThat said:\n- with **abra** you don't need to worry about creating/removing named pipes\n- `echo foo \u003e tmp` is blocking in case `tmp` isn't open for reading\n   - `abra tx` will terminate immediately if there's no `abra rx` process\n- you can have many `abra rx` windows reacting to the same `abra tx` call\n- **abra** is cross-platform\n   - to correctly create temporary named pipes you need to write platform-specific code\n\nSimilar tools\n-------------\n\n- [tmux-sidebar](https://github.com/tmux-plugins/tmux-sidebar)\n\nEtymology\n---------\n\n[Abra](https://bulbapedia.bulbagarden.net/wiki/Abra_(Pok%C3%A9mon)) is a [Pokémon](https://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon) who is able to [teleport](https://bulbapedia.bulbagarden.net/wiki/Teleport_(move)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisidoro%2Fabra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisidoro%2Fabra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisidoro%2Fabra/lists"}