Run Vela in hidden or headless mode for scripts

Start Vela from Terminal with no window on screen and drive it through the local API. How hidden and headless mode differ, with commands you can copy.

Updated 16 November 2026 6 min read Mac

Sometimes a script needs a real browser but you do not need to watch it work. Vela for Mac can start with no window on screen and take its orders through the Automation API. There are two ways to do it, hidden mode and headless mode, and both are started from Terminal with a launch flag. This guide shows the commands, what each mode keeps and drops, and a short script you can run from start to finish.

Hidden mode and headless mode, side by side

Both modes run without anything to look at, and both start the API server for you. The difference is how much of the browser is behind it.

HiddenHeadless
What runsThe full browser, with every window made invisible.A stripped-down host that never builds the browser's interface.
Website dataKept as usual, in the default store and in each profile.Tabs opened without a profile use a temporary store that is thrown away.
Best forScripts that sign in, or must behave like normal browsing.Short, stateless jobs where low overhead matters most.

Vela's own Settings describe hidden mode as the recommended one: it behaves like the normal browser, only invisible. Headless is lighter but less compatible. If you are not sure, use hidden.

Start Vela in hidden mode

Open Terminal and run:

open -n -g -a Vela --args --hidden --port 1307

Each part has a job:

  • -n starts a new copy of Vela, so the one you are browsing in is left alone.
  • -g keeps that copy in the background instead of bringing it to the front.
  • --hidden is the mode. Its windows are transparent and ignore the mouse, and the copy takes itself out of the Dock once it is running.
  • --port 1307 is where its API listens. Add --bind followed by an address to change where it listens. Unless you changed it in Settings, that is 127.0.0.1, your own Mac only.

You do not have to type this from memory. Settings → Automation has a section called Hidden & Headless Mode (macOS) that shows both commands with a copy button, and a Copy All Info button for the lot.

Start Vela in headless mode

The command is the same with a different flag:

open -n -a Vela --args --headless --port 1307

Headless mode does not build the browser's windows. It runs a small invisible host for the API and creates pages on request. Because nothing is meant to last, a tab opened without a profile gets a temporary data store: cookies and site storage are gone when the copy quits, and the tab session is not saved. A window you open on a named profile still uses that profile's own store.

Find the address and the key

A hidden or headless copy uses the same API key as the rest of Vela, the one shown under Authentication in Settings → Automation. If you have never had a key, it creates one and saves it.

To see the details in the terminal, start the app's program directly instead of going through open. It prints the mode, the API address and the key as it starts:

/Applications/Vela.app/Contents/MacOS/Vela --hidden --port 1307

Vela Hidden Mode
API: http://127.0.0.1:1307
Key: your-api-key

Started this way, the copy runs in that terminal until you quit it, for example with ⌃C.

A short script from start to finish

This opens a page in a hidden copy, waits for it to load, saves its text and a screenshot, and shuts the copy down again:

#!/bin/sh
KEY="paste-your-key-here"
BASE="http://127.0.0.1:1307"

open -n -g -a Vela --args --hidden --port 1307
sleep 5   # give the copy a moment to start

# Is it up?
curl -s -H "X-API-Key: $KEY" "$BASE/api/status"

# Open a tab and keep its id
TAB=$(curl -s -X POST "$BASE/api/tabs" \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  | plutil -extract id raw -o - -)

# Wait for the page, then read it
curl -s -X POST "$BASE/api/tabs/$TAB/wait-for-load-state" \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"state":"load"}'
curl -s -H "X-API-Key: $KEY" "$BASE/api/tabs/$TAB/text" > page.json

# Save a screenshot
curl -s -H "X-API-Key: $KEY" "$BASE/api/tabs/$TAB/screenshot" \
  | plutil -extract data raw -o - - | base64 --decode > page.png

# Done
pkill -f "Vela.*--hidden"

The requests are the same ones the normal window answers. Only the port is different. To work inside a profile, ask GET /api/profiles for the list, then send POST /api/windows with a profileId; the answer gives you a windowId and the tabId of its first tab. The API docs have the full reference.

What is different when nobody is watching

A copy started in either mode is set up for scripts, not for people. A few things change so that it never waits for a click that will not come:

  • Pages are told they are visible. Sites that pause when a tab is in the background keep running, and pages are laid out at a normal desktop size.
  • No questions on quit. The copy stops as soon as you ask, with no prompt about restoring the session.
  • No housekeeping. It skips the welcome intro, the update check and the offer to send a crash report.
  • No password prompts in hidden mode. Saved-password autofill is switched off, so your script decides what gets typed.
  • No right-click menus. A context menu would open a real menu on screen and wait there, so it is suppressed.

The copy shares your profiles and settings with the Vela you browse in. In hidden mode, what a script does inside a profile, such as signing in to a site, is saved in that profile.

When to use the normal window instead

Hidden and headless mode are for scripts that already work. While you are still writing one, switch on the API in your normal window, as the quick start shows, and watch what each request does. Wrong selectors and pages that load slower than expected are much easier to spot when you can see them.

The same goes for anything that needs a person: a sign-in with a one-time code, a captcha, a consent screen. Do that part by hand in a visible window, and leave the hidden copy for the steps that repeat. For more on where this approach fits, read automating a real browser with a local API.

Questions, answered.

Do I have to enable the Automation API in Settings first?

No. A copy of Vela started with --hidden or --headless starts the API server by itself. It uses the API key saved in Settings, and creates one if you have never had a key.

Can I keep browsing in my normal Vela window while a hidden copy runs?

Yes. The -n flag in the launch command starts a second copy of the app next to the one you are using. Give the two copies different ports so both API servers can listen.

Which mode should I choose?

Start with hidden mode. It is the full browser with its windows made invisible, and Vela's own Settings recommend it for automation. Headless is lighter, but less compatible and it does not keep website data for tabs opened without a profile.

How do I stop a hidden or headless copy?

Run pkill -f "Vela.*--hidden" or pkill -f "Vela.*--headless" in Terminal. These copies quit at once, without the usual question about saving your session.

Keep reading.

All guides
Developers

Automate Vela with its local API: a quick start

Switch on the local API, then open a tab, read the page and save a screenshot from Terminal.

6 minMac
How the web works

Browser automation, explained: drivers, protocols and local APIs

What browser automation is for, the usual ways to do it, and where a local HTTP API in the browser itself fits.

6 minBlog
Profiles & network

How to keep work and personal apart with profiles

Give work, home and each project its own cookies and sign-ins, then switch between them from the toolbar.

6 minMac · iPhone · iPad