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 🙏

© 2024 – Pkg Stats / Ryan Hefner

xterminal

v2.1.9

Published

Build web-based cli interfaces

Downloads

321

Readme

Overview

Welcome to XTerminal!

This library provides a simple, lightweight and perfomant solution for creating interactive web-based command-line interfaces (CLIs) with ease in your web applications. It aims to be a minimalist dependency-free alternative to popular libraries like jquery.terminal, offering improved performance and a simplified approach.

Inspiration

This project draws inspiration from the powerful node:readline module in Node.js, which has proven to be a reliable and efficient tool for command-line interactions. Additionally, inspiration is derived from the versatility and functionality of xterm.js, a widely adopted library for web-based terminal emulators.

By combining the best features and ideas from these sources, this library aims to provide an accessible and performant solution for creating web-based CLIs that meet the needs of modern web applications.

Live Demo

There is a quick demo online: Try It Yourself.

Getting Started

Installation

To install xterminal, use npm:

npm install xterminal

alternatively use unpkg or jsdelivr.

Basic Usage

Import the package and create a new instance of the XTerminal class:

<link rel='stylesheet' href='https://unpkg.com/xterminal/dist/xterminal.css'>

<div id="app"></div>

<script src='https://unpkg.com/xterminal/dist/xterminal.umd.js'></script>

<script>
  const term = new XTerminal()
  term.mount('#app');
  term.write('Hello World!\n# ');
</script>

For more detailed information, please refer to the official documentation online.

Documentation

The complete documentation for XTerminal can be found here. It provides detailed information on installation, configuration, usage, and advanced features. You'll also find code examples and API references.

The full Public API for XTerminal can also be found within this TypeScript declaration file.

Showcase

Several projects that are using XTerminal are listed here. Feel free to open a pull request adding your project in this file.

Browser Support

Supporting wide range of browsers is the goal. Modern browsers, most specifically the latest versions of Chrome, Firefox, Safari, and Edge (for desktop and mobile devices) are supported.

Contributing

Thank you for checking out this awesome project. Any contributions to the project are appreciated, whether it's fixing bugs, adding new features, or improving documentation. To contribute, please follow these guidelines:

  • Issues: Before starting to work on a new feature or bug fix, please check the issue tracker to see if the task is already in progress or has been reported. If not, feel free to open a new issue to discuss the proposed changes or bug fixes.
  • Branching: Create a new branch for each feature or bug fix you are working on. Use clear descriptive branch names that reflect the purpose of your changes e.g. feature/events or bugfix/issue-1234.

Development

To get started with development, follow these steps:

Prerequisites

Setup

  1. Clone this repository: git clone https://github.com/henryhale/xterminal.git
  2. Navigate to the project directory: cd xterminal
  3. Install dependencies: pnpm install
  4. Start the development server: pnpm dev

Building the Library

To build the library, run pnpm build

This will generate the production-ready distribution files in the dist directory.

Related

  • chalk-dom - Chalk for the browser
  • inken - Terminal-like string styling for the browser
  • viteshell - A minimal bash-like shell implementation written in TypeScript

License

Copyright (c) 2023 Henry Hale.

Released under the MIT License.