tinylib.json

tinylib.json sits at the top of the folder you publish and never ships with your app. npx tinylib-sdk dev and publish report each field that's wrong or unknown.

tinylib.json
{ "$schema": "https://cdn.jsdelivr.net/npm/tinylib-sdk@0.46.0/tinylib.schema.json", "slug": "chess", "name": "Chess", "description": "Live chess with a friend.", "icon": "icon.png" }

$schema

$schema?: string
The file's JSON schema. init writes it, and dev keeps it on the version of tinylib-sdk your app installs.

slug

slug: string
Required. Your app's address, such as chess in tinylib.app/chess: lowercase letters and digits, with single hyphens between them. Your app's first version claims it. At most 40 characters.

Changing the slug doesn't rename your app. Publishing again makes a new app at the new slug.

name

name: string
Required. The name Tinylib shows under your app's icon and on its notifications. 1 to 20 characters.

description

description: string
Required. One sentence about your app, shown on its card and its page. 1 to 120 characters.

icon

icon: string
Required. The path of your app's icon in its folder: a square PNG, at least 512 pixels on a side. init adds a placeholder. At most 256 KB.

orientation

orientation?: "portrait" | "landscape"
Locks the app's orientation. On the web, it works only with fullscreen.

Default: unset, so the app turns with the phone

fullscreen

fullscreen?: boolean
Hides the phone's status and navigation bars. On the web, the app goes full screen from a tap, and again at the user's next tap if they leave, except in Safari on an iPhone or iPad, which keeps its bars.

Default: false

rulesKeys

rulesKeys?: string[]
Keys of the user's data that only your rules can write, with ctx.data, such as a rating. An entry ending in / covers every key under it. A new version can't declare a key your client has already written, and declaring any needs a rules.js. At most 100 entries, each 1 to 128 bytes.

Default: []

A new version can't remove a declared key, so a key stays declared for the app's life.

uses

uses?: ("reminders" | "friends" | "notifications" | "localRooms")[]
The features your app uses: "reminders" for tinylib.reminders, "friends" for tinylib.friends or data saved with audience: 'friends', "notifications" for ctx.notify, and "localRooms" for tinylib.rooms.local. Without its entry, a call to tinylib.reminders.set or tinylib.friends rejects with refused, ctx.notify sends nothing and shows an error on the developer page, and tinylib.rooms.local throws.

Default: []

npx tinylib-sdk dev and publish add an entry you leave out when they find your code calling the feature, but only in what they build, never in this file.