npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

busybar-flights

v1.2.0

Published

A flight on a BUSY Bar: the route across the strip with the aircraft moving along it, and the flight underneath

Readme

busybar-flights

[!IMPORTANT] Unofficial community project. Built and maintained by @viirtualp1, not an official Flipper Devices / BUSY product, and not affiliated with, endorsed by, or supported by them. "BUSY Bar" remains their trademark. For the real hardware and official apps, visit busy.app.

A flight on a BUSY Bar. The route runs the full width of the strip, the aircraft sits on it, and it moves as the flight does.

The front strip: the route, the aircraft on it, and the flight underneath

The back panel says the same thing at length — where from, where to, when, how high, how fast, and how much of it is behind you.

The back panel: flight number, route, times and the detail rows

Built on busybar-kit and happy under busybar-wm.

The idea

Sixteen pixels is two rows of the Bar's font, and this app spends the whole top row on a line and an aeroplane. Nothing else. Across a room the strip reads as "somewhere over the Atlantic, most of the way there"; up close the bottom row says which two airports and how much longer.

The aircraft is pixel art compiled into horizontal runs — seven rectangles on the front, nine on the back — so there is no asset to upload, nothing to clear between frames, and the offline preview draws exactly what the device does.

Quick start

npm install
cp .env.example .env
npm run dev

The timetable lives in flights.json next to the app — copy the example and edit. Nothing about it belongs in .env:

cp flights.example.json flights.json

Number, route, off-blocks, on-blocks, and optionally the aircraft. The times are local to their own airport. 19:30 is half past seven on the clock at Sheremetyevo and 04:45 is quarter to five at JFK — which is how they are printed on the boarding pass, so that is how they go in. The app supplies the offsets from the airport's zone, daylight saving included. Writing an explicit offset (2026-09-08T19:30+03:00) still works and overrides that; do that for an airport the built-in table does not know.

That is the whole app with no key, no account and no network. It is also what everything else falls back to.

A whole trip

flights.json is an array. One object per leg:

[
  {
    "number": "SU100",
    "route": "SVO-JFK",
    "departure": "2026-09-08 19:30",
    "arrival": "2026-09-09 04:45",
    "aircraft": "A359"
  },
  {
    "number": "DL412",
    "from": "JFK",
    "to": "LAX",
    "dep": "2026-09-09 08:15",
    "arr": "2026-09-09 11:40"
  }
]

FLIGHTS_FILE=trip.json points somewhere else instead of the default flights.json. A one-liner in .env still works for a single hop:

FLIGHTS=SU100 SVO-JFK 2026-09-08T19:30 2026-09-09T04:45 A359
  • route: "SVO-JFK" or from / to, whichever you prefer; dep / arr are accepted for the times.
  • A space where ISO 8601 wants a T is fine.
  • An element may also be the one-line syntax as a string, so the two forms mix in one array.
  • Order does not matter. Keep it nearest-first if you like reading it that way; the app sorts by the clock and shows whichever leg you are actually on.
  • One bad entry is reported by name at startup and skipped — the rest of the trip still flies.

Startup prints the timetable back, nearest departure first, which is where a mistyped date shows up:

Timetable (flights.json), 3 flight(s):
  SU 100  SVO-JFK  08 SEP 19:30 -> 09 SEP 04:45  in 4h 31m
  DL 412  JFK-LAX  09 SEP 08:15 -> 09 SEP 11:40  in 1d 0h
  SU 101  JFK-SVO  19 SEP 19:00 -> 20 SEP 11:30  in 11d 11h

flights.json is gitignored — it is your itinerary, not the project's.

Live data

A free key from aviationstack adds what a timetable cannot know — the delay, the gate, and where the aircraft actually is:

AVIATIONSTACK_KEY=...

The numbers to follow are read off the timetable, so there is nothing else to set. FLIGHT_NUMBERS=SU100, BA117 overrides that when you want to watch someone else's flight.

With both configured the live feed wins and the timetable stands behind it: a key that has run out of quota, or a network that has gone away, drops back to the schedule rather than dropping the frame.

[!NOTE] aviationstack stamps its timestamps +00:00 while the value itself is the local clock at that airport. This app re-anchors such a time using the airport's own zone, which is why a 19:30 Moscow departure shows as 19:30. AVIATIONSTACK_LOCAL_TIMES=0 takes the feed at its word instead.

