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:

http://0install.net/

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 (unless DISPLAY is 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 of DIR contains 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 are run (the default), test (used by 0test) and compile (used by 0compile). 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 for 0install 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 by 0compile ๐Ÿง‘โ€๐Ÿ’ป
  • --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 > 127 stay exactly as they are
      • / becomes __
      • other characters become _code_, where code is the lowercase hex value of the byte
  • --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 the download and run sub-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 is bin/svn, then --main=svnadmin will run .../bin/svnadmin instead. This option has been largely superseded by the newer --command option, so it's a bit of a retired queen ๐Ÿ‘‘
  • -w, --wrapper=WRAPPER โ€” instead of running the chosen program directly, runs WRAPPER 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 config displays 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 to 0install add when 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 using XDG_CONFIG_HOME, XDG_CONFIG_DIRS, XDG_CACHE_HOME and XDG_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/config and $ZEROINSTALL_PORTABLE_BASE/cache instead ๐ŸŽ’
  • 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 ๐Ÿ”—

0store(1), 0launch(1)

the Zero Install web-site:

http://0install.net


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 ๐Ÿ‘‘๐ŸŒˆ