Easily share data between terminal windows!

Overview

abra GitHub release

A tool that makes data sharing between terminal windows easy.

abra can be used for displaying info about the current working directory, for splitting stdout and stderr and much more.

In the example below, whenever I cd into a different folder, another terminal window lists the files inside it.

File tree demo

Table of contents

Installation

The recommended way to install abra is by running:

cargo install kadabra

You can also run:

brew install denisidoro/tools/abra

If these package managers aren't available, you can download a pre-compiled binary here and extract it to your $PATH.

Basic concepts

  • abra is built over Unix sockets
  • it can publish and subscribe to channels, manipulating text as necessary
  • no terminal multiplexers are necessary

Common use cases

Some abra calls are quite verbose, so the use of aliases is recommended.

File tree sidebar

Since this is a very common use case, abra provides a hook for you.

If you call the following...

eval "$(abra hook bash)" # If you use bash, add this to ~/.bashrc
eval "$(abra hook zsh)" # If you use zsh, add this to ~/.zshrc

Then you can open a new terminal window and call abra rx --channel pwd --cmd 'ls {}'.

Whenever you cd into a directory, the sidebar will reflect the changes.

Split stdout and stderr into different windows

Let's say that you want to run some tests but errors should appear in a different window.

You can use anonymous pipes with abra for that purpose:

Split demo

The commands are:

abra rx --channel test_out # window 1
abra rx --channel test_err # window 2
cargo test > >(abra tx --channel test_out) 2> >(abra tx --channel test_err) # window 3

Filter some output lines

Let'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:

abra rx --channel filter --cmd 'echo "{}" | grep foo' # window 1
cat myfile.txt |& tee >(abra tx --channel filter) # window 2

Forcing colorized output

Some CLIs will detect that they are being piped and will hide color information by default.

To circumvent this, each CLI may offer different parameters: --color=always and export COLORTERM=truecolor are some examples.

In 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 '<your command>'.

Advantages over named pipes

In theory, you could run the following to achieve similar results:

mkfifo tmp
tail -f tmp
echo foo > tmp # in another window

That said:

  • with abra you don't need to worry about creating/removing named pipes
  • echo foo > tmp is blocking in case tmp isn't open for reading
    • abra tx will terminate immediately if there's no abra rx process
  • you can have many abra rx windows reacting to the same abra tx call
  • abra is cross-platform
    • to correctly create temporary named pipes you need to write platform-specific code

Similar tools

Etymology

Abra is a Pokémon who is able to teleport.

