You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup.html
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -537,8 +537,9 @@ <h2>All make commands</h2>
537
537
<tr><th>Command</th><th>What it does</th></tr>
538
538
</thead>
539
539
<tbody>
540
+
<tr><td><code>make</code> / <code>make help</code></td><td>List every target with a one-line description (this is the default goal).</td></tr>
540
541
<tr><td><code>make setup</code></td><td>Install all dependencies (npm + uv). Auto-skipped when lock files haven't changed.</td></tr>
541
-
<tr><td><code>make dev</code></td><td>Start backend + Electron with full hot reload.</td></tr>
542
+
<tr><td><code>make dev</code></td><td>Start backend + Electron with full hot reload (local module source).</td></tr>
542
543
<tr><td><code>make dev-web</code></td><td>Start backend + Vite web dev server.</td></tr>
543
544
<tr><td><code>make build</code></td><td>Production build of the frontend (renderer + main process).</td></tr>
544
545
<tr><td><code>make dist-mac</code></td><td>Build and package a macOS <code>.dmg</code>.</td></tr>
@@ -547,9 +548,26 @@ <h2>All make commands</h2>
547
548
<tr><td><code>make docker-up</code></td><td>Start the Docker stack (<code>docker compose up</code>).</td></tr>
548
549
<tr><td><code>make docker-down</code></td><td>Stop and remove containers.</td></tr>
549
550
<tr><td><code>make flush</code></td><td>Wipe all local installs + app data for a fresh start (see below).</td></tr>
551
+
<tr><tdcolspan="2"><em>Module-branch workflow (see below)</em></td></tr>
552
+
<tr><td><code>make refs</code></td><td>Print which module branches the next run will use.</td></tr>
553
+
<tr><td><code>make use</code></td><td>Check out your <code>dev.env</code> refs across all submodules.</td></tr>
554
+
<tr><td><code>make server</code></td><td>(Re)install the Electron desktop server from your branch.</td></tr>
555
+
<tr><td><code>make app</code></td><td>Run the desktop app against your branch (auto-update off).</td></tr>
556
+
<tr><td><code>make baseline</code></td><td>Reset every submodule to the superproject's pinned commits.</td></tr>
557
+
<tr><td><code>make pin</code></td><td>Record the submodules' current commits as the superproject pins (one deliberate commit).</td></tr>
550
558
</tbody>
551
559
</table>
552
560
561
+
<h2>Working on module branches</h2>
562
+
<p>This repo is a superproject that <strong>pins</strong> each module (<code>frontend</code>, <code>backend/core_api</code>, <code>backend/core_agent</code>, <code>backend/data-vault</code>) to a commit. To let a team work on module branches without polluting <code>git status</code> or fighting over pins:</p>
563
+
<p><strong>1. Pick your branches</strong> in a gitignored <code>dev.env</code> (copy the template):</p>
564
+
<pre><code>cp dev.env.example dev.env # then set REF=feat/my-thing (or per-module API_REF=…)</code></pre>
565
+
<p><strong>2. <code>make</code> follows it</strong> — one knob, both run paths. <code>make use</code> checks out those refs; <code>make dev</code>/<code>dev-web</code> run the local module source on them, and <code>make server</code> + <code>make app</code> run the desktop app against the matching branch server.</p>
566
+
<p>Every submodule is configured with <code>ignore = all</code>, so your branch work never shows up as a superproject change — the parent <code>git status</code> stays clean. Pins move <strong>only</strong> via <code>make pin</code> (a deliberate, reviewable commit), and <code>make baseline</code> snaps submodules back to the pinned commits when you're not developing a module.</p>
567
+
<divclass="note">
568
+
<strong>One DB, one ref.</strong><code>make dev</code> (local source) and the desktop app (<code>make app</code>) share <code>~/.cowork/cowork.db</code>, so keep both on the same branch — a migration applied by one must exist in the other, or the app fails to start with <code>Can't locate revision …</code>. <code>make flush</code> resets if they drift.
569
+
</div>
570
+
553
571
<h2>Reset to a clean slate</h2>
554
572
<p><code>make flush</code> returns the machine to a pre-install state. It uninstalls the local runtime — the <code>cowork-server</code> uv tool <em>and</em> the <code>backend/core_api/.venv</code> + <code>backend/core_agent/.venv</code> — and deletes all app state: <code>~/.anton</code> (provider keys / <code>.env</code>) and <code>~/.cowork</code> (database, hermes, projects).</p>
555
573
<p>Use it to test the from-scratch install flow or to recover from a broken install. It prompts for confirmation before deleting; pass <code>FORCE=1</code> to skip the prompt in scripts/CI. The next <code>make setup</code> (or app launch) reinstalls everything.</p>
0 commit comments