Bottles
Search…
CLI
Using Bottles via CLI
In 2022.3.28 we have introduced a new CLI interface, which provide more features then the prior.

Launch CLI

The new interface has a dedicated command: bottles-cli .
If using Bottles as Flatpak (the suggested way), launch it with:
1
flatpak run --command=bottles-cli com.usebottles.bottles --help
2
Bottles is a tool to manage your bottles
3
​
4
positional arguments:
5
{info,list,programs,tools,reg,edit,new,run}
6
sub-command help
7
info Show information about Bottles
8
list List entities
9
programs List programs
10
tools Launch WINE tools
11
reg Manage registry
12
edit Edit a bottle configuration
13
new Create a new bottle
14
run Run a program
15
​
16
optional arguments:
17
-h, --help show this help message and exit
18
-v, --version show program's version number and exit
19
-j, --json Outputs in JSON format
Copied!
for all other packages:
1
bottles-cli --help
Copied!

Interfaces/Arguments

Since Bottles has a lot of features, to keep things organized we have divided it in multiple interfaces: info, list, programs, tools, reg, edit, new, run.

Info

The info interface can be used to access Bottles information:
1
usage: bottles-cli info [-h] {bottles-path,health-check}
2
​
3
positional arguments:
4
{bottles-path,health-check}
5
Type of information
6
​
7
optional arguments:
8
-h, --help show this help message and exit
Copied!

List

