Repository navigation
minimal 0.7.0
Minimal 0.7.0
0.7.0 is the networking release. A session can now have its own address, a name
you can open in a browser, rules for what it may reach, and ports it publishes
while it runs. Around that, setup that needs root moved into one reviewable
command, a machine can run more than one VM, and bug reports can be uploaded
straight from the CLI.
What's new
Choose how a session is connected
min session activate --network <none|host_ip|own_ip> picks the session's
network.
host_ipshares your machine's network. It is the default, and it is how
sessions behaved before.own_ipgives the session its own IP address. This is the mode that supports
published ports and per-session rules.nonegives the session no network at all.
Decide what a session can reach
You can now say which destinations a session is allowed to reach, and Minimal
enforces it.
min session activate --network own_ip --allow-dns-hosts github.com
--allow-dns-hosts <host>allows a hostname. The session reaches that host by
name and nothing else.--allow-subnets <cidr>allows an address range.--deny-subnets <cidr>
carves a range back out.--allow-protocols <tcp|udp|icmp>limits the protocols.--deny-all-egressstates plainly that the session reaches nothing outside
itself.
An own_ip session with no rules reaches no external address. Activation says so
in one line and shows the flag that opens it up. A host_ip session with no rules
keeps full access, as before.
A task run follows the network and the rules of its session.
min session policy <session> shows the rules a session ended up with, and
min dash shows them in the detail pane.
Reach a session by name
Every session gets a name: <name>.min.internal.
- On a fresh install it works through a local HTTP proxy. Activation prints the
proxy address. - After
min finalize-install, the name also resolves in every program on
your machine. A browser still opens it through the proxy. - Sessions can reach each other by name, subject to both sessions' rules.
- From inside a session,
host.min.internalis your machine.
Publish ports, up front or while you work
--ingress <external>:<internal>publishes a port when the session starts.--dynamic-ingress <allow|ask|deny>decides what happens when something in
the session asks for a port later.allowpublishes it,askprompts you in
the attached terminal, anddenyrefuses.--dynamic-range <lo-hi>bounds
the portsallowwill publish.- Inside the session,
min net expose <port>asks for a port. A server that
starts listening inside the allowed range is published without a command,
and withdrawn when it stops. min net forward <session> <local>:<port>puts a session port on
localhost:<local>. It works in every network mode and needs nothing
installed in the session.
min session policy lists the ports a session published at runtime. Every
decision to publish or refuse is recorded.
One command for the setup that needs root
The installer never asks for root. Anything that does need it is collected
into min finalize-install, which runs it in one sudo call.
min finalize-install --showlists what this machine is still missing and
runs nothing.min finalize-install --show --scriptprints the exact script so you can
read it first.min finalize-install --undoremoves everything it installed.
The installer offers to run it when your machine needs it. If you skip it,
Minimal keeps working, and session names open through the proxy.
More than one VM
--vm <name>runs a named VM with its own state beside the default one.
Sessions in different VMs are still addressed by name.- VM-backed sessions on Linux (
--provider local-minvmd, available since
0.5.1) get the same networking as macOS: names, rules and published ports,
enforced outside the VM.
Send a bug report from the CLI
min bug --uploadcollects a diagnostic bundle and uploads it. It prints a
report link you can share and a command that deletes the bundle.min diag upload <path>uploads a bundle collected earlier.min diag delete <id> <token>removes an uploaded bundle. The upload prints
this command with the id and token filled in. Bundles expire on their own
after 7 days.- No account or token is needed to upload. Credentials are scrubbed from the
logs that go into a bundle.
Sessions that are harder to lose
- A session keeps running when your terminal or connection goes away, and
a lostexecends only its own command. min session attach,execandpolicyaccept a unique prefix of a
session id as well as a name.- When the daemon ends your attach, you get a one-line reason and exit code
254, not a silent disconnect. min stop --forcecan stop a VM that has stopped responding.- Running a command that does not exist in the session exits 127 with
command not found. - Activation fails up front, with the reason, when a package cannot be
resolved or the machine cannot create the sandbox.
Everyday polish
min addkeeps the comments and layout of yourminimal.toml, suggests
close matches for a misspelled package, and shows download progress.min addoffers to create aminimal.tomlwhen the project has none.- The installer takes
--version <version>to install a specific release. - Uninstall advice now covers the whole install.
- Errors, warnings and refusals across
min,min ls,min dashand
activation were rewritten in plain language. Each one states the situation
or names the next command to run. - Session start prints fewer lines.
Breaking changes
These affect anyone upgrading from 0.6.0.
[harness]inminimal.tomlno longer loads. Rename the table to
[stack]. The error names the file to edit.min ssh-forwardis removed. Use
min net forward <session> <local>:<port>.- The daemon's HTTPS reverse proxy and client certificates are removed.
min loginno longer issues a certificate. Reach a session by its
<session>.min.internalname or withmin net forward. - Session names must be valid hostnames. Letters, digits and hyphens
only. Names are case-insensitive, soWebandwebare the same session.
host,local,localhostandminimaldare reserved, and a name shaped
like a session id is refused. Rename older sessions that do not fit with
min session rename.
Good to know
- An
own_ipsession with no egress flags reaches nothing outside itself. Add
--allow-dns-hostsor--allow-subnets, or--allow-subnets 0.0.0.0/0for
everything. - An egress rule that names only hostnames reaches those hosts and no address
directly. - Sessions have no IPv6 path yet.
- Egress rules are enforced on
own_ipsessions. Ahost_ipsession enforces
only--deny-all-egress. On macOS and on a Linux VM host this works out of
the box. On a native Linux host it needsmin finalize-install; until then
the session starts with a note that its rules are not enforced. Where
deny-all is enforced, ahost_ipsession with a narrower rule is refused.
Use--network own_ipwhen the rules matter. - The older
--networkspellingsno-net,host-netandown-ipstill
work.
Known issues
- On macOS and on a Linux VM host,
min session execcan hang when you pipe
a large input into a command that also writes a lot of output. 1 to 5 MB
throughcatworks. 10 MB hangs in about half of runs.min task runwith
piped input can stall after a few hundred KB. The hang takes the session's
connection with it, and the client gives up after about 75 seconds. A fix
is in review for the next release.
Fixed
- A stalled client can no longer stall the daemon or other sessions.
- A burst of
min session execcalls fails fast instead of hanging. min task runno longer hangs on an open stdin pipe, and it honours the
task's arguments and working directory.- Hard links survive the project upload.
- Disk space is returned to the host as sessions free it, and Minimal warns when
the host is too full to back the VM's disk. - The VM shuts down cleanly when it is stopped, and a leftover network
helper from an earlier run is cleaned up at the next start. - Session rename updates the name inside the running session.
- Piping
minoutput into a command that exits early no longer prints an
error.