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

hascii

v0.1.1

Published

YAML-based fantasy console for the terminal

Readme

YAML ベースのファンタジーコンソール。ターミナルで動作する。

Install

bun add -g hascii

Usage

# TUI コンソールを起動
hascii

# カートリッジファイルを実行
hascii game.yaml

# エディタで開く
hascii -e game.yaml

Controls

| Key | Action | |-----|--------| | Arrow keys / WASD | Move | | Z / J | Action A (confirm) | | X / K | Action B (cancel) | | ESC | Exit / Back |

Specs

| Item | Value | |------|-------| | Screen | 80x22 | | Colors | 16 (0-15) | | SFX | 16 slots | | Patterns | 8 slots | | Channels | 4ch | | Waveforms | TRI, SAW, SQR, PLS, ORG, NOI, PHA, SIN | | Octave | 2-5 | | Volume | 0-7 |

Language

Hascii は YAML で記述する宣言的なゲーム言語。Elm アーキテクチャ (init/update/draw) に基づいている。

# yaml-language-server: $schema=hascii/hascii.schema.json

meta:
  title: "GAME"
  frame: 10
  bg: 0

init:
  x: 40
  y: 10
  score: 0

update:
  - if: btn.left
    set: { x: { sub: [x, 1] } }
  - if: btn.right
    set: { x: { add: [x, 1] } }

draw:
  - cls:
  - fill: 10
  - rect: [x, y, 2, 1]
  - stroke: 7
  - print: [score, 0, 0]

meta

ゲームのメタデータを定義する。

| Key | Description | |-----|-------------| | title | ゲームタイトル | | frame | フレームレート (1-60) | | bg | 背景色 (0-15) |

init

ゲーム開始時の初期状態を定義する。ここで定義した変数は update と draw から参照できる。

init:
  x: 40
  y: 10
  items: [1, 2, 3]
  player: { hp: 100, mp: 50 }

update

毎フレーム実行されるロジックを定義する。状態を変更するには set を使う。

update:
  # 変数を設定
  - set: { x: 10, y: 20 }

  # 条件付き (短縮形)
  - if: condition
    set: { x: 0 }

  # 条件付き (then/else)
  - if: condition
    then:
      - set: { x: 1 }
    else:
      - set: { x: 0 }

  # ループ
  - each: items
    as: item
    index: i
    do:
      - set: { score: { add: [score, item] } }

  # 配列操作
  - push: { to: arr, item: value }
  - filter:
      list: arr
      as: item
      cond: { gt: [item, 0] }

draw

毎フレームの描画処理を定義する。

draw:
  - cls:                    # 画面クリア
  - fill: 10                # 塗りつぶし色 (0-15)
  - stroke: 7               # 線の色 (0-15)
  - noFill:                 # 塗りつぶし無効
  - noStroke:               # 線無効
  - rect: [x, y, w, h]      # 矩形
  - circ: [x, y, r]         # 円
  - print: [text, x, y]     # テキスト

Expressions

式は { operator: [args] } の形式で記述する。

| Expression | Description | |------------|-------------| | { add: [a, b] } | 加算 | | { sub: [a, b] } | 減算 | | { mul: [a, b] } | 乗算 | | { div: [a, b] } | 除算 | | { mod: [a, b] } | 剰余 | | { min: [a, b] } | 最小値 | | { max: [a, b] } | 最大値 | | { rnd: [min, max] } | 乱数 (整数) | | { abs: n } | 絶対値 | | { floor: n } | 切り捨て | | { eq: [a, b] } | 等価 (0 or 1) | | { lt: [a, b] } | 小なり | | { gt: [a, b] } | 大なり | | { and: [a, b, ...] } | 論理 AND | | { or: [a, b, ...] } | 論理 OR | | { not: a } | 論理 NOT | | { at: [arr, i] } | 配列アクセス | | { len: arr } | 配列の長さ |

Input

入力状態は組み込み変数で参照する。

| Variable | Description | |----------|-------------| | btn.left | 左キー押下中 | | btn.right | 右キー押下中 | | btn.up | 上キー押下中 | | btn.down | 下キー押下中 | | btn.a | Z キー押下中 | | btn.b | X キー押下中 | | btnPressed.left | 左キー押した瞬間 | | btnPressed.right | 右キー押した瞬間 | | btnPressed.up | 上キー押した瞬間 | | btnPressed.down | 下キー押した瞬間 | | btnPressed.a | Z キー押した瞬間 | | btnPressed.b | X キー押した瞬間 |

Editor

TUI コンソールにはエディタが内蔵されている。

| Tab | Description | |-----|-------------| | CODE | YAML ソース編集 | | SPRITE | (未実装) | | MAP | (未実装) | | SFX | 効果音エディタ | | TRACKER | 4ch 音楽トラッカー | | PLAY | ゲームプレビュー | | DATA | セーブデータ | | QUIT | エディタ終了 |

License

MIT