id = "lima" name = "Lima" homepage = "https://lima-vm.io" description = "Lima launches Linux virtual machines with automatic file sharing and port forwarding (similar to WSL2)." # `lima` is the shell wrapper, `limactl` the control command; one project. executables = ["lima", "limactl"] [dotfiles] # The file names come from the project's own table of them, # pkg/limatype/filenames/filenames.go: ConfigDir = "_config" and # TemplatesDir = "_templates" under LIMA_HOME (default ~/.lima), holding # Default = "default.yaml", Override = "override.yaml", Base = "base.yaml", # NetworksConfig = "networks.yaml" and UserPrivateKey = "user" / # UserPublicKey = "user.pub". https://lima-vm.io/docs/config/network/ names # ~/.lima/_config/networks.yaml in prose as well. # # Everything else under ~/.lima is an instance directory: the VM disk image, # sockets, PID files and logs. None of it is configuration and the disks run to # tens of gigabytes, so no instance directory is listed. paths = [ "~/.lima/_config/default.yaml", "~/.lima/_config/override.yaml", "~/.lima/_config/base.yaml", "~/.lima/_config/networks.yaml", "~/.lima/_templates/", ] # filenames.go: UserPrivateKey = "user". Lima generates this SSH key once and # installs the matching user.pub as the authorized key inside every instance. # user.pub is deliberately not in paths either: it is derived from a key that # does not travel, and the next machine generates its own pair. secret = ["~/.lima/_config/user"] # networks.yaml, from the project's template (pkg/networks/networks.TEMPLATE.yaml). # Two kinds of value live in it, so it takes two rules. # # `paths.socketVMNet` is the absolute path to the socket_vmnet executable — # "/opt/socket_vmnet/bin/socket_vmnet" on one install, a Homebrew prefix on the # next — and `paths.varRun` and `paths.sudoers` are likewise absolute # directories that must exist with root-only permissions. All three follow from # how socket_vmnet installs on this kind of machine, not from anything this box # decided, so they hold for every machine of the same OS and architecture. [[dotfiles.machine_lines]] file = "~/.lima/_config/networks.yaml" match = { key_path = ["paths.socketVMNet", "paths.varRun", "paths.sudoers"] } scope = "platform" # `networks..interface` names a host NIC ("en0"), which is a fact about # this machine's hardware — the next box may not have that interface at all. # Worth keeping so the user can rebuild this machine's bridge, never worth # handing to another. [[dotfiles.machine_lines]] file = "~/.lima/_config/networks.yaml" match = { key_path = ["networks.*.interface"] } scope = "backup" [commands] format = 1 label = "Manage Lima VMs" description = "List, start, stop and open a shell in Lima instances via limactl. Creation templates, copy and delete are left out." quality = "ai-draft" base = "fig:limactl" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/limactl.ts" license = "MIT" [[commands.subcommand]] path = ["list"] label = "List instances" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/limactl.ts" license = "MIT" [[commands.subcommand.field]] id = "json" label = "JSON output" type = "boolean" option = ["--json"] sources = ["fig"] [[commands.subcommand.field]] id = "quiet" label = "Names only" type = "boolean" option = ["-q", "--quiet"] sources = ["fig"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["json", "quiet"] [[commands.subcommand]] path = ["start"] label = "Start an instance" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/limactl.ts" license = "MIT" [[commands.subcommand.field]] id = "target" label = "Instance, template file or URL" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "tty" label = "Interactive editor" type = "boolean" option = ["--tty"] sources = ["fig"] [[commands.subcommand.task]] id = "start" label = "Start instance" fields = ["target"] required = ["target"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target", "tty"] [[commands.subcommand]] path = ["stop"] label = "Stop an instance" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/limactl.ts" license = "MIT" [[commands.subcommand.field]] id = "instance" label = "Instance" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "force" label = "Force stop" type = "boolean" option = ["-f", "--force"] effect = "exec" sources = ["fig"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["instance", "force"] [[commands.subcommand]] path = ["shell"] label = "Open a shell" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/limactl.ts" license = "MIT" [[commands.subcommand.field]] id = "instance" label = "Instance" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.field]] id = "workdir" label = "Working directory" type = "string" option = ["--workdir"] sources = ["fig"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["instance", "workdir"]