Tinylib
DiscoverDocsSign in
Sign in
Tinylib
AboutDiscoverDocsMake an appPricingTermsPrivacyDeveloper TermsContact

Start

  • Quickstart
  • How Tinylib works

Guides

  • Data
  • Rooms and rules
  • Games
  • Friends
  • Places and links
  • Reminders and notifications
  • Publishing
  • Errors and offline
  • Platforms

Client API

  • tinylib
  • tinylib.data
  • tinylib.rooms
  • tinylib.invitations
  • tinylib.friends
  • tinylib.places
  • tinylib.reminders
  • Types
  • tinylib-sdk/kits

Rules API

  • Kinds
  • ctx

Reference

  • tinylib.json
    • $schema
    • slug
    • name
    • description
    • icon
    • orientation
    • fullscreen
    • rulesKeys
    • uses
  • Command line
  • Limits

Plain text

  • llms.txt
  • llms-full.txt

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

$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 iPhone, 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")[]
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.

PreviousctxNextCommand line

On this page

  • $schema
  • slug
  • name
  • description
  • icon
  • orientation
  • fullscreen
  • rulesKeys
  • uses