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

@awarebydefault/carte

v0.22.0

Published

A concurrent React renderer for ultra-low-latency terminal applications.

Readme

Carte

A concurrent React renderer for terminal applications, full-screen on the alternate screen or inline in the main one. Yoga flexbox layout, a terminal-native host tree, focus and input management, and cell-level updates into a packed, double-buffered screen.

bun add @awarebydefault/carte react
import {Box, Input, render, Text} from '@awarebydefault/carte'

function App() {
  return (
    <Box
      borderLabel="Profile"
      style={{flexDirection: 'column', borderStyle: 'round', padding: 1}}
    >
      <Text>Name</Text>
      <Input placeholder="Ada Lovelace" autoFocus />
    </Box>
  )
}

const {waitUntilExit} = render(<App />)
await waitUntilExit()

Bun >=1.3.14, React ^19.2.0. Pre-release: the API is still being reshaped.

Documentation

| | | | --- | --- | | Getting started | Install to a tested application, and the traps on the way | | Reference | Every component, prop, style, hook, event, binding, and option | | Writing tests | The three tiers, and why waiting is about the screen rather than the clock | | How it works and why | The architecture, the constraints, and what is deliberately out of scope |

package.json declares repository.directory, so npm resolves these against the repository — they work from the package page and from a checkout alike.

What it is

Not a browser. There is no DOM, no CSS, and no HTML. div, span, and input are rejected at reconciliation, because a terminal has nothing to render them onto. Applications compose Box, Text, Input, Textarea, ScrollBox, and the rest of Carte's primitives, and styles are a bounded Yoga subset plus terminal SGR attributes passed as an object.

Real React. Function and class components, hooks, context, refs, keyed reconciliation, fragments, controlled components, external stores, Suspense, transitions, error boundaries, and portals all work. render() returns a root with rerender(), asynchronous unmount(), flushSync(), and batchedUpdates(). Await unmount() when shutting down programmatically, so React effects are cleaned up before terminal modes are restored.

Either screen. By default Carte takes the alternate screen and gives it back untouched on exit. Where that screen is not available — output redirected to a pipe, a terminal calling itself dumb, or one that answers that it does not know mode 1049 — it draws an inline block at the cursor instead, leaving scrollback intact. Pass screen: 'alternate' or screen: 'inline' to decide for yourself; an application that names one is never overridden.

The keyboard through actions. A binding maps a chord to an action name and the application handles the action, so a user can remap it and a help overlay can list it. KeybindingScope defaults to focus-tree scoping — bindings apply only while focus is below the scope — and global covers application-wide navigation and modal UI.

<KeybindingScope context="Navigation" global>
  <App />
</KeybindingScope>

Three chords are reserved and cannot be rebound: Ctrl+C, Ctrl+D, and Ctrl+M, the last because it is Enter at the byte level. What Carte binds by default is smaller and yours to take back — Ctrl+C to interrupt, Ctrl+D to exit, Ctrl+L to redraw. Every other command is the application's.

Subpaths

| Import | Holds | | --- | --- | | @awarebydefault/carte | Components, hooks, render, and the types an application needs | | @awarebydefault/carte/testing | The test harness; /testing/e2e for a real terminal | | @awarebydefault/carte/highlight | Syntax grammars for CodeBlock and Markdown, in their own bundle | | @awarebydefault/carte/devtools | Opening a running application to an inspector | | @awarebydefault/carte/adapters/* | Bridges to packages that expect a browser | | @awarebydefault/carte/core | The renderer's internals, for integrations that reach past the components |

Each is its own bundle, so importing the root carries none of the others.

Licence

MIT.