Skip to content

Repository files navigation

Andrew L. Toolkit

A monorepo of focused, production-grade TypeScript packages for building Node.js services, CLI tools, and web applications. Each package is independently versioned, tree-shakeable, and ships with full type definitions.

Documentation · Issues

Overview

This repository collects libraries developed and refined across years of building production systems. They share a few guiding principles:

  • Small surface area — each package solves one problem well and stays out of your way.
  • No hidden runtime cost — minimal dependencies, no global state, tree-shakeable ESM builds.
  • Type-first — APIs are designed around TypeScript inference, not bolted on after.
  • Composable — packages are independent; pick what you need.

Packages

Application & Runtime

PackageDescription
@andrew_l/appDefine application entry points with typed props, lifecycle hooks, and workers. Ships with the vrun CLI for single-file execution, watch mode, worker threads, and multi-app orchestration.
@andrew_l/gracefulCoordinated shutdown for long-running processes — register cleanup hooks, handle signals, and ensure resources drain before exit.
@andrew_l/contextComposition-API-style context for Node.js. Share state and dependencies across async boundaries without prop drilling.
@andrew_l/iocMinimal IoC container — constructor injection, scoped lifetimes, no decorators required.
@andrew_l/service-actorCarry per-request data (trace IDs, user context, tenant) across function calls without threading it manually through every signature.

Core Utilities

PackageDescription
@andrew_l/toolkitThe general-purpose utility library — promise helpers, schedulers, type guards, encoding, paths, and more. The foundation most other packages build on.
@andrew_l/domBrowser utilities for animations, clipboard interaction, and smooth scrolling.

Logging & Diagnostics

PackageDescription
@andrew_l/binlogHigh-throughput binary logging for Node.js — structured records, low overhead, suitable for hot paths.
@andrew_l/pino-prettyA Pino transport for human-readable, colorized log output.

Data, Encoding & IDs

PackageDescription
@andrew_l/tl-packCompact binary serialization format with a typed schema.
@andrew_l/snowflakeSnowflake-style 64-bit ID generator — sortable, distributed-friendly, dependency-free.
@andrew_l/search-query-languageParse human-readable search strings (e.g. status:open author:alice) into structured ASTs.

MongoDB

PackageDescription
@andrew_l/mongo-paginationCursor-based pagination that avoids the pitfalls of offset/skip — stable across writes, consistent under load.
@andrew_l/mongo-transactionManage side effects inside MongoDB transactions — automatic rollback on failure and idempotency on retries.

Terminal UI

PackageDescription
@andrew_l/vue-stdoutVue renderer for the terminal — build interactive CLIs with components, flexbox layouts, and reactive state.

Getting Started

Each package is published to npm under the @andrew_l/* scope and installs independently:

npm install @andrew_l/toolkit
# or
pnpm add @andrew_l/app

For example, to scaffold a runnable application with typed CLI flags:

// server.app.tsimport{defineApp}from'@andrew_l/app';exportdefaultdefineApp({name: 'server',props: {port: {type: Number,default: ()=>3000},},entry(props){console.log(`listening on :${props.port}`);},});
npx vrun server.app.ts --port 8080

See each package's README and the documentation site for full API references and examples.

Development

This repository is managed with pnpm workspaces.

pnpm install # install dependencies
pnpm build # build all packages
pnpm test# run the full test suite
pnpm --filter @andrew_l/app dev # work on a single package

Acknowledgements

Many of the utilities in this repository are inspired by, or adapted from, work in the broader open-source community. Credit is given in individual package READMEs where applicable. This collection is a continuation of that effort — thank you to everyone whose work made it possible.

License

MIT

About

My own collection of utility functions for JavaScript

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages