Onboarding

Fresh machine to fully working dev environment in one paste

Onboarding

One paste. Scan first, install only the delta. One browser sign-in part-way through, ≤3 clicks at the end. ~20 min on a Mac that already has Xcode; budget ~45 min on a bare machine (the first Command-Line-Tools download dominates). A fresh Mac, Windows, or Linux laptop becomes a fully provisioned databayt environment — every tool installed, every repo cloned, every agent lane working.

This is the single source of truth for joining databayt. It covers every OS, every agent (Claude Code, Claude Desktop, Antigravity, opencode, Hermes), every dotfile, every external account.

Ran this on a real machine? Hit Report an issue in the footer of any kun.databayt.org page and describe what you saw — what worked, what broke, what to change. It files a GitHub issue (no account-juggling, works mid-install from the browser). See Issue pipeline.


The one-liner

Paste in a terminal. The wizard takes over.

macOS / Linux

curl -fsSL https://kun.databayt.org/install | bash

Windows (PowerShell or cmd.exe)

powershell -ExecutionPolicy Bypass -Command "iwr https://kun.databayt.org/install.ps1 | iex"

The bootstrap URL auto-detects your OS and dispatches to the right installer. No need to pick. Re-run anytime — it auto-resumes from where it left off via a state file.


Scan first

Before anything installs, the wizard prints a scan of what's already on the machine — versions, launchers, config — and only installs the delta. Already-provisioned machines sail through with 1–2 dialogs:

Scan — system
  ✓ os               Darwin arm64 (26.4)
  ✓ brew             Homebrew 6.0.1
  ✓ node             v24.13.0
  ✓ gh               gh version 2.83.1

Scan — agents
  ✓ claude           2.1.206 (Claude Code)
  ✓   alias c        bypass launcher
  ✓ claude desktop   app + MCP config
  ✓ agy              1.0.14
  ○ opencode         1.17.13 · bypass config not set
  ○ hermes           not installed (optional gateway)
  ✓ ~/.claude        engine installed

Run the scan alone anytime (changes nothing):

bash ~/kun/.claude/scripts/onboarding-mac.sh --detect-only     # scan table
bash ~/kun/.claude/scripts/onboarding-mac.sh --dry-run         # what a run would install
bash ~/kun/.claude/scripts/onboarding-mac.sh --doctor          # scan + full health audit + fix hints

--doctor is the diagnostics mode (Windows: -Doctor): the scan table, then the full engine health audit (health.sh), then a targeted fix hint for every red row — missing lane, config drift, stale heartbeat, dead browser MCP. It diagnoses everything and changes nothing.

The agents

Five lanes, one launcher letter each — pick which to install in the wizard's multi-select (default: all):

AgentLauncherRoleBypass-permissions semantics
Claude CodecPrimary — everything seriousc = claude --dangerously-skip-permissions
Claude DesktopChat / Cowork / Code tabsn/a (app)
Antigravity (agy)aSecondary — fallback + cheap lanea = agy --dangerously-skip-permissions
opencodeoTertiary — open-source terminal agentConfig-level: the installer writes "permission": "allow" into ~/.config/opencode/opencode.json (no flag exists — this is the o-lane equivalent of --dangerously-skip-permissions, and it is just as permissive)
HermeshOptional assistant gateway (Slack/WhatsApp/Telegram channels) — NOT a coding CLI. NousResearch's hermes-agentn/a — its interactive setup (hermes gateway setup) runs later, never headless. See Hermes