The list command is meant to be used for listing Bottles stuff:
1
usage: bottles-cli list [-h] [-f FILTER] {bottles,components}
2
​
3
positional arguments:
4
{bottles,components} Type of entity
5
​
6
optional arguments:
7
-h, --help show this help message and exit
8
-f FILTER, --filter FILTER
9
Filter bottles and components (e.g. '-f 'environment:gaming')
Copied!
the -f argument for bottles supports the environment prefix:
1
bottles-cli list bottles -f environment:gaming
Copied!
while for components the category one can be used:
1
bottles-cli list components -f category:dxvk
Copied!

Programs

The programs interface can be used to list all programs in a bottle (only added by users or installers).
1
usage: bottles-cli programs [-h] -b BOTTLE
2
​
3
optional arguments:
4
-h, --help show this help message and exit
5
-b BOTTLE, --bottle BOTTLE
6
Bottle name
Copied!

Tools

The tools interface can be used to launch any WINE utility.
1
usage: bottles-cli tools [-h] -b BOTTLE {cmd,winecfg,uninstaller,regedit,taskmgr,control,explorer}
2
​
3
positional arguments:
4
{cmd,winecfg,uninstaller,regedit,taskmgr,control,explorer}
5
Tool to launch
6
​
7
optional arguments:
8
-h, --help show this help message and exit
9
-b BOTTLE, --bottle BOTTLE
10
Bottle name
Copied!

Reg

The reg interface can be used to access and edit the bottle's Windows registry.
1
usage: bottles-cli reg [-h] -b BOTTLE -k KEY -v VALUE [-d DATA] [-t {REG_DWORD,REG_SZ,REG_BINARY,REG_MULTI_SZ}] {add,edit,del}
2
​
3
positional arguments:
4
{add,edit,del} Action to perform
5
​
6
optional arguments:
7
-h, --help show this help message and exit
8
-b BOTTLE, --bottle BOTTLE
9
Bottle name
10
-k KEY, --key KEY Registry key
11
-v VALUE, --value VALUE
12
Registry value
13
-d DATA, --data DATA Data to be set
14
-t {REG_DWORD,REG_SZ,REG_BINARY,REG_MULTI_SZ}, --key-type {REG_DWORD,REG_SZ,REG_BINARY,REG_MULTI_SZ}
15
Data type
Copied!

Edit

The edit interface can be used to edit a bottle (e.g. any parameter, environment variables, Windows version, runner, dxvk, vkd3d..).
1
usage: bottles-cli edit [-h] -b BOTTLE [--params PARAMS] [--env-var ENV_VAR] [--win WIN] [--runner RUNNER] [--dxvk DXVK] [--vkd3d VKD3D] [--nvapi NVAPI] [--latencyflex LATENCYFLEX]
2
​
3
optional arguments:
4
-h, --help show this help message and exit
5
-b BOTTLE, --bottle BOTTLE
6
Bottle name
7
--params PARAMS Set parameters (e.g. '-p dxvk:true')
8
--env-var ENV_VAR Add new environment variable (e.g. '-env-var WINEDEBUG=-all')
9
--win WIN Change Windows version (e.g. '--win win7')
10
--runner RUNNER Change Runner (e.g. '--runner caffe-7.2')
11
--dxvk DXVK Change DXVK (e.g. '--dxvk dxvk-1.9.0')
12
--vkd3d VKD3D Change VKD3D (e.g. '--vkd3d vkd3d-proton-2.6')
13
--nvapi NVAPI Change DXVK-Nvapi (e.g. '--nvapi dxvk-nvapi-1.9.0')
14
--latencyflex LATENCYFLEX
15
Change LatencyFleX (e.g. '--latencyflex latencyflex-v0.1.0')
Copied!

New

The new interface can be used to create a new bottle.
1
usage: bottles-cli new [-h] --bottle-name BOTTLE_NAME --environment ENVIRONMENT [--custom-environment CUSTOM_ENVIRONMENT] [--arch ARCH] [--runner RUNNER] [--dxvk DXVK] [--vkd3d VKD3D] [--nvapi NVAPI] [--latencyflex LATENCYFLEX]
2
​
3
optional arguments:
4
-h, --help show this help message and exit
5
--bottle-name BOTTLE_NAME
6
Bottle name
7
--environment ENVIRONMENT
8
Envorinment to apply (gaming|application|custom)
9
--custom-environment CUSTOM_ENVIRONMENT
10
Path to a custom environment.yml file
11
--arch ARCH Architecture (win32|win64)
12
--runner RUNNER Name of the runner to be used
13
--dxvk DXVK Name of the dxvk to be used
14
--vkd3d VKD3D Name of the vkd3d to be used
15
--nvapi NVAPI Name of the dxvk-nvapi to be used
16
--latencyflex LATENCYFLEX
17
Name of the latencyflex to be used
Copied!

Run

The run interface can be used to launch an executable from a given path or any program in a bottle using its name:
1
usage: bottles-cli run [-h] -b BOTTLE [-e EXECUTABLE] [-a ARGS] [-p PROGRAM]
2
​
3
optional arguments:
4
-h, --help show this help message and exit
5
-b BOTTLE, --bottle BOTTLE
6
Bottle name
7
-e EXECUTABLE, --executable EXECUTABLE
8
Path to the executable
9
-a ARGS, --args ARGS Arguments to pass to the executable
10
-p PROGRAM, --program PROGRAM
11
Program to run
Copied!

Developers mode

We've added a --json global argument to help developers accessing stuff from the Bottles' CLI. It can be used with any interface and will return the output in JSON format. Some examples:
1
bottles-cli --json info health-check
2
{"Display": {"X.org": true, "X.org (port)": ":99.0", "Wayland": false}, "Graphics": {"vendors": {"nvidia": {"vendor": "nvidia", "envs": {"__NV_PRIME_RENDER_OFFLOAD": "1", "__GLX_VENDOR_LIBRARY_NAME": "nvidia", "__VK_LAYER_NV_optimus": "NVIDIA_only"}, "icd": "/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json"}, "amd": {"vendor": "amd", "envs": {"DRI_PRIME": "1"}, "icd": "/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json"}}, "prime": {"integrated": {"vendor": "amd", "envs": {"DRI_PRIME": "1"}, "icd": "/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json"}, "discrete": {"vendor": "nvidia", "envs": {"__NV_PRIME_RENDER_OFFLOAD": "1", "__GLX_VENDOR_LIBRARY_NAME": "nvidia", "__VK_LAYER_NV_optimus": "NVIDIA_only"}, "icd": "/usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/nvidia_icd.json"}}}, "Kernel": {"Type": "Linux", "Version": "5.16.15-201.fc35.x86_64"}, "Distro": {"Name": "GNOME", "Version": "\"42 (Flatpak runtime)\""}, "Tools": {"cabextract": true, "p7zip": true, "patool": true, "glibc_min": "2.33"}, "Bottles_envs": null}
3
​
4
bottles-cli --json list components -f category:runners
5
{"runners": ["vaniglia-7.5", "sys-wine-7.0", "caffe-7.5", "caffe-7.1"]}
Copied!
in some cases it will return more info then the classic launch, e.g. for the programs interface:
1
bottles-cli --json programs -b MyBottle
2
[{"executable": "Battle.net.exe", "arguments": "", "name": "Battle.net", "path": "C:\\Program Files (x86)\\Battle.net\\Battle.net.exe", "folder": "", "icon": "", "script": null, "removed": null}, {"executable": "EpicGamesLauncher.exe", "arguments": "-opengl -SkipBuildPatchPrereq", "name": "Epic Games Store", "path": "C:\\Program Files (x86)\\Epic Games\\Launcher\\Portal\\Binaries\\Win32\\EpicGamesLauncher.exe", "folder": "", "icon": "", "script": null, "removed": null}, {"executable": "GalaxyClient.exe", "arguments": "--in-process-gpu /runWithoutUpdating /deelevated", "name": "GOG Galaxy", "path": "C:\\Program Files (x86)\\GOG Galaxy\\GalaxyClient.exe", "folder": "", "icon": "", "script": null, "removed": null}]
Copied!
Export as PDF
Copy link
Edit on GitHub