#1. Install skopik
Install the CLI globally from npm or run it on demand with npx:
npm install -g @skopiklabs/platformYou can also download a standalone static binary directly from the control API without Node installed. See CLI (skopik) for all installation options.
#2. Sign in
Authenticate with an organization API key (created in Settings → Keys in the console) or sign in interactively as a person:
skopik login
# Or pass it via environment variable:
export SKOPIK_API_KEY="mhk_..."skopik login --personVerify your active credential at any time:
skopik whoami#3. Deploy your first Worker
Create a directory with a small Node HTTP server listening on process.env.PORT:
// index.js
import http from 'node:http'
const server = http.createServer((req, res) => {
res.writeHead(200, { 'content-type': 'application/json' })
res.end(JSON.stringify({ ok: true, path: req.url }))
})
server.listen(Number(process.env.PORT || 8080))Deploy it with skopik deploy:
skopik deploy --worker hello --runtime nodeEvery deployment is immutable and gets its own URL, while the production alias moves to the new deployment:
production -> dep_7f3a... https://hello-k2x....skopik.app#4. Add a Database binding
Create a sql database and declare it in skopik.json at the root of your Worker directory:
skopik create_database --name notes --type sql{
"bindings": {
"DB": { "database": "notes" }
}
}Call it from inside your Worker using SKOPIK_BINDINGS_URL and the required mh-bindings: 1 header — no API key needed:
const res = await fetch(`${process.env.SKOPIK_BINDINGS_URL}/databases/DB/query`, {
method: 'POST',
headers: { 'mh-bindings': '1', 'content-type': 'application/json' },
body: JSON.stringify({ sql: 'SELECT 1 AS ok' }),
})Redeploy to activate the new binding:
skopik deploy --worker hello --runtime node#5. Tail logs and roll back
Stream live stdout and stderr from your Worker:
skopik logs helloIf a deploy misbehaves, point the production alias back to its previous deployment immediately:
skopik rollback --worker hello