Foxar for Visual Studio Code
Build, archive and manage your FoxarKit projects directly from the VS Code sidebar.
Features
A Foxar Project panel appears in the Explorer sidebar whenever a .foxar.toml file is detected in the workspace root.
FOXAR PROJECT
├── Build
├── Run (Watch)
├── Clean
├── Generate Assets
├── ▼ Archive
│ ├── Release
│ ├── Debug
│ ├── Bump Patch
│ ├── Bump Minor
│ └── Bump Major
└── ▼ Update
├── Update Foxar
└── Update Swift SDK
Clicking any command runs it in a dedicated Foxar terminal, reused across calls.
Keyboard shortcuts
| Action |
macOS |
Windows / Linux |
| Run (opens the Live Preview) |
⌘⌥⇧R |
Ctrl+Alt+Shift+R |
Shortcuts are only active when a Foxar project is open, and can be remapped in Keyboard Shortcuts (Foxar: Run Task).
Requirements
- A FoxarKit project initialised with
foxar init (contains .foxar.toml and a local ./foxar script)
- Swift extension recommended
Getting Started
foxar init MyProject
code MyProject
The Foxar panel will appear automatically in the Explorer sidebar.
Live Preview
Development › Live Preview in the Foxar panel runs foxar run: it builds the
maquette, then rebuilds and reloads VS Code and every connected device on each
save.
- Window: where VS Code shows the player (
foxar.livePreview.runIn): its own
window (default), a panel beside the editor, or no window at all when only the
devices follow.
- Devices: an iPhone, iPad or Vision Pro joins the first time by scanning the
QR of Add a Device, or by choosing this Mac in Foxar › Live preview and
typing the 4-digit code. A device accepted once follows without the code; the
card lists them under Accepted Devices, and Forget removes one.
- Watching: the card lists who follows and in which state (receiving,
reloading, up to date, left), with Reload, Disconnect and Forget This
Device behind each row's "…". A save that does not build shows its first
error with Go to Line; the devices keep the last version that built.
- Closing the player's window does not stop the devices. Stop (on the card,
in the player's bar, or
Foxar: Stop Live Preview) ends foxar run for
everyone. While it runs, the status bar shows the project and how many devices
watch; a click opens the Devices menu.
VS Code finds the run through .foxar/generated/server.json, written by
foxar run (FoxarKit 1.100 or later) and removed when it stops. A device that
does not find the Mac needs the same Wi-Fi and Foxar allowed on the local
network; the QR carries the Mac's address and works when discovery is blocked.
Measuring time
foxar.timeLedger.enabled measures the time spent on each maquette. It is off
by default, and it is a per-folder setting: a repository that is not a
maquette, FoxarKit or this extension itself, has no .foxar.toml and reports
its time under "Not on any maquette", so turn it off there.
Time spent driving an agent
The ledger keeps three clocks. Time with nobody there is machine, time with
hands on the keyboard is human, and time spent driving an agent is
assisted, which is a truer number to put in front of a client than either.
An agent has to say so itself: nothing else can tell an edit it made from one
you typed. Claude Code says it with one hook, on PostToolUse:
{
"hooks": {
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "mkdir -p ~/.foxarkit && printf '{\"at\":%s000,\"cwd\":\"%s\"}' \"$(date +%s)\" \"$PWD\" > ~/.foxarkit/agent-activity"
}
]
}
]
}
}
It overwrites one line in ~/.foxarkit/agent-activity, which the extension
reads on its own timer. A file rather than a port: nothing to keep alive,
nothing to conflict over between two windows, and it works while the editor is
closed. Without the hook nothing changes and nothing breaks; the time simply
goes on being counted as human.
Links