⌘K

CLI Overview

The Nativeblocks CLI manages your project, syncs integrations, generates the typed DSL, and deploys frames to production.

The Nativeblocks CLI is the primary tool for working with frames. You use it to set up your project, register blocks and actions, write and deploy frames, and manage releases.


What you can do

TaskCommand
Set up a projectnativeblocks init: authenticate, select org and project, scaffold frame files
Sync integrationnativeblocks integration sync: push a generated schema to the server
Generate the typed DSLnativeblocks code-gen: pull integrations and generate typed frame builder functions
Develop with hot reloadnativeblocks frame deploy --watch: re-deploy on every save, push to connected devices
Ship to productionnativeblocks frame deploy --tag: create a versioned release for the Dashboard
Automate in CIToken auth + --id flags + --force. No interactive prompts.

DSL languages

Frames are written in Kotlin, TypeScript, or Swift. All three languages compile to the same frame definition at deploy time.

KotlinTypeScriptSwift
File extension.kt.ts.swift
Entry pointfun frame(): NativeblocksFramefunction frame(): NativeblocksFramefunc frame() -> any NativeblocksFrame
Best forAndroid teams already on KotlinWeb or cross-platform teamsiOS teams already on Swift

Typical workflow

# 1. First-time setup
nativeblocks auth login
nativeblocks organization set
nativeblocks project set
nativeblocks init

# 2. After annotating a new block or action
nativeblocks code-gen

# 3. During development
nativeblocks frame deploy -f src/home.ts --watch

# 4. Shipping to production
nativeblocks frame deploy -f src/home.ts --tag v1.2.0 --force

Guides

GuideWhen to use
First-time SetupStarting a new project
Sync integrationAfter annotating a new component
Develop with Hot ReloadDuring active frame development
Deploy to ProductionShipping a tagged release
CI/CD IntegrationAutomating deploys on push or merge

DSL reference

ReferenceWhat it covers
FrameEntry point, platform factories, lifecycle hooks
VariableTypes, remember(), runtime conversion
BlockBuilder pattern, properties, data, slots, imports
Actionscript(), chaining, updateBlockProperties