Skip to content
Barely

Docs / Use

Config

Docs · Config

In the app, Settings › Resources holds the memory limit, CPU cores, disk limit, how long the VM waits before it shuts down, shared folders, starting the VM at login, and Time Machine backups. Apply & Restart VM applies them. Settings › Docker holds setup's three Docker changes.

Every setting lives in ~/.barely/config.json, including the sleep settings the app doesn't show. To open it in your editor:

barely config edit
Setting Default What it does
memory_max Half your Mac's RAM The most memory the VM can take, for example "8G"
cpus 0, all cores How many CPU cores the VM can use
disk_max "100G" The most disk space the VM can take. You can raise it later, but not lower it
idle_timeout "5m" How long the VM waits unused before it hibernates (every project asleep) or shuts down (nothing running). "0" keeps it running
sleep true Put projects you aren't using to sleep, and hibernate the VM once they all are, see Sleep and hibernate
sleep_after "15m" How long a project goes unused before it sleeps. At least "30s"
sleep_signals ["traffic", "logs", "files", "cpu", "cron"] What counts as use
shares /Users, /Volumes, /private, /tmp, /var/folders Mac folders that containers can mount
start_at_login false Start the VM when you log in
backup false Include images and volumes in Time Machine backups

Changes take effect the next time the VM starts. To apply them now:

barely restart

Change one setting

You can read or change a setting without opening the file. For example, to raise the memory cap to 12 GB:

barely config set memory_max 12G

To check it:

barely config get memory_max

That prints 12G. If a value isn't allowed, set says why and leaves the file unchanged. Neither command needs the VM to be running.

Turn Docker's connection to Barely on or off

Setup's three Docker changes each have a switch in the app under Settings › Docker, and a setting:

Setting On means
docker.context barely is the current Docker context
docker.socket /var/run/docker.sock points at Barely
docker.shell_env DOCKER_HOST is set in your shell profile

barely config get shows each one as on, off, or other when something else holds it, such as Docker Desktop. Turning one off puts back what was there before setup. For example, to give /var/run/docker.sock back:

barely config set docker.socket off

Changing docker.socket asks for your password, so the app shows the command for it instead of a working switch.

Questions

When does a change take effect?

The next time the VM starts. To apply it now, click Apply & Restart VM in the app under Settings › Resources, or run barely restart.

Can I lower the disk limit?

No. The limit can be raised later, not lowered. It's only a limit: the VM's disk takes only the space it holds on your Mac.

What does other mean in barely config get?

Something else holds that connection, such as Docker Desktop.