Another provider is one file: implement FlightSource — start, read, stop — and hand back Flight[]. Everything above the source works in terms of that type and knows nothing about who filled it in.

Where the aircraft is

Three answers, in order of how much they are worth:

  1. Its position. With a live latitude and longitude, progress is the share of the great-circle journey behind you — distance flown ÷ (flown + to go). It stays in 0..1 by construction, and a detour around weather shifts it barely at all, which is the honest reading of "how far along am I".
  2. The clock. No position: the share of the planned block time that is spent.
  3. The status. Neither: nothing has moved before pushback and everything is behind you after landing.

Time remaining comes from the ground speed when there is one, because a headwind is real and the schedule is a guess.

Both ends of the route need coordinates for (1), and a flight API rarely sends them, so around a hundred airports are built in — coordinates, city name and IANA zone. Anything missing:

AIRPORTS_EXTRA=KJA:56.17,92.49,Krasnoyarsk,Asia/Krasnoyarsk

A route between two unknown airports still draws. It just places the aircraft by the clock.

Which flight

A trip is several legs and only one of them is happening. Whatever is in the air wins, then whatever leaves next (LEAD_MS, four hours by default), then — briefly — whatever just landed (TRAIL_MS), so a connection does not vanish the moment the wheels touch. A cancellation shows whenever it is today's.

Outside that window there is nothing to say, and the display is handed back to the Bar. A flight is a few hours in a week; this app is off for the rest of it, which is what makes it a good citizen under the window manager.

The LED blinks on the four things that change what you do: doors open, wheels up, wheels down, and the flight being cancelled out from under you. Nothing blinks for a flight that was already airborne when the app started.

Under busybar-wm

Nothing about the app changes — point it at the daemon and let the manifest start it:

{
  "name": "flights",
  "rank": 70,
  "cwd": "../busybar-flights",
  "command": "npm",
  "args": ["start"]
}

A high rank is safe here precisely because the app releases the screen when there is no flight: it takes the display for the hours that matter and gives it straight back.

Without a Bar

npm run shot renders the very frame the device would draw, to PNGs.

An aircraft moves about a pixel a minute, so waiting for one to cross the strip on real hardware takes as long as the flight does. Here the progress is an argument:

npm run shot -- --fixture --progress 0.9    # one frame, nine tenths of the way
npm run shot -- --strip 6                   # the whole flight as six frames
npm run shot                                # whatever is actually configured

--scale 8 and --out docs control the size and where they land.

Configuration

Everything is in .env.example. The ones worth knowing:

| | | | ---------------------- | --------------------------------------------------------------------- | | FLIGHTS_FILE | A JSON array of flights. Defaults to flights.json if it exists. | | FLIGHTS | One flight, inline. Optional — the short way in. | | AVIATIONSTACK_KEY | Live positions, delays and gates. | | FLIGHT_SOURCE | auto, aviationstack, schedule. | | LEAD_MS / TRAIL_MS | How early the flight takes the screen and how long it keeps it after. | | POLL_MS | How often the provider is asked. Minutes, not seconds. | | AIRPORTS_EXTRA | Airports the built-in table does not know. | | DRAW_PRIORITY | How hard this fights other apps for the display. |

Known edges

  • A timetable cannot know about a delay. Without a live source the aircraft is where the schedule says it should be, which is where it usually is and occasionally is not.
  • The airport table is a hundred airports, not nine thousand. A route it does not know falls back to the clock; AIRPORTS_EXTRA fixes it in one line.
  • aviationstack's free plan is billed in hundreds of requests a month. One request per tracked number per POLL_MS, so leaving three flights polling at fifteen seconds will exhaust it in a day.

Layout

src/flight/    what a flight is, who says so, and where along its route it is
src/view/      the frame as plain data — layout, palette, the aircraft's pixels
src/bar/       that frame as elements, and the one connection to the device
src/app.ts     two loops: the provider once a minute, the screen once a second

The geometry, the palette, the error taxonomy and the offline renderer are busybar-kit.

Scripts

npm run check   # lint + typecheck + test
npm run shot    # PNGs of both screens
npm start       # build and run

License

MIT