Docs›Get started

Quickstart

Install the CLI, get an API key, scaffold a tik, preview it in a phone frame and publish a draft.

Requirements

  • Node.js 22.12 or later, on macOS, Linux or Windows.
  • The Codetik app on your phone, with an account. API keys are created in the app.

Install the CLI

Shell
$ npm i -g @codetik/cli
$ pnpm add -g @codetik/cli
$ bun add -g @codetik/cli
Tip

The CLI ships with the /codetik agent skill. If you build with an agent, it already knows the commands and the window.tik API. See Using an agent.

Get an API key

The CLI publishes to your account with an API key, and keys are created in the Codetik app.

  1. Install the app and sign up

    Get Codetik from the App Store or Google Play. Sign up and pick a username: the CLI only works for an account with one, not a guest session.

  2. Open the API keys screen

    Go to the Account tab, tap the gear for Settings, then API keys in the Account section.

  3. Create a key

    Give the key a name and tap Create key. One key per machine or repo makes a leak easy to trace and cheap to revoke. You can hold up to 10.

  4. Copy it

    The key starts with ctk_ and is shown only once. Copy it now; if it is lost, revoke it on the same screen and create another.

Sign in

Paste the key when the CLI asks for it:

Shell
$ codetik login◇ Paste your API key│ ••••••••••••◇ Signed in as @you

codetik whoami shows the account and plan a saved key belongs to. In CI, set CODETIK_TOKEN instead of signing in.

Create a tik

  1. Run codetik new

    Pick a folder and a title. The tik is registered to your account as a draft.

    Shell
    $ codetik new◇ Folder│ snake◇ Title│ Snake◇ Created snake
  2. Add a logo

    Every tik needs a 512×512 tik.webp in its folder before it goes live. Drafts publish without one.

  3. Open the folder

    Open it in your editor. AGENTS.md holds the practices that work on a phone: portrait, touch, offline and the safe area.

What's in the folder

snake/Text
snake/├─ tik.yaml        # title, category, tags, permissions├─ AGENTS.md       # guidance for your agent├─ index.html├─ src/main.ts└─ tik.webp        # 512×512 logo, needed to go live

Preview with codetik dev

codetik dev runs your tik in a phone frame with the real window.tik, so lifecycle, profile and the backend behave as they will in the app.

Shell
$ cd snake && codetik dev
codetik dev: a Breakout tik in the phone frame, with the Preview and Overview tabs and the scale and tik UI switches on top
The preview at 127.0.0.1:5173. Overview shows what tik.yaml declares; Tik UI toggles the app's bars around the tik.

While it runs, these keys work in the terminal:

pToggle permissions
bBackend on or off
sSet up slides
rReload
hHelp
qQuit

Publish a draft

A publish is a draft by default. It replaces your files and reaches nobody, so you can iterate without a logo or a version bump. Open it from Drafts in the Codetik app to try it on your phone.

Shell
$ codetik publish◇ Publish how?│ Draft◇ Checked◇ Packed 6 files (3.1 KB zipped)◇ Draft saved└ Publish it with codetik publish --live when it is ready.

When it's ready, release it:

Shell
$ codetik publish --live
Going live is one way

A live tik can't go back to draft. Once it's live, its users' data is protected and breaking backend changes are refused unless you say otherwise.

Next steps