Skip to content

Developing Tarsk

This guide covers running the Tarsk monorepo locally. End users should use Installation instead.

  • Bun (pinned in the repo)
  • git on your PATH
Terminal window
git clone https://github.com/WebNativeLLC/tarsk.git
cd tarsk
bun install
Command What it does
bun run dev:web Debug API on port 462 + app Vite on 8100 (recommended for web development). Same as cd cli && bun run dev:web.
cd cli && bun run dev Build app, start Electrobun desktop dev
cd cli && bun run dev:web Same as root bun run dev:web
bun run dev:app Frontend only (Vite default port; API calls go to the same origin). The 8100 frontend / 462 API pairing applies when the app is served on port 8100, for example via bun run dev:web.
bun run dev:docs Documentation site (Astro)
bun run dev:cli CLI server on 641 (MODE=development). Needs a built app (bun run build) if you want it to serve the UI; otherwise pair with Vite on 8100 via dev:web.

When you run the app on Vite port 8100, the frontend sends API requests to port 462 on the same hostname.

The sidebar shows a Dev label next to the Tarsk logo when the server is a development instance. The label follows the signals the development commands set — MODE=development (bun run web, bun run api-serve-462), TARSK_ELECTROBUN_DEV=1 (bun run dev, bun run dev:watch), or --debug. It is not triggered by a port fallback, so a released app that walks from 641 to 642 stays unlabelled.

Terminal window
bun run build

Build order: shared → app → cli → postbuild (copies app/dist into the CLI public assets).

For npm publish without Electrobun native targets:

Terminal window
bun run build:npm
Terminal window
bun run check:all

Runs lint, build, tests, and Vite Plus checks. bun run check:all now performs the signed desktop build path; use bun run check:all:unsigned when you need the full pipeline without codesigning or notarization, and bun run check:all:quiet for a one-line pass/fail summary.

Directory Purpose
app/ React frontend (Vite Plus)
cli/ Bun/Hono server, agent orchestration, Electrobun desktop shell
shared/ @tarsk/shared types, constants, utilities
docs/ This documentation site (Astro + Starlight)
website/ Marketing site
extensions/vscode/ VS Code extension
ai-data/ Provider and model catalog data
specs/ Product specifications
Terminal window
bun run sync-models

Refreshes the model catalog in ai-data/. Full sync needs ARTIFICIAL_ANALYSIS_TOKEN.

Run the Release Production workflow on main and press Run workflow. It tags main with the next version, patch by default (choose minor or major in the bump field), then builds and publishes.

To release a version you pick, set version (for example 1.4.0). To rebuild a tag that already exists after a failed run, set version to that tag.

Pushing a vX.Y.Z tag does the same:

Terminal window
git tag v0.7.0
git push origin v0.7.0

Release Production builds the signed production bundle and the notarized app for arm64 and x64 from that tag, then publishes the app to install.tarsk.io, the bundle to bundles/production, and the GitHub Release. Nothing publishes unless both app builds pass. A merged pull request on main publishes the staging bundle only, through the Release Staging workflow, which can also run manually. See docs/adr/0061-a-production-release-builds-the-shell-and-the-bundle.md.

Terminal window
cd extensions/vscode
bun install
bun run compile

In VS Code/Cursor, select Run Tarsk VS Code Extension and press F5.