# littledb

> The littlest key-value database

Latest version **1.0.8** (published 2026-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install littledb
pnpm add littledb
yarn add littledb
bun add littledb
```

Provides the command `littledb`.

## Health

**Score 50/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2026-07-28 |
| First published | 2018-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Tomas Slusny |
| Maintainers | deathbeam |
| Keywords | nosql, database, json |

## Links

- npm: https://www.npmjs.com/package/littledb
- Repository: https://github.com/deathbeam/littledb
- Homepage: https://github.com/deathbeam/littledb#readme
- Issues: https://github.com/deathbeam/littledb/issues
- npm.io page: https://npm.io/package/littledb

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.8 (latest) — 2026-07-28
- 1.0.7 — 2022-01-16
- 1.0.6 — 2022-01-16
- 1.0.5 — 2018-07-16
- 1.0.4 — 2018-07-16
- 1.0.3 — 2018-07-16
- 1.0.0 — 2018-07-16

## README

# littledb [![Build Status](https://travis-ci.org/deathbeam/littledb.svg?branch=master)](https://travis-ci.org/deathbeam/littledb)

`littledb` is the littlest key-value database possible based on this
awesome [gist](https://gist.github.com/brandonb927/9587436).

`littledb` consists of simple JavaScript API to `put`/`get` and `ls`
to/from database and simple database server.

To run server, simply install package and run

```bash
littledb 80 # without passing some available port will be chosen
```

or in node.js
```javascript
const port = 80
require('littledb')().listen(port)
```

Then you can simply access it with `curl`:


```sh
# save key
curl -d "key;value" localhost  
# save array
curl -d "key;value;value;value" localhost  
# show keys
curl -d "ls" localhost  
# get value
curl -d "key" localhost  
# delete key
curl -d "key;" localhost
```

To create simple client:

```javascript
const path = './db.json' // this is default path, not required to be passed
const db = require('littledb')(path)

db.put('hello', 'world') // => "world"
db.get('hello')          // => "world"
db.ls()                  // => [ "hello" ]
db.put('hello')          // => undefined
db.get('hello')          // => undefined
```

---
_Source: https://npm.io/package/littledb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
