Developing Tarsk
This guide covers running the Tarsk monorepo locally. End users should use Installation instead.
Prerequisites
Section titled “Prerequisites”- Bun (pinned in the repo)
- git on your PATH
Clone and Install
Section titled “Clone and Install”git clone https://github.com/WebNativeLLC/tarsk.gitcd tarskbun installDevelopment Modes
Section titled “Development Modes”| 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.
Dev Label
Section titled “Dev Label”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.
bun run buildBuild order: shared → app → cli → postbuild (copies app/dist into the CLI public assets).
For npm publish without Electrobun native targets:
bun run build:npmQuality Checks
Section titled “Quality Checks”bun run check:allRuns 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.
Repository Layout
Section titled “Repository Layout”| 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 |
Sync Model Data
Section titled “Sync Model Data”bun run sync-modelsRefreshes the model catalog in ai-data/. Full sync needs ARTIFICIAL_ANALYSIS_TOKEN.
Releasing
Section titled “Releasing”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:
git tag v0.7.0git push origin v0.7.0Release 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.
VS Code Extension Development
Section titled “VS Code Extension Development”cd extensions/vscodebun installbun run compileIn VS Code/Cursor, select Run Tarsk VS Code Extension and press F5.
Related
Section titled “Related”- AGENTS.md — contributor rules for agents
- cli/README.md — published CLI reference