0INSTALL(1)
โจ 0INSTALL(1) โ the manual page, but make it bestie ๐
Okay so the manual name is 0install, and the header line is just here to tell you that it's the user-commands page ๐ Let's get into it, bestie ๐ซถ
โจ NAME โจ
0install โ a decentralised software installation system ๐ฆ
โจ SYNOPSIS โจ
Okay, the synopsis is where all the commands live, and they're sorted into little groups so it's not chaos ๐
๐ Downloading and running ๐
0install select URI
0install download URI
0install run URI [ARG]...
0install update URI
๐ธ Applications ๐ธ
0install add NAME URI
0install show NAME
0install update NAME
0install whatchanged NAME
0install destroy NAME
๐ Other commands ๐
0install config [NAME [VALUE]]
0install import FEED
0install list PATTERN
0install search QUERY
0install add-feed [INTERFACE] FEED
0install remove-feed [INTERFACE] FEED
0install list-feeds URI
0install man COMMAND
0install digest DIRECTORY | ARCHIVE [EXTRACT]
0install store ...
0install slave
โจ DESCRIPTION โจ
Okay so Zero Install is a decentralised cross-distribution software installation system ๐ Programs and libraries get identified by URIs, and you literally do not need a central repository. Zero Install makes sure packages cannot conflict with each other, and programs can be shared between mutually untrusting users ๐ฅ It's giving security-conscious energy, ngl ๐ For more info, check out the web-site:
The simplest move is asking 0install to run a program, given its URI. For example:
0install run http://rox.sourceforge.net/2005/interfaces/Edit
The first time you do this, details about the available versions of the program get downloaded and cached ๐พ along with details about any libraries it depends on. Main character energy โจ
Zero Install runs a solver to pick the best version of each component to use โจ For example, it'll select binaries that are compatible with your CPU and operating system, in your preferred language, and marked "stable" (by default). Iconic behaviour, honestly ๐
If $DISPLAY is set, 0install will pop up a window where you can confirm (or change) the selected versions ๐ฆ
Then it downloads the corresponding archives for those versions and stores them in the cache too ๐ซถ Each package unpacks to its own directory, so everything stays tidy ๐
Finally, 0install launches the program, setting environment variables so it can locate its libraries ๐ง Slay.
โจ GLOBAL OPTIONS โจ
The first non-option argument to 0install is the particular sub-command you want to perform ๐ These get described in detail in the next section, so stay tuned.
There are also some options that apply to every operation. They are:
-c,--consoleโ Never use the GUI ๐ Normally, 0install switches to graphical mode if it needs to download anything from the network (unlessDISPLAYis not set).--dry-runโ Do not save any changes to disk, and do not actually run the program ๐ Instead, it just prints out the changes that would have been made. Note that 0install is a very safe system, so there's generally no need to use this option ๐ It can still be useful as a learning aid or for testing.-h,--helpโ Show the built-in help text ๐ธ-o,--offlineโ Run in off-line mode, overriding the default setting ๐ฆ This stops 0install from checking for updates, and from downloading updates even if it knows about them.-v,--verboseโ More verbose output โจ Use it twice for even more verbose output ๐ฃ- *
--with-store=DIR* โ Append a directory to the list of implementation caches ๐ Each sub-directory ofDIRcontains the contents of one version of a program or library.
โจ SUB-COMMANDS โจ
okay bestie, this is where 0install actually does things ๐ each sub-command gets its own little section, so scroll and vibe ๐ฆ
๐ 0install select [OPTIONS] URI
okay so select picks a version of the program identified by URI, plus compatible versions of all of its dependencies ๐ if the info about available versions isn't in the cache yet, it gets downloaded first โจ
The URI can be an HTTP URL, like http://site/program.xml, or a local path name like file:///path/to/program.xml ๐ธ
For HTTP URLs, the remote file is a signed XML document. If the key isn't known and trusted, you'll get prompted to accept it first. Local feed files aren't signed, so any signature gets ignored ๐
You can also pass in a local selections document (the kind you made earlier with --xml) instead of a feed. In that case, 0install just uses those versions and skips the solver ๐ง
After selecting (but not downloading) a set of versions, the selection gets shown in a human-readable format. Want machine-readable output instead? Use --xml ๐ค
If a set of versions can't be selected with the cached info, 0install checks for updates first ๐
If the cached info is enough to make a selection but is getting stale, 0install immediately returns the current selection and kicks off a background process to check for updates ๐ฅ The freshness configuration setting decides when cached info counts as stale โฐ
๐
Options for select
--before=VERSIONโ select a version earlier than VERSION, so you can force an old version of the program ๐ฐ๏ธ You can only restrict the program's own version with this, not the version of any dependencies.--command=COMMANDโ some programs have multiple commands, and this picks which one you want. Common values arerun(the default),test(used by0test) andcompile(used by0compile). If you don't want to run any command at all (say the package holds data rather than a program), use--command=""๐ฆ--may-compileโ treats every source implementation as a potential binary ๐ ๏ธ This can help you figure out what needs compiling to run a program. Currently this is only available for0install select.--message=MESSAGEโ if a download shows a dialog box, MESSAGE gets displayed to explain why the download is needed ๐ฌ--not-before=VERSIONโ the selected version can't be earlier than VERSION. For example, to run version 2.0 or later, use--not-before=2.0๐--refreshโ downloads a fresh copy of all used feeds before selecting. Normally cached copies get used if they're available (and updates get checked later, in the background) ๐--sourceโ selects source code instead of a binary. This one's used internally by0compile๐งโ๐ป--version=RANGEโ requires a version of the main program within the given range ๐ฏ This can be a simple number (like--version=2.3) or a range (like--version=2.3..!2.7). Either end of a range can be left out, and the!means the range excludes the final value. You can separate alternatives with|, like"2.6..!3 | 3.2..", which allows 2.6, 2.7, 3.2 and so on, but not 2.5 or 3.0.- You can also force a particular implementation by its ID using the syntax
=FEED/ID. The ID has to be escaped:- Letters, digits,
-,., and characters> 127stay exactly as they are /becomes__- other characters become
_code_, where code is the lowercase hex value of the byte
- Letters, digits,
- You can also force a particular implementation by its ID using the syntax
--version-for=URI RANGEโ sets the range (same format as--version) for any library or sub-component ๐งฉ If URI is the main program's URI, this is the same as using--version.--xmlโ prints the chosen implementations as an XML document to stdout ๐ You can use that output later with thedownloadandrunsub-commands.
select returns an exit status of 0 if it selected a set of versions, and 1 if it couldn't find a consistent set โ
๐ 0install download [OPTIONS] URI
this behaves similarly to select, except it also downloads the selected versions if they aren't already cached ๐ฅ Unlike select, it doesn't print the selected versions by default.
All options for select work for download too. Plus, you also get:
--showโ prints the selected versions in a human-readable format to stdout ๐
download returns an exit status of 0 if it selected a suitable set of versions and they're all downloaded and in the cache โ
Otherwise it returns 1.
๐ 0install run [OPTIONS] URI [ARGS]
this behaves similarly to download, except it also runs the program after making sure it's in the cache ๐โโ๏ธ
To avoid typing the full URI over and over, use the 0install add command to create shortcuts for your programs ๐
All options for select work for run except for --xml. Plus, you also get:
-m,--main=MAINโ runs the specified executable instead of the default ๐ฌ If MAIN starts with/, the path is relative to the implementation's top-level directory. Otherwise, it's relative to the directory containing the default MAIN program. For example, if the default MAIN isbin/svn, then--main=svnadminwill run.../bin/svnadmininstead. This option has been largely superseded by the newer--commandoption, so it's a bit of a retired queen ๐-w,--wrapper=WRAPPERโ instead of running the chosen program directly, runsWRAPPER PROGRAM ARGS๐ This is useful for running debuggers and tracing tools on the program (rather than on 0install!). See the DEBUGGING section below.
Heads up, bestie: the wrapper runs in the environment selected by the program, so this mechanism cannot be used for sandboxing ๐จ
Note that any options after URI get passed along to the program being run, rather than being interpreted by 0install ๐ซถ
run returns an exit status of 1 if the download step failed. Otherwise, the exit status is whatever the program being run returned ๐
๐ 0install update [OPTIONS] URI
checks for updates to the program and downloads them if it finds any ๐ This is similar to 0install download --refresh, except it also prints info about whether any changes were found โจ
The options are the same as for select.
๐ 0install import FEED
imports a feed from a local file, as if it had been downloaded from the network ๐ This is super handy when you're testing a feed file, since you don't have to upload it to a remote server just to download it again ๐
It's also useful for installing a feed from a CD or something similar. Note: to create a full bundle, for archiving or distribution on CD, see 0export(1) ๐ฟ
The file has to have a trusted digital signature, just like when fetching from the network ๐
๐ 0install add-feed [INTERFACE] FEED
registers an additional source of implementations (versions) of a program ๐ง
For example, say you check out a developer version of a project. It might contain an XML feed file. To add that version to the list of available versions, use add-feed on the XML file ๐ป The file isn't copied, so you don't need to re-add the feed every time it gets updated. You'll probably also want to set the help_with_testing configuration option so testing versions get selected by default ๐งช
Note that if you just want to run the program, you can invoke 0install on the feed file directly (without using add-feed). This forces it to use that version, but it won't change what happens when you run the program using the URI as normal. Use add-feed when you want the developer version even when using the URI, or when the program is a library (and so other programs reference it by URI) ๐
๐ 0install remove-feed [INTERFACE] FEED
un-registers a feed, basically reversing the effect of add-feed ๐
โโ๏ธ If INTERFACE isn't given, you'll get prompted to choose which INTERFACE to remove it from.
๐ 0install list-feeds URI
lists all the extra feeds added to URI using add-feed ๐
๐ 0install list [PATTERN]
lists all locally-cached interface (program) URIs ๐๏ธ If you give it a search term, only the URIs containing that string show up (case insensitive) ๐
๐ 0install search QUERY
sends the query string to the mirror server and displays any interfaces it returns ๐
The default mirror server indexes all known feeds, regardless of quality, so you have to decide for yourself whether to trust the programs before running them ๐
๐ 0install config [NAME [VALUE]]
views or changes configuration settings โ๏ธ
- With no arguments,
0install configdisplays all configuration settings ๐ - With one argument, it displays the current value of the named setting ๐
- With two arguments, it sets the setting to the given value โ๏ธ
๐ 0install man COMMAND
shows the man-page of the given command ๐ If the single argument COMMAND is a launcher script (created by 0install add), then 0install searches for the man-page itself. Otherwise, the arguments are passed straight through to the system's man command ๐ช
This lets you do:
alias man="0install man --"
๐ 0install digest DIRECTORY | ARCHIVE [EXTRACT]
calculates the secure hash of an implementation ๐ It's a unique "fingerprint" of a directory and all the files and subdirectories it contains ๐ซ When you publish a program using 0install, this value must be placed in the XML file ๐
๐
Options for digest
-m,--algorithm=HASHโ picks the secure hash function to use. Supported values are"sha1new"(the default),"sha256"and"sha256new"๐งฎ-m,--manifestโ displays the manifest itself, with one line for each file or directory ๐-d,--digestโ displays the manifest's digest ๐ข
If an archive is given, the hash is for the directory that would be created if the archive were unpacked (or the EXTRACT subdirectory inside it, if one is specified) ๐ฆ
These options control whether you see the manifest itself, the digest, or both. If neither option is given, the digest is displayed ๐
๐ 0install --version
this can be used without any command to get the version of 0install itself ๐ธ
โจ APPLICATIONS โจ
okay so an application is basically your shortcut bestie ๐ it lets you run a program without typing the whole URL every single time. iconic, right? ๐ซถ
๐ 0install add NAME URI
okay so this one makes a brand new application called NAME (literally name it whatever you want ๐ธ) that runs the program at URI. a directory gets created (by default ~/.config/0install.net/apps/NAME) to record the current selections, the same stuff you'd get from 0install select --xml URI ๐ง
a launcher command (also called NAME) gets created in $PATH so you can just type it and go. like, to add and run ROX-Filer:
$ 0install add rox http://rox.sourceforge.net/2005/interfaces/ROX-Filer
$ rox
and if you give extra requirements (like --before, same as with 0install select), they get saved with the app and apply to all updates ๐
๐ฆ 0install show NAME | SELECTIONS
show me the current selections for this app (or the contents of a selections file you point to) ๐ by default the output looks the same as 0install select, and --xml does the same thing it does there.
-r,--root-uriโ just displays the root interface URI, aka the URI you passed to0install addwhen the app was made ๐
๐ 0install update NAME
the feeds used for the selections get updated, then a fresh set of selections is generated and saved into the app's directory ๐ you don't even have to run this yourself. if the app hasn't been updated in a while, 0install will check for updates when you run the program. it does this in the background, so it never slows down the launch โจ
if you pass extra requirements (like --before), those update the stored requirements and apply to this update and all the future ones ๐ซถ
๐ธ 0install whatchanged NAME
shows the differences between the current and previous selections for this app. some times get displayed too, and they're lowkey important:
- "Last checked" โ the last time it successfully checked for updates (even if nothing was found) โ
- "Last attempted update" โ the last time it tried to check for updates โณ
- "Last update" โ the last time changes were actually found ๐
if you see "Last attempted update", that means either the last update failed or an update is happening right now ๐
by default, only changes that resulted in a different version being selected are shown. want the full tea? use --full ๐ also, heads up: at most one set of selections is saved per day ๐
๐ 0install destroy NAME
the app NAME gets deleted, along with any launchers that were added for it. byebye ๐
๐ง 0install store ...
low-level access to the store of cached implementations. for the deets, check out the 0store(1) man-page ๐
๐งช 0install slave
runs 0install in slave mode. you can send JSON requests to the process's standard input and receive responses from its standard output ๐ค
โ ๏ธ slave mode is currently EXPERIMENTAL and likely to change, so don't build your whole life on it yet bestie.
๐ DEBUGGING TIPS ๐
okay so if 0install itself is being weird, use the --verbose and --console options ๐ต๏ธ for example:
$ 0install -vvc run http://myprog
to trace or debug the programs that 0install runs, use the --wrapper option. for example, to run myprog --help and display all calls to open(2):
$ 0install run --wrapper="strace -e open" http://myprog --help
and to run the application under the gdb debugger:
$ 0install run --wrapper="gdb --args" http://myprog --help
๐ FILES ๐
Configuration files (see freedesktop.org basedir spec):
~/.config/0install.net/injector/globalโ global configuration settings โ๏ธ~/.config/0install.net/injector/trustdb.xmlโ list of trusted keys ๐~/.config/0install.net/injector/feedsโ per-feed info, like the time of the last check โฐ~/.config/0install.net/injector/interfacesโ per-interface settings (preferred stability and any extra feeds that have been registered) ๐ฏ
Cached data (can be re-downloaded if lost):
~/.cache/0install.net/interfacesโ downloaded cached feed files ๐ฅ~/.cache/0install.net/implementationsโ downloaded cached implementations, indexed by manifest digest ๐๏ธ
See the 0store(1) man page for more information.
๐ ENVIRONMENT VARIABLES ๐
XDG_*โ the configuration and cache directories can be changed usingXDG_CONFIG_HOME,XDG_CONFIG_DIRS,XDG_CACHE_HOMEandXDG_CACHE_DIRS, as usual ๐ZEROINSTALL_PORTABLE_BASEโ if this is set, the XDG_ variables are ignored, and the configuration and cache get stored in$ZEROINSTALL_PORTABLE_BASE/configand$ZEROINSTALL_PORTABLE_BASE/cacheinstead ๐ZEROINSTALL_EXTERNAL_STOREโ when 0install wants to add an archive to the cache, it calls this program instead of doing it itself. it's used internally on Windows to connect to some .NET code, and it may change in future โ ๏ธ
โ๏ธ LICENSE โ๏ธ
Copyright (C) 2013 Thomas Leonard.
you're free to redistribute copies of this program under the terms of the GNU Lesser General Public License ๐๏ธ
๐ BUGS ๐
please report bugs to the developer mailing list:
http://0install.net/support.html
๐ฉโ๐ป AUTHOR ๐ฉโ๐ป
Zero Install was created by Thomas Leonard, with help from many others. see the Git log for details ๐ซถ
๐ SEE ALSO ๐
the Zero Install web-site:
ok bestie that's the whole thing ๐ Thomas Leonard wrote this one back in 2013 for 0INSTALL(1), and it's still giving main character energy ๐๐
๐ฆ where this page comes from
- debian bookworm: 0install-core 2.18-2
- debian trixie: 0install-core 2.18-2.1
- ubuntu jammy: 0install-core 2.16-2
- ubuntu noble: 0install-core 2.18-2ubuntu2
- ubuntu questing: 0install-core 2.18-2.1build2
- ubuntu resolute: 0install-core 2.18-2.2
- ubuntu stonking: 0install-core 2.18-2.3
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms