Skip to main content

beachcomber

Obsessively fastµs cache engine.
Lightspeed shells, reduced load.
Store anything, automate everything.

GitHub Starscrates.io downloadsnpm downloadsPyPI downloads

BCBefore Comb

answers
0
processes spawned
0
each answer
30.900ms
spent waiting
0.000s

ADAfter Daemon

answers
0
processes spawned
0
each answer
0.015ms
spent waiting
0.000s

Obsessively fastµs cache engine.
Lightspeed shells, reduced load.
Store anything, automate everything.

Your terminal is doing insane amounts of duplicate work

Every prompt runs its own git status. Every tmux pane forks a shell on a timer to read the battery. Your editor watches the same files as your prompt framework. They all ask what branch you're on, and none of them share the answer.

Ten tmux windows split three ways is thirty shells: thirty git daemons, hundreds of threads, and fseventsd handing every change in .git to thirty watchers.

beachcomber works it out once, and every tool reads the same answer.

0

answers from beachcomber in the time gitstatus gives one

Obsessive about speed

gitstatus daemon
30.9ms
raw git status
5.6ms
beachcomber
36µs
One read each, slowed down 100×
Without beachcomber
960 threads
30 shells, each running gitstatusd
500 forks / 10s
tmux status bars reading battery, host and git
2.5s CPU
wasted a minute on duplicate queries
With beachcomber
1 daemon
serving every shell, editor and status bar
36µs reads
client to daemon and back, on an M2 Max
45k req/s
sustained, on a single socket

How it works

One daemon watches your directories and runs each provider when its files change or its timer fires, keeping the answers in memory. Every tool reads them over a Unix socket.

$ comb g git.branch .
main← from the cache
$ comb g battery.percent
85
$ comb s
{"cache_entries": 12, "active_watchers": 3, "demand": 8}

16 built-in providers

git
~5.6ms
branchdirtystagedunstagedaheadbehindstash
hostname
~400ns
user
~650ns
load
~550ns
uptime
~660ns
uname
<1µs
sudo
<1µs
gcloud_configs
<1µs
aws_profiles
<1µs
terraform
<1µs
python
<1µs
asdf
<1µs
direnv
varies
mise
varies
network
~2ms
battery
~6ms

Ecosystem

Integrations
zshbashfishtmuxneovimstarshippolybarwaybarsketchybaroh-my-posh
Client SDKs

All stdlib-only. Published to their native registries.

Get started

$ brew install navistau/tap/beachcomber