The launchers live in one managed block in ~/.zshrc / ~/.bashrc (# BEGIN databayt agents … # END databayt agents) — idempotent across re-runs; legacy function c lines migrate in automatically.


What you get

Running the bootstrap line leaves your machine fully provisioned. Here's what lands, how to verify it, and how to change what's delivered.

Deliverables

CategoryWhat
Side-toolsgit, Node 24 LTS (Krypton), pnpm, gh CLI, Vercel CLI, Chrome
IDEsWebStorm (+ Claude plugin), VS Code (+ Claude extension)
ClaudeDesktop (Chat / Cowork / Code tabs), Claude Code CLI, IDE integrations, claude.ai/code in browser, Mobile (iOS/Android)
Claude DesignThe design plugin (/critique, /accessibility, /handoff, /ux-copy — beside kun's quality keywords) + the Labs canvas MCP (claude.ai/design; decks, mockups, prototypes). Subscription-covered on Max. Sign in later with /design-login.
Antigravity (secondary)agy CLI + a launcher; ~/.gemini/ wired to the same MCP fleet, skills, and playbook — fallback for Claude Code + cheap lane for easy tasks. See Antigravity.
opencode (tertiary)opencode CLI + o launcher; permissive config written (see The agents)
Hermes (optional)hermes CLI (official installer) + h launcher; gateway setup stays manual (interactive) — see Hermes
DotfilesSSH key (uploaded to GitHub), one managed launcher block (c / a / o / h) in ~/.zshrc / ~/.bashrc / $PROFILE, ~/.gitconfig, ~/.ssh/config (Keychain on Mac)
Claude config~/.claude/ — agents, skills, MCP servers, hooks, rules, memory; secrets in ~/.claude/.env
Desktop ↔ CLI parityclaude_desktop_config.json symlinked to ~/.claude/mcp.json so Desktop tabs see the same MCP fleet; Antigravity's ~/.gemini/config/mcp_config.json is transformed from the same source
ReposThe full databayt org cloned to your chosen directory (default: ~/<repo>) — see Which repos you get

Verify what you got

Run these to confirm each layer — all green means fully provisioned:

LayerVerify commandPass looks like
Toolsfor t in git node pnpm gh claude agy opencode vercel; do command -v $t; donea path prints for each
Agent scanbash ~/kun/.claude/scripts/onboarding-mac.sh --detect-onlyall lanes ✓ (or ○ for optional ones you skipped)
Authgh auth status && ssh -T git@github.com"Logged in"; "successfully authenticated"
Org gategh api user/memberships/orgs/databayt --jq .stateactive
Codels ~/kun ~/hogwarts ~/codebasedirectories exist
Per-product envfor d in kun hogwarts souq mkan shifa marketing codebase; do [[ -s ~/$d/.env ]] && echo "$d ✓"; doneeach cloned repo prints
Configbash ~/.claude/scripts/health.sh✅ healthy (0 errors)
Heartbeatbash ~/.claude/scripts/maintain.sh --status (Win: maintain.ps1 -Status)state JSON + "scheduler: armed"
Schedulerlaunchctl list | grep com.databayt.kun-maintain (Win: Get-ScheduledTask kun-maintain)one line prints
Surfacesclaude doctorall checks green
Product (if --hogwarts-dev)cd ~/hogwarts && pnpm dev → open localhost:3000login works (admin@kingfahad.edu / 1234)

bash ~/.claude/scripts/health.sh is the authoritative config gate (it audits ~/.claude/ only — pair it with the other rows for a full check). The daily maintain heartbeat posts your status to the team's Config Health Dashboard issue automatically (databayt/kun, label config-health); --report posts it manually.

Modify what's delivered

Want a different result? Edit the source, then re-run the bootstrap (idempotent):

To change…Edit / flag
Which repos clonePhase 4 repo list in onboarding-{mac,linux}.sh / Clone-Parallel list in onboarding-windows.ps1; or pass --essentials-only for just kun/hogwarts/codebase
Where repos land--repos-dir <path> (Mac/Linux) / -ReposDir <path> (Windows), or the wizard's "where to save repos" prompt
Which tools installPhase 1–2 of the onboarding-* backend for your OS
Which agents install--agents=all|code,desktop,agy,opencode,hermes (default all), or the wizard's multi-select
MCP / skills / agents (universal)edit .claude/mcp.json, .claude/skills/, .claude/agents/ — every machine gets the full set (commands are retired — skills carry the verbs)
Which keys a machine holdsscoped by the Gist you hand someone (secrets.sh <GIST_ID>), not by config
hogwarts local dev--hogwarts-dev / -HogwartsDev (default off)

All installer scripts live in ~/kun/.claude/scripts/. Print any backend's flags with no args (e.g. bash ~/kun/.claude/scripts/onboarding-mac.sh).

Every machine is a full autonomous worker

Config is universal — the machine, not the person, is the unit of capability. Every machine gets all agents, all skills, the full MCP fleet (~18), all hooks, and the entire org's repos. Any machine can run any task. Your role is just a label + a secrets-trust tier — it does not limit what your computer can do.

What still varies (and why):

  • Secrets — scoped by which Gist you're handed, not by config. A machine only holds the keys it's trusted with; an MCP server without its key simply doesn't connect (harmless). Full config everywhere, contained blast radius.
  • Linux — Claude Desktop doesn't exist on Linux; surfaces are the CLI, claude.ai/code in the browser, and the IDE plugins. A Linux box with those is complete — don't expect the Chat/Cowork/Code tabs.
  • No Pro/Max — Desktop tabs are unavailable; Claude Code can still bill through an ANTHROPIC_API_KEY, or upgrade for the Desktop surfaces.

Two paths

Pick the one that fits. A fully manual, step-by-step path is at the bottom for auditing or learning the parts.

PathActive timeWall timeBest for
Wizard (recommended)~5 min~20–45 minAnyone — guided UX, auto-resume, deep links to the right OS surface
Script~2 min~15–45 minEngineers who want one bash command, no dialogs

Neither needs Pro/Max.


The wizard — three acts

Three acts. Most is silent; you click only when a human is unavoidably needed. The one unavoidable pause is a browser sign-in to GitHub part-way through (Act 2, Phase 3).

Act 1 — Pre-flight (~30 seconds, usually 1–2 dialogs)

The wizard scans first and auto-answers what detection can settle; it dialogs only the rest. On a bare machine that's five questions; on a machine with any history it's usually just the agents pick.

QuestionAuto-skipped when
GitHub account?gh auth status already succeeds
Accepted databayt org invite?gh api user/memberships/orgs/databaytactive
Anthropic — company accountclaude installed + already signed in (~/.claude.json)
Where to save databayt repos?~/kun + ~/hogwarts already at home root
Which agents? (multi-select)never skipped on first run — All (default) / Claude Code / Claude Desktop / Antigravity / opencode / Hermes

All answers persist in a state file. Re-runs skip questions already answered.

What's no longer asked (and why):

RemovedWhat happens instead
Role (engineer/business/…)Every machine gets the full config; backends default to engineer. Role is a label only.
Full name + email (for git)Auto-derived after auth from gh api user (<login>@users.noreply.github.com); falls back to $(whoami) only if gh is unreachable.
Secrets Gist IDInstall completes without it; the final dialog reminds you to run secrets.sh <GIST_ID> once HR shares it.

Act 2 — Silent batch (~15–40 minutes, progress notifications)

Eight phases run back-to-back. You can minimize the terminal — the wizard fires native OS notifications as each phase advances. One phase is not silent: Phase 3 opens your browser for a GitHub sign-in (the device code is auto-copied to your clipboard) and waits for you to approve.

PhaseWhat
1System Foundation — build tools, git, Node 24 LTS, pnpm, gh CLI, Vercel CLI
2Applications — WebStorm, VS Code, Chrome
3GitHub — SSH key, browser sign-in (gh auth login --web), key uploaded, git identity auto-set, verify databayt org membership + SSH push
4Clone Repositories — the full databayt org, cloned concurrently
5Agents — the selected lanes from the multi-select: Claude Code CLI + Desktop (Mac/Win) + MCP symlink, Claude Design (the design plugin + canvas MCP, auth deferred to /design-login), Antigravity (~/.gemini/ bridged to the same fleet), opencode (+ permissive config), Hermes (CLI only; ex-OpenClaw machines: hermes claw migrate); one managed launcher block c/a/o/h
6Kun Engine — setup.sh installs full config; secrets.sh pulls ~/.claude/.env from Gist; vercel-pull.sh populates per-product .env
7Hogwarts — pnpm install, prisma generate + push + seed, build verify (only with --hogwarts-dev)
8Health Check — every tool / repo / config verified

Each phase emits PROGRESS:N/8:label to stderr; wrappers parse it and fire a native notification (Mac osascript, Linux zenity, Windows NotifyIcon).

Act 3 — Manual finishing (~3 clicks)

Auto-polling OAuth means the only manual clicks left are:

StepClick countSkipped when
Sign in to Claude Desktop1not Pro/Max, or Linux
Toggle computer-use in Desktop Settings1not Pro/Max, or Linux
Install Claude Code plugin in WebStorm1 (if not auto)
/design-login (Claude Design canvas auth)1not Pro/Max, or Design not needed yet

VS Code extension (code --install-extension), GitHub OAuth (--web polls), and Anthropic CLI OAuth (claude first-run polls) are all 0 clicks. Each action button is a deep link that drops you exactly where you need to act — Desktop, WebStorm, or the GitHub device page — on your OS.


Before you sit down — admin checklist

What the inviter must grant or hand over before paste-time:

  • GitHub — invite to the databayt org (Phase 3 hard-gates on membership; without it the install can't clone private repos)
  • Anthropic account — Pro/Max sub for the full Desktop + CLI experience, or an API key if not on Pro/Max
  • Anthropic mobile app — installed + signed in with the same account (native PushNotification from Claude Code)
  • Secrets Gist ID — handed out-of-band; powers ~/.claude/.env (MCP keys + cross-cutting tokens). See Secrets.
  • Vercel — team invite to databayt (every role) — needed for vercel env pull to populate per-product .env
  • Neon — project access for any product whose DATABASE_URL_* you'll touch (engineer)
  • Slack — invite to databayt-sh (invite link)
  • CRM — login <name>@databayt.org works on all 4 workspaces (see CRM)
  • AWS IAMhogwarts-s3-uploader keys (engineer only)

If something's missing the wizard skips that step and lists it under "things to do later" at the end.


Which repos you get

Every machine clones the full databayt org to your chosen directory (~/, ~/databayt/, or custom) — any machine can touch any repo:

kun (engine config), hogwarts (multi-tenant LMS), codebase (patterns, agents, blocks), shadcn (UI library), radix (UI primitives), souq (e-commerce), mkan (rentals), shifa (medical), ios-app (iOS/Swift), android-app (Kotlin), crm (self-hosted CRM), distributed-computer (infra), marketing (landing pages).

Pick a custom directory and the wizard symlinks ~/kun, ~/hogwarts, etc. back to it so tooling that hard-codes ~/kun keeps working. To clone only the essentials (kun, hogwarts, codebase): pass --essentials-only (Mac/Linux) or -EssentialsOnly (Windows).


The Claude surfaces

After install you have seven Claude surfaces, each with a sweet spot:

SurfaceWhen to use
Desktop ChatQuick question, no tools. Fastest reply.
Desktop CoworkPlan, research, strategize. Cloud agents — runs while you do other things.
Desktop CodeDrive your own machine (install apps, fill forms, screenshots). Local computer-use.
Claude Code CLI (claude / c)Build, deploy, fix code in terminal. Full kun config — agents, MCP, hooks, memory.
VS Code extensionInline AI in your editor. Cmd+Shift+P → "Claude".
WebStorm pluginInline AI in WebStorm. Cmd+Esc opens panel.
claude.ai/codeMobile, web, or shared link. Same projects as the CLI, no install.

Cowork and Claude Code share ~/.claude/ — same brain, two modes; handoff happens via ~/.claude/bridge.md + GitHub Issues. See Cowork ↔ Code. Desktop's three tabs share the CLI's MCP fleet because the wizard symlinks claude_desktop_config.json~/.claude/mcp.json.

The other lanes. Beside Claude Code sit three more agents (see The agents): Antigravity (a) — Google's terminal agent wired to the same MCP fleet/skills/playbook via ~/.gemini/, the fallback + cheap lane (full detail: Antigravity); opencode (o) — open-source terminal agent, tertiary; and Hermes (h) — the optional chat-app gateway, Slack-wired (full detail: Hermes). Keep architecture and complex work on c.

Away from the keyboard

Install the Claude mobile app (iOS · Android) and sign in with the same Anthropic account — projects, conversations, and Cowork sessions follow you everywhere. No Tailscale, no extra services; the native primitives cover remote work:

NeedNative primitive
Push when a Code task finishesPushNotification tool → Anthropic mobile app
Drive your dev box from your phoneclaude.ai/code in the mobile browser — same projects/sessions
Resume Code from another machineCowork ↔ Code bridge (~/.claude/bridge.md) + GitHub Issues
Browser-driven automationComputer-use beta (Desktop Code tab, Pro/Max)
Team async updatesGitHub Issues · Slack MCP (/slack send …)

WebStorm settings sync

Share team-standard editor settings: WebStorm → account icon → Sign in to your JetBrains Account → Settings → Backup and SyncEnable Settings Sync. Recommended scope: code style, inspection profiles, live templates, plugins, keymaps (skip system settings). Settings then follow you to any machine where you sign in to the same account.


Script path (engineer)

Skip the wizard and run the silent backend directly:

# Mac
git clone https://github.com/databayt/kun.git ~/kun && \
  bash ~/kun/.claude/scripts/onboarding-mac.sh engineer <GIST_ID>
 
# Linux
git clone https://github.com/databayt/kun.git ~/kun && \
  bash ~/kun/.claude/scripts/onboarding-linux.sh engineer <GIST_ID>
 
# Windows (PowerShell)
git clone https://github.com/databayt/kun.git $env:USERPROFILE\kun
& $env:USERPROFILE\kun\.claude\scripts\onboarding-windows.ps1 -Role engineer -GistId <GIST_ID>

Useful backend flags (Mac + Linux):

FlagPurpose
--detect-onlyPrint the scan table and exit — changes nothing
--dry-runPrint what a run would install (agent delta) and exit
--doctorScan + full health audit + fix hints — diagnoses everything, changes nothing
--agents=all|code,desktop,agy,opencode,hermesWhich agent lanes to install (default all)
--quietSkip terminal prompts (wrapper/CI use)
--name <name> / --email <email>Pre-supply git identity
--repos-dir <path>Where to save databayt repos (default: $HOME)
--essentials-onlySkip optional org repos (just kun/hogwarts/codebase)
--hogwarts-devSet up hogwarts local dev (pnpm + DB seed + build)

PowerShell equivalents: -Quiet, -GitName, -GitEmail, -ReposDir, -EssentialsOnly, -HogwartsDev. Re-run anytime; idempotent.


Manual path

For auditing what gets installed, or if both other paths fail — the full per-OS step-by-step lives in two focused docs:

  • Claude Code — per-OS side-tools, Claude Code CLI, the c launcher, GitHub SSH auth, and troubleshooting.
  • Antigravity — the secondary agent: agy install, the a launcher, and the ~/.gemini/ bridge to the shared MCP fleet / skills / playbook.
  • Secrets — Gist-based ~/.claude/.env provisioning and vercel env pull for per-product .env.

For hogwarts, your team contact shares the .env out-of-band — there is no .env.example.


Daily entry points

ActionHow
Open Claude in WebStormCmd+Esc (Mac) · Ctrl+Esc / Alt+Shift+C (Win/Linux)
Open Claude in VS CodeCmd+Shift+PClaude: Chat
Start Claude in any terminalc
Secondary agent (fallback / easy task)a
Tertiary agent (opencode)o
Hermes gateway statushermes gateway status
Synthesize company statusc "/captain"
Capture an ideac "/idea <description>"
Run the full feature pipelinec "/feature <name> [product]"
Verify a production deployc "/watch"
Mobile / browserhttps://claude.ai/code

Full keyword list: keywords.


Day 2 — the machine supervises itself

After setup, every machine runs a daily maintain heartbeat (09:17 local — macOS launchd com.databayt.kun-maintain · Windows Scheduled Task kun-maintain · Linux cron). You never re-install or chase updates by hand; the machine does:

  1. Pull ~/kun (main only; skips if you're mid-rebase or offline; aborts cleanly on conflict — never leaves the tree broken)
  2. Refresh ~/.claudesetup.sh --quiet re-copies agents/skills/rules/settings/MCP from the fresh source and prunes engine items removed upstream
  3. Health-check — full health.sh audit + a disk-space floor
  4. Record — state to ~/.claude/.kun-maintain.json (cat it anytime)
  5. Report — posts to the team's Config Health Dashboard weekly, and immediately if health goes RED

If the heartbeat goes stale (>48h) or health is RED, a warning surfaces automatically at the start of every Claude Code session — in any project, not just kun. What each warning means:

Session warningMeaningFix
heartbeat stale (Nh)The scheduler didn't fire (machine off / scheduler disarmed)bash ~/.claude/scripts/maintain.sh — and --install to re-arm
engine health REDThe health audit found errorsbash ~/.claude/scripts/health.sh and fix what's ❌
could not pull ~/kunRebase conflict was aborted safelygit -C ~/kun pull --rebase --autostash by hand

Personal vs engine-managed config

The heartbeat re-copies engine config daily — so know which files are yours:

Yours (never touched)Engine-managed (refreshed + pruned daily)
~/.claude/CLAUDE.md (seeded from template once)~/.claude/agents/, skills/, rules/, workflows/ shipped by kun
~/.claude/.env (secrets)~/.claude/mcp.json, settings.json engine keys
.claude/settings.local.json (per-project)~/.claude/scripts/, hooks/
Top-level settings.json keys the engine doesn't define (model, voice, …)
Anything you created (personal skills/agents)

Personal items survive by construction: the pruner only deletes what the engine's manifest (~/.claude/.kun-manifest.json) says the engine itself shipped.


Auto-resume

The wizard persists every choice to a state file so re-runs skip what's done:

OSState file path
macOS~/Library/Application Support/Databayt/installer-state.json
Linux${XDG_CONFIG_HOME:-~/.config}/databayt/installer-state.json
Windows%APPDATA%\Databayt\installer-state.json

To reset and start fresh: delete the state file, then re-run the bootstrap.


Troubleshooting

SymptomFix
"command not found" for c a o or hRestart shell or source ~/.zshrc (Mac/Linux), . $PROFILE (Windows); the launchers live in the # BEGIN databayt agents block
o runs but asks permission for everythingRe-run onboarding (writes "permission": "allow" to ~/.config/opencode/opencode.json) — or accept the prompts if you prefer guardrails
hermes installed but no channelsHermes gateway setup is interactive by design: hermes gateway setup && hermes gateway start — Slack wiring: Hermes
a (Antigravity) can't see the MCP serversRe-run bash ~/kun/.claude/scripts/antigravity-sync.sh; see Antigravity
claude doctor redRe-run claude to re-auth; check ~/.claude/settings.json exists
Hogwarts won't buildConfirm .env is present; re-run secrets.sh <GIST_ID>
GitHub clone fails on private reposRun gh auth login -p ssh -w again; confirm the SSH key is on your GitHub account
Windows: "running scripts is disabled" / 'iwr' is not recognizedYou pasted into cmd.exe — use the universal form: `powershell -ExecutionPolicy Bypass -Command "iwr https://kun.databayt.org/install.ps1

For anything else, file an issue at https://github.com/databayt/kun/issues.


Where to go next

This page is the front door. Once your machine is provisioned, branch out:

Set up & verify

  • Claude Code — CLI install detail + config
  • MCP — the server fleet + /mcp-doctor recovery
  • Secrets — Gist-based provisioning
  • Self-hosting — tmux / Docker (optional)

Daily use

Understand the engine

Contribute

External