Docs›Reference

Permissions

What a tik can reach outside its sandbox, which grants you set yourself, and how the app enforces them.

A tik runs in a sandbox: no network, nothing about the viewer, no microphone, no way out. Each thing it may reach is a grant in tik.yaml, and the app enforces it, not the tik. Nothing is granted by default.

What you can turn on

GrantWhat the tik getsSet with
profiletik.profile(): the viewer's name and avatar, for displaycodetik permissions --profile on
A backendIts own realtime database, with anonymous userscodetik backend
authA backend that knows who is playing, through tik.token()codetik backend, then codetik permissions --auth on
recordAudioThe microphone, after the app asks the viewercodetik permissions --mic on
linksLinks to well-known sites that open over the tikcodetik permissions --links youtube,github

Together these give a tik one of four shapes:

ShapeThe tik has
NoneNo backend and nothing about the viewer
ProfileThe viewer's name and avatar, no backend
AnonymousA backend, with anonymous users
IdentifiedA backend that knows each user

With a backend, auth and profile are one switch: turning on either turns on both. auth without a backend is refused, since nothing could check the token. The microphone is separate from all four.

codetik permissions

Shell
$ codetik permissions$ codetik permissions --auth on$ codetik permissions --links youtube,github$ codetik permissions --mic off

With no flags it checks the grants against the rules a publish applies and reports the shape the tik has. With flags it sets them, and refuses anything a publish would refuse before writing a byte. codetik check runs the same rules, and the p key in codetik dev toggles them while you test.

Shell
$ codetik permissions --json{ "viewers": "identified", "backend": true, "links": ["youtube"],  "permissions": { … }, "effective": { … }, "changed": [], "errors": [], "warnings": [] }

effective is what Codetik will store, with the auth and profile coupling applied.

--links sets the whole list of sites a tik's links may open, by id, or off for none. A link opens through <a href target="_blank"> or window.open(url). YouTube, Vimeo, Spotify and Telegram open outside the app, in their own app when it is installed; the rest open in a sheet over the tik. Any other link does nothing, and links do nothing on the web.

CategorySite ids
Video, socialyoutube, vimeo, ted, instagram, x, tiktok, reddit, spotify, telegram, patreon, boosty
Learningwikipedia, khan_academy, mit_ocw, internet_archive
Developersgithub, stack_overflow, mdn, web_dev, freecodecamp, dev_to, w3schools, npm, python_docs, react, typescript, rust, go, hacker_news, css_tricks, codepen
AI and datahugging_face, kaggle, anthropic

codetik permissions --links refuses an id it does not know and lists the ones it accepts.

Granted by Codetik only

Network access, links to any other site, and opening other tiks reach outside the sandbox. You cannot set them in tik.yaml: a publish that asks for one is refused, and codetik check warns about it first. Get in touch if your tik needs one.

A grant Codetik gave your tik stays when you republish, even though your tik.yaml does not carry it.

Providers

A tik can also use the viewer's own OpenRouter account or Google Drive. That is not a grant you set: the viewer connects the account and allows each tik themselves, and the tik never sees the credential. See Providers.