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.44.0/tinylib.schema.json",
"slug": "chess",
"name": "Chess",
"description": "Live chess with a friend.",
"icon": "icon.png",
"orientation": "portrait",
"fullscreen": true,
"rulesKeys": ["rating", "games/"],
"uses": ["reminders", "friends", "notifications"]
}
$schema?: string
The file's JSON schema.
init writes it, and dev keeps it on the version of tinylib-sdk your app installs.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: string
Required. The name Tinylib shows under your app's icon and on its notifications. 1 to 20 characters.
description: string
Required. One sentence about your app, shown on its card and its page. 1 to 120 characters.
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?: "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?: 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 iPhone, which keeps its bars.
Default: false
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?: ("reminders" | "friends" | "notifications")[]
The features your app uses:
"reminders" for tinylib.reminders, "friends" for tinylib.friends or data saved with audience: 'friends', and "notifications" for ctx.notify. Without its entry, a call to tinylib.reminders.set or tinylib.friends rejects with refused, and ctx.notify sends nothing and shows an error on the developer page.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.