open-index/open-npm huggingface dataset:
npm package: @stenodb/nest
Description: > ✍ Easy to use local JSON database for [Nest.js](https://nestjs.com)
Author: Vitalij Ryndin
Latest version: 4.0.1

# @stenodb/nest [![](https://img.shields.io/npm/v/@stenodb/nest)](https://www.npmjs.org/package/@stenodb/nest)

> ✍ Easy to use local JSON database for [Nest.js](https://nestjs.com)

## Install

```sh
npm install @stenodb/nest
```

```sh
yarn add @stenodb/nest
```

```sh
pnpm add @stenodb/nest
```

## Usage

```ts
// users.dto.ts
import { Exclude, Type } from 'class-transformer'
import { IsOptional, Length, Max, Min } from 'class-validator'

export class Users {
  @Type(() => CreateUserDto)
  users: CreateUserDto[] = []

  constructor(...users: CreateUserDto[]) {
    this.users = users
  }
}

export class CreateUserDto {
  @Exclude({ toPlainOnly: true })
  @IsOptional()
  id: number

  @Length(1, 20)
  name: string

  @Min(12)
  @Max(100)
  age: number

  constructor(id: number, name: string, age: number) {
    this.id = id
    this.name = name
    this.age = age
  }
}

// app.module.ts
import { resolve } from 'node:path'
import { Module } from '@nestjs/common'
import { StenoModule } from '@stenodb/nest'

@Module({
  imports: [
    StenoModule.register({
      path: resolve(process.cwd(), 'db')
    })
  ]
})
export class AppModule {}

// users.service.ts
import { Injectable, OnModuleInit } from '@nestjs/common'
import { StenoService, AsyncProvider } from '@stenodb/nest'
import { Users, CreateUserDto } from './users.dto'

@Injectable()
export class UsersService implements OnModuleInit {
  private usersProvider: AsyncProvider<Users>

  constructor(private readonly stenoService: StenoService) {}

  async onModuleInit(): Promise<void> {
    this.usersProvider = await this.stenoService.create(
      'users',
      Users,
      new Users(
        new CreateUserDto(1, 'John', 22)
      )
    )

    await this.usersProvider.read()
  }

  get users(): CreateUserDto[] {
    return this.usersProvider.data.users
  }
}
```

## Credits

- [steno](https://github.com/typicode/steno) - Specialized fast async file writer.
- [nest](https://github.com/nestjs/nest) - A progressive Node.js framework for building efficient and scalable server-side applications.
- [class-transformer](https://github.com/typestack/class-transformer) - Decorator-based transformation, serialization, and deserialization between objects and classes.

## License

MIT - [crashmax](https://github.com/crashmax-dev)
npm package: @stenodb/node
Description: ✍ Easy to use local JSON database
Author: Vitalij Ryndin
Latest version: 4.0.1

# @stenodb/node [![](https://img.shields.io/npm/v/@stenodb/node)](https://www.npmjs.org/package/@stenodb/node)

> ✍ Easy to use local JSON database for [Node.js](https://nodejs.org)

## Install

```sh
npm install @stenodb/node
```

```sh
yarn add @stenodb/node
```

```sh
pnpm add @stenodb/node
```

## Usage

```ts
// entities.ts
import { Type } from 'class-transformer'

export class Users {
  @Type(() => User)
  users: User[]

  constructor(...users: User[]) {
    this.users = users
  }
}

export class User {
  username: string

  @Type(() => Post)
  posts: Post[]

  constructor(username: string, ...posts: Post[]) {
    this.username = username
    this.posts = posts
  }

  addPost(post: Post) {
    this.posts.push(post)
  }
}

export class Post {
  title: string

  constructor(text: string) {
    this.title = title
  }
}

// index.ts
import 'reflect-metadata'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { AsyncAdapter, NodeProvider } from '@stenodb/node'
import { Users, User, Post } from './entities.js'

const path = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'db')
const initialData = new Users(new User('John Doe'))
const adapter = new AsyncAdapter('users', Users, initialData)
const provider = new NodeProvider({ path })
const db = await provider.create(adapter)

await db.read()
db.data?.users[0]?.addPost(new Post('Lorem ipsum'))
await db.write()
```

## Credits

- [steno](https://github.com/typicode/steno) - Specialized fast async file writer.
- [class-transformer](https://github.com/typestack/class-transformer) - Decorator-based transformation, serialization, and deserialization between objects and classes.

## License

MIT - [crashmax](https://github.com/crashmax-dev)
npm package: @stenodb/writer
Description: Specialized fast async file writer
Author: Typicode
Latest version: 4.0.1

# @stenodb/writer [![](https://img.shields.io/npm/v/@stenodb/writer)](https://www.npmjs.org/package/@stenodb/writer)

> Specialized fast async file writer

**Steno** makes writing to the same file often/concurrently fast and safe.

_https://en.wikipedia.org/wiki/Stenotype_

## Features

- ⚡ Fast (see benchmark)
- 🐦 Lightweight (~6kb)
- 👍 ⚛️ Safe: No partial writes (writes are atomic)
- 👍 🏁 Safe: No race conditions (writes are ordered even if they're async)

## Usage

```javascript
import { Writer } from '@stenodb/writer'

// Create a singleton writer
const file = new Writer('file.txt')

// Use it in the rest of your code
async function save() {
  await file.write('some data')
}
```

## Benchmark

`npm run benchmark` (see `src/benchmark.ts`)

```
Write 1KB data to the same file x 1000
  fs     :   62ms
  steno  :    1ms

Write 1MB data to the same file x 1000
  fs     : 2300ms
  steno  :    5ms
```

_Steno uses a smart queue and avoids unnecessary writes._

## License

MIT - [Typicode](https://github.com/typicode)
npm package: @stenway/reliabletxt-browser
Description: ReliableTXT helper methods for the browser environment
Author: Stefan John
Latest version: 1.1.0

﻿# ReliableTXT-Browser

## About this package

This package is the **browser-specific part** mentioned in the environment-independent **[reliabletxt](https://www.npmjs.com/package/@stenway/reliabletxt)** package (You will find more information there about ReliableTXT in general). The package currently just contains a simple helper class to easily create a downloadable file.

## Getting started

First get the **ReliableTXT-Browser package** installed with a package manager of your choice.
If you are using NPM just run the following command:
```
npm install @stenway/reliabletxt-browser
```
Create a ReliableTXTDocument and pass it to the static method **download** of the static ReliableTxtDownload class. Provide a file name as a second argument:
```ts
ReliableTxtDownload.download(new ReliableTxtDocument("Hello world"), "HelloWorld.txt")
```

You can see a similar package, which is the [wsv-browser](https://www.npmjs.com/package/@stenway/wsv-browser) package, in action in [this video](https://www.youtube.com/watch?v=aKAtPU1Faxk).

## Related packages

The [Stenway Text File Format Stack](https://www.youtube.com/watch?v=m7Z0mrcFeCg) defines a set of formats
that are built upon ReliableTXT. Check out the following related browser-packages:

* [WSV-Browser](https://www.npmjs.com/package/@stenway/wsv-browser)
* [SML-Browser](https://www.npmjs.com/package/@stenway/sml-browser)
* [TBL-Browser](https://www.npmjs.com/package/@stenway/tbl-browser)
npm package: @stenway/sml-browser
Description: SML helper methods for the browser environment
Author: Stefan John
Latest version: 1.1.0

﻿# SML-Browser

## About this package

This package is the **browser-specific part** mentioned in the environment-independent **[SML](https://www.npmjs.com/package/@stenway/sml)** package (You will find more information there about SML in general). The package currently just contains a simple helper class to easily create a downloadable file.

## Getting started

First get the **SML-Browser package** installed with a package manager of your choice.
If you are using NPM just run the following command:
```
npm install @stenway/sml-browser
```
Create an SmlDocument and pass it to the static method **download** of the static SmlDownload class. Provide a file name as a second argument:

```ts
SmlDownload.download(SmlDocument.parse("Begin\n\tAttribute 123 #Comment\nEnd"), "Test.sml")
```

You can see a similar package, which is the [wsv-browser](https://www.npmjs.com/package/@stenway/wsv-browser) package, in action in [this video](https://www.youtube.com/watch?v=aKAtPU1Faxk).

## Related packages

The [Stenway Text File Format Stack](https://www.youtube.com/watch?v=m7Z0mrcFeCg) defines a set of formats
that are built upon SML. Check out the following related browser-packages:

* [TBL-Browser](https://www.npmjs.com/package/@stenway/tbl-browser)
npm package: @stenway/tbl-browser
Description: TBL helper methods for the browser environment
Author: Stefan John
Latest version: 1.1.0

﻿# TBL-Browser

## About this package

This package is the **browser-specific part** mentioned in the environment-independent **[TBL](https://www.npmjs.com/package/@stenway/tbl)** package (You will find more information there about TBL in general). The package currently just contains a simple helper class to easily create a downloadable file.

## Getting started

First get the **TBL-Browser package** installed with a package manager of your choice.
If you are using NPM just run the following command:
```
npm install @stenway/tbl-browser
```
Create a TblDocument and pass it to the static method **download** of the static TblDownload class. Provide a file name as a second argument:

```ts
TblDownload.download(TblDocument.parse("Table\nColumn1 Column2\nValue1 Value2\nEnd"), "Test.tbl")
```
npm package: @stenway/tbl-io
Description: Read and write TBL files
Author: Stefan John
Latest version: 1.1.0

﻿# TBL-IO

## About this package

This package is the **Node.js-specific part** mentioned in the environment-independent **[TBL](https://www.npmjs.com/package/@stenway/tbl)** package (You will find more information there about TBL in general). This package uses Node.js's **file system module** and offers simple classes to load and save TBL files. It offers stream reader and writer classes to read and write TBL files row-by-row.

## Getting started

First get the **TBL-IO package** installed with a package manager of your choice.
If you are using NPM just run the following command:
```
npm install @stenway/tbl-io
```

Import the static TblFile class and use the static method saveSync to save a TBL file
synchronously. Load the TBL file with the static method loadSync:

```ts
import { TblDocument } from "@stenway/tbl"
import { TblFile } from "@stenway/tbl-io"

let filePath = "Test.tbl"
TblFile.saveSync(TblDocument.parse("Table\nColumn1 Column2\nValue1 Value2\nEnd"), filePath)
console.log(TblFile.loadSync(filePath))
```

The synchronous versions of the method don't come with the Sync suffix. The scheme is analogous
to the concept in the **[SML-IO](https://www.npmjs.com/package/@stenway/sml-io)** package.

## BinaryTBL

BinaryTBL is the binary representation of TBL documents. It's based on BinarySML.
Use the static BinaryTblFile class to save and load TBL documents as BinaryTBL files:
```ts
let filePath = "Test.btbl"
BinaryTblFile.saveSync(TblDocument.parse("Table\nColumn1 Column2\nValue1 Value2\nEnd"), filePath)
const loadedDocument = BinaryTblFile.loadSync(filePath)
```
npm package: @stenway/wsv-browser
Description: WSV helper methods for the browser environment
Author: Stefan John
Latest version: 1.1.0

﻿# WSV-Browser

## About this package

This package is the **browser-specific part** mentioned in the environment-independent **[WSV](https://www.npmjs.com/package/@stenway/wsv)** package (You will find more information there about WSV in general). The package currently just contains a simple helper class to easily create a downloadable file.

## Getting started

First get the **WSV-Browser package** installed with a package manager of your choice.
If you are using NPM just run the following command:
```
npm install @stenway/wsv-browser
```
Create a WsvDocument and pass it to the static method **download** of the static WsvDownload class. Provide a file name as a second argument:

```ts
WsvDownload.download(WsvDocument.parse("Value11 Value12\nValue21"), "Test.wsv")
```

You can see this package in action in [this video](https://www.youtube.com/watch?v=aKAtPU1Faxk).

## Related packages

The [Stenway Text File Format Stack](https://www.youtube.com/watch?v=m7Z0mrcFeCg) defines a set of formats
that are built upon WSV. Check out the following related browser-packages:

* [SML-Browser](https://www.npmjs.com/package/@stenway/sml-browser)
* [TBL-Browser](https://www.npmjs.com/package/@stenway/tbl-browser)
npm package: @stenyliu/claude-statusline
Description: A status line for Claude Code CLI showing model, context usage, rate limits, and more
Author: Steny Liu
Latest version: 1.1.2

# claude-statusline

Configure your Claude Code statusline to show limits, directory and git info

![demo](./.github/demo.png)

## Install

Run the command below to set it up

```bash
npx @stenyliu/claude-statusline
```

It backups your old status line if any and copies the status line script to `~/.claude/statusline.sh` and configures your Claude Code settings.

## Requirements

- [jq](https://jqlang.github.io/jq/) — for parsing JSON
- git — for branch info

> **Note:** Rate limit data (5-hour and 7-day windows) is read directly from the native `rate_limits` field provided by Claude Code v2.1.80+. No OAuth token or extra API calls required.

On macOS:

```bash
brew install jq
```

## Uninstall

```bash
npx @kamranahmedse/claude-statusline --uninstall
```

If you had a previous statusline, it restores it from the backup. Otherwise it removes the script and cleans up your settings.

## Credits

Forked from [kamranahmedse/claude-statusline](https://github.com/kamranahmedse/claude-statusline).

## License

MIT