Command line
The tinylib-sdk package installs a command named tinylib. Run it with npx tinylib-sdk <command>, or as tinylib <command> in your app's package.json scripts. It needs Node.js 22 or newer.
Use the developer page to unpublish an app, make an earlier version current again, remove a preview's testers, and see your rules' errors.
init writes tinylib.json, icon.png, index.html, app.js, and style.css, and the multiplayer and game templates add rules.js. It also writes a .gitignore and a package.json that pins tinylib-sdk as a dev dependency, with dev and publish scripts.
Arguments
- folderoptional
- An empty or new folder. Default: the current folder.
Flags
- --templatestringoptional
- solo: one person's app: their data, on all their devices. multiplayer: people together in a room, with rules. game: tic-tac-toe for two friends, with invitations and rematches. Default: solo.
- --namestringoptional
- The app's name. Default: the folder's name.
- --slugstringoptional
- The app's slug. Default: one made from the name.
- --descriptionstringoptional
- The app's description. Default: the template's.
dev builds the folder the way publish does. Both add a missing uses entry to the build for each feature your code uses, including through tinylib-sdk/kits.
Arguments
- folderoptional
- The app's folder. Default: the current folder.
Flags
- --portstringoptional
- The port to serve on, or the next free one after it.
Default:
4400- --no-openbooleanoptional
- Doesn't open the browser.
It keeps the login in credentials.json in your config folder, such as ~/.config/tinylib.
There is no token to pass. A coding agent runs login --no-open and gives you the link it prints, which you can open on any device.
Flags
- --no-openbooleanoptional
- Prints the login link without opening it in the browser.
- The app's first version claims the slug. If another app has it,
publishnames a free one, and in a terminal offers to write it totinylib.json. - While a listed app's new version waits for review, everyone keeps the current version, and the waiting one is the app's preview, for you and your testers.
- Open rooms move to the new rules at their next input, after
migrate.
Arguments
- folderoptional
- The app's folder. Default: the current folder.
Flags
- --no-openbooleanoptional
- Prints the login link without opening it in the browser.
- Publish the app first.
- A preview ends 14 days after the last
preview, and its data and rooms are deleted. - A tester opens the preview by signing in to Tinylib with the address you invited.
Arguments
- folderoptional
- The app's folder. Default: the current folder.
Flags
- --testerstring, repeatableoptional
- Lets the address open the preview and emails it a link. Repeat the flag for each tester.
- --endbooleanoptional
- Ends the preview now and deletes its data and rooms.
- --no-openbooleanoptional
- Prints the login link without opening it in the browser.
--help,-h: Prints the commands, or after a command's name, its flags.--version,-v: Prints the version of tinylib-sdk.