Comments
  • Bump ctrlc from 3.1.7 to 3.1.9

    Bump ctrlc from 3.1.7 to 3.1.9

    Bumps ctrlc from 3.1.7 to 3.1.9.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Bump anyhow from 1.0.37 to 1.0.40

    Bump anyhow from 1.0.37 to 1.0.40

    Bumps anyhow from 1.0.37 to 1.0.40.

    Release notes

    Sourced from anyhow's releases.

    1.0.40

    • Reduce memory footprint of errors on Rust versions 1.51+ (#145)

    1.0.39

    • Add an opt-in implementation of Error::backtrace on stable compilers based on the backtrace crate (#143)

      [dependencies]
      anyhow = { version = "1.0", features = ["backtrace"] }
      

    1.0.38

    • Support using anyhow::Error in code executed by Miri (#134, thanks @thomcc)
    Commits
    • 704622f Release 1.0.40
    • 64ac0c0 Merge pull request #145 from dtolnay/addrof
    • ef08267 Eliminate functionally duplicate vtable methods on rustc 1.51+
    • 1295b1f Add additional builds on 1.50 and 1.51 validating addr_of codepath
    • be89adf Detect whether ptr::addr_of is supported by current compiler
    • ac64560 Switch object_ref return from real ref to Ref ptr
    • 2987c9b Ignore redundant_else pedantic clippy lint
    • 827bb9d Catch some warnings in addr_of-related codepaths
    • ce00418 Merge pull request #144 from dtolnay/ptr
    • 3c32aa7 Relax Sized bound on Own, Ref, Mut ptrs
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Bump thiserror from 1.0.23 to 1.0.24

    Bump thiserror from 1.0.23 to 1.0.24

    Bumps thiserror from 1.0.23 to 1.0.24.

    Release notes

    Sourced from thiserror's releases.

    1.0.24

    Commits
    • 1b0a849 Release 1.0.24
    • d81b746 Merge pull request 121 from Aaron1011/fix/source-span
    • 0fa679b Consistently use quote! when emitting 'source'
    • d0f521c Update ui test suite to nightly-2021-01-29
    • c09ddc2 Fix catching clippy warnings as CI failures
    • dc3c5c6 Resolve clippy filter_map_next pedantic lint
    • 25f0be5 Inform clippy of supported compiler version in clippy.toml
    • c0a56fe Opt in to pedantic clippy lints
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Bump rand from 0.8.0 to 0.8.3

    Bump rand from 0.8.0 to 0.8.3

    Bumps rand from 0.8.0 to 0.8.3.

    Changelog

    Sourced from rand's changelog.

    [0.8.3] - 2021-01-25

    Fixes

    • Fix no-std + alloc build by gating choose_multiple_weighted on std (#1088)

    [0.8.2] - 2021-01-12

    Fixes

    • Fix panic in UniformInt::sample_single_inclusive and Rng::gen_range when providing a full integer range (eg 0..=MAX) (#1087)

    [0.8.1] - 2020-12-31

    Other

    • Enable all stable features in the playground (#1081)
    Commits
    • 6ecbe26 Merge pull request #1089 from dhardy/work
    • 8821743 Prepare 0.8.3
    • fa615ef Feature gate choose_multiple_weighted on std
    • 22dec87 CI: more accurate no-default-feature and nightly test targets
    • 6a6b9fd Merge pull request #1087 from GautierMinster/fix_uniform_int_panic_on_full_in...
    • 2c9085a Bump to 0.8.2 and update changelog
    • 4e8c7a4 distributions/uniform: fix panic in gen_range(0..=MAX)
    • bda9974 Merge pull request #1083 from dhardy/work
    • 594aed8 seed_from_u64: use newpavlov's suggestion
    • eb4b8a4 Fix #1082 (seed_from_u64 with non multiple of 4)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Bump nix from 0.10.0 to 0.18.0

    Bump nix from 0.10.0 to 0.18.0

    Bumps nix from 0.10.0 to 0.18.0.

    Changelog

    Sourced from nix's changelog.

    [0.18.0] - 26 July 2020

    Added

    • Added fchown(2) wrapper. (#1257)
    • Added support on linux systems for MAP_HUGE_SIZE family of flags. (#1211)
    • Added support for F_OFD_* fcntl commands on Linux and Android. (#1195)
    • Added env::clearenv(): calls libc::clearenv on platforms where it's available, and clears the environment of all variables via std::env::vars and std::env::remove_var on others. (#1185)
    • FsType inner value made public. (#1187)
    • Added unistd::setfsuid and unistd::setfsgid to set the user or group identity for filesystem checks per-thread. (#1163)
    • Derived Ord, PartialOrd for unistd::Pid (#1189)
    • Added select::FdSet::fds method to iterate over file descriptors in a set. (#1207)
    • Added support for UDP generic segmentation offload (GSO) and generic receive offload (GRO) (#1209)
    • Added support for sendmmsg and recvmmsg calls (#1208)
    • Added support for SCM_CREDS messages (UnixCredentials) on FreeBSD/DragonFly (#1216)
    • Added BindToDevice socket option (sockopt) on Linux (#1233)
    • Added EventFilter bitflags for EV_DISPATCH and EV_RECEIPT on OpenBSD. (#1252)
    • Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage. (#1222)
    • CpuSet and UnixCredentials now implement Default. (#1244)
    • Added unistd::ttyname (#1259)
    • Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage for iOS and Android. (#1265)
    • Added support for TimerFd. (#1261)

    Changed

    • Changed fallocate return type from c_int to () (#1201)
    • Enabled sys::ptrace::setregs and sys::ptrace::getregs on x86_64-unknown-linux-musl target (#1198)
    • On Linux, ptrace::write is now an unsafe function. Caveat programmer. (#1245)
    • execv, execve, execvp and execveat in ::nix::unistd and reboot in ::nix::sys::reboot now return Result<Infallible> instead of Result<Void> (#1239)
    • sys::socket::sockaddr_storage_to_addr is no longer unsafe. So is

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

    You can always request more updates by clicking Bump now in your Dependabot dashboard.

    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 1
Owner
Denis Isidoro
Software Engineer
Denis Isidoro
IDP2P is a peer-to-peer identity protocol which enables a controller to create, manage and share its own proofs as well as did documents

IDP2P Experimental, inspired by ipfs, did:peer and keri Background See also (related topics): Decentralized Identifiers (DIDs) Verifiable Credentials

null 5 Oct 31, 2022
A library for easily creating WebRTC data channel connections in Rust

Cyberdeck A library for easily creating WebRTC data channel connections in Rust.

RICHΛRD ΛNΛYΛ 34 Nov 10, 2022
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

Autometrics ?? ✨ Autometrics is a macro that makes it trivial to add useful metrics to any function in your codebase. Easily understand and debug your

Fiberplane 341 Feb 6, 2023
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

A Rust macro that makes it easy to understand the error rate, response time, and production usage of any function in your code. Jump from your IDE to

Autometrics 462 Mar 6, 2023
Simple project to test grpc between ruby (client) and rust (server)

grpc-example Simple project to test grpc between ruby (client) and rust (server). Usage To simplify a lot this project uses docker and docker compose

Bruno Arueira 2 Oct 14, 2021
Build tool for custom setups of docker containers. Docker compose didn't offer enough, Kubernetes offered too much. Carbon is the in-between.

docker abstraction layer with added flair Fast travel: Tips Contributing How it works Installation Help This tool started its life as a way to make de

akhara 3 Nov 10, 2022
📊 Collect cloud usage data, so that it can be combined with impact data of Boavizta API.

cloud-scanner Collect aws cloud usage data, so that it can be combined with impact data of Boavizta API. ⚠ Very early Work in progress ! At the moment

Boavizta 10 Dec 7, 2022
Interactive bind/reverse PTY shell with Windows&Linux support implementation by Rust.

Cliws Lightweight interactive bind/reverse PTY shell with Windows&Linux support implementation by Rust. Features WebSocket Full pty support: VIM, SSH,

b23r0 215 Dec 3, 2021
🤖 brwrs is a new protocol running over TCP/IP that is intended to be a suitable candidate for terminal-only servers

brwrs is a new protocol running over TCP/IP that is intended to be a suitable candidate for terminal-only servers (plain text data). That is, although it can be accessed from a browser, brwrs will not correctly interpret the browser's GET request.

daCoUSB 3 Jul 30, 2021
It's like "docker stats" but with beautiful, real-time charts into your terminal. 📊

?? ds - Real-time Stats with Terminal Charts Visualize container stats with beautiful, real-time charts directly in your terminal. Why ds? Missing Cha

Rafael R. Camargo 5 Oct 3, 2023
The classic game of Pong, in your terminal, over ICMPv6!

icmpong The classic game of Pong, in your terminal, over ICMPv6! icmpong.mov How does this work? We are basically "using the ping command to send data

Ryan 3 Nov 9, 2023
Shotover: L7 data-layer proxy

Shotover: L7 data-layer proxy

null 64 Dec 16, 2022
A tcp proxy server/client which exchange the data in temp files

ftcp A tcp proxy server/client which exchange the data in temp files 通过在临时文件中交换数据来进行TCP代理的一个服务端/客户端 学校内网中有针对教学楼的防火墙导致教室电脑难以上网( 但学校内建有公共ftp服务器,因此就有了这个借

Daile Liu 2 Feb 17, 2022
Streaming data over unix sockets, in Rust

Unix-socket based client/server In order to dig into Sōzu channels, I had to dig into the workings of unix sockets. What this repo contains a small so

Emmanuel Bosquet 3 Nov 28, 2022
Export MacOS iMessage data + run iMessage Diagnostics

imessage-export This crate provides both a library to interact with iMessage data as well as a binary that can perform some useful read-only operation

Christopher Sardegna 10 Dec 30, 2022
An app which reads data from a serial port and serves it on a TCP port.

serial-to-tcp An app which reads data from a serial port and serves it on a TCP port. How to use Clone this repo and build the app as outlined below (

Mr. E 3 Oct 21, 2022
Rosenpass is a formally verified, post-quantum secure VPN that uses WireGuard to transport the actual data.

Rosenpass README This repository contains A description of the Rosenpass protocol The reference implementation of the protocol – the rosenpass tool A

Rosenpass 597 Mar 19, 2023
RDE1 (Rusty Data Exfiltrator) is client and server tool allowing auditor to extract files from DNS and HTTPS protocols written in Rust. 🦀

Information: RDE1 is an old personal project (end 2022) that I didn't continue development on. It's part of a list of projects that helped me to learn

Quentin Texier (g0h4n) 32 Oct 6, 2023
A tool to export TiDB database data to files in cases where the TiDB server can't be restored.

tidb-exporter TiDB uses RocksDB as default storage engine(in fact, TiKV uses it). tidb-exporter can export data from pure RocksDB data files even when

zz 7 Nov 1, 2023