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

aframe-xterm-component

v1.0.2

Published

Playing around with getting xterm.js working in Aframe VR

Readme

aframe-xterm-component

Render ANSI terminals in Web VR scenes.

Screenshot of the terminal

How it works:

Uses xterm.js for the terminal rendering logic.

Under the hood, xterm.js is rendering the terminal to a series of canvases. This component takes those canvases, merges them together, and sets your entity's material to point at the canvas.

From there you can write text to the terminal and respond to feedback.

Make sure to include the xterm.js dependency in addition to the component.

<link rel="stylesheet" href="//unpkg.com/[email protected]/dist/xterm.css" />
<script src="//unpkg.com/[email protected]/dist/xterm.js"></script>
<script src="//unpkg.com/aframe-xterm-component/aframe-xterm-component.js"></script>

Here's a quick example of how you can write to the component.

AFRAME.AFRAME.registerComponent('xterm-example', {
  dependencies: ['xterm'],
  init: function() {
    const message = 'Hello from \x1B[1;3;31mWebVR\x1B[0m !\r\n$ '

    const xterm = this.el.components['xterm']

    xterm.write(message)

    this.el.addEventListener('xterm-data', ({detail}) => {
      console.log('Got input from terminal', detail)
    })
  }
})

By default the terminal will render with 80 columns, and 25 rows (default size for windows command prompt). You can change this by setting it in the component options.

<a-entity
  xterm="rows: 4; cols: 20;"
></a-entity>

Theming

You can change the color scheme using the component parameters by adding properties that start with theme_. You can find a list of all theme options in the xterm.js documentation.

For example you can have a bright color scheme using this:

<a-entity
  xterm="
    theme_background: white;
    theme_foreground: black;"
></a-entity>

Running the example:

The example in index.html uses a Websocket to connect to a local Node.js server which creates a shell.

After cloning the repository somewhere, do the following:

npm install

node server.js

And then open localhost:8080/index.html in a WebVR browser in your headset. (Or in a regular browser if you just want to check it out in 3D)

Make sure you have a keyboard connected. I've tested it on the Google Daydream using Firefox Reality and the Logitech K380 BlueTooth keyboard.

You'll want to use a pointer of some sort to click on the terminal to give it keyboard focus.

On Android, I'm using the UserLAnd App in order to create an Ubuntu environment, and running the server from there.