Fixed proxy handling
[zeroinstall.git] / 0install.1
blob29fa1aed17cbab6541d07eb1ef5fe8a3ce4449f5
1 .TH 0INSTALL 1 "2011" "Thomas Leonard" ""
2 .SH NAME
3 0install \(em a decentralised software installation system
5 .SH SYNOPSIS
7 .SS Downloading and running:
9 .B 0install select \fBURI\fP
11 .B 0install download \fBURI\fP
13 .B 0install run \fBURI\fP [\fBARG\fP]...
15 .B 0install update \fBURI\fP
17 .SS Other commands:
19 .B 0install config [NAME [VALUE]]
21 .B 0install import \fBFEED\fP
23 .B 0install list \fBPATTERN\fP
25 .B 0install add-feed \fBFEED\fP
27 .B 0install remove-feed [\fBINTERFACE\fP] \fBFEED\fP
29 .B 0install list-feeds \fBURI\fP
31 .B 0install digest \fBDIRECTORY\fP | \fBARCHIVE\fP [\fBEXTRACT\fP]
33 .SH DESCRIPTION
34 .PP
35 Zero Install is a decentralised cross-distribution software installation
36 system. Programs and libraries are identified by URIs, and there is no need
37 for a central repository. Zero Install ensures that packages cannot conflict
38 with each other and that programs can be shared between mutually untrusting
39 users. See the web-site for more information:
41 http://0install.net/
43 The simplest case is to ask 0install to run a program, given its URI. For
44 example:
46 .B 0install run http://rox.sourceforge.net/2005/interfaces/Edit
48 .PP
49 The first time you do this, details about available versions of the program are
50 downloaded and cached, along with details about any libraries it depends on.
52 Zero Install will run a solver to select the best version of each component
53 to use. For example, it will select binaries that are compatible with your
54 CPU and operating system, in your preferred language, and marked "stable" (by
55 default).
57 If $DISPLAY is set, 0install will display a window where you can confirm (or
58 change) the selected versions.
60 It will then download the corresponding archives for those version and store
61 them in the cache too. Each package unpacks to its own directory.
63 Finally, 0install will launch the program, setting environment variables to
64 let it locate its libraries.
66 .SH GLOBAL OPTIONS
68 The first non-option argument to 0install is the particular sub-command you
69 want to perform; these are described in detail in the next section.
71 However, there are some options that apply to all operations. These are:
73 .TP
74 \fB\-c\fP, \fB\-\-console\fP
75 Never use the GUI. Normally, 0launch switches to graphical mode if it needs to
76 download anything from the network (unless DISPLAY is not set).
78 .TP
79 \fB\-h\fP, \fB\-\-help\fP
80 Show the built-in help text.
82 .TP
83 \fB\-o\fP, \fB\-\-offline\fP
84 Run in off-line mode, overriding the default setting. This prevents 0install
85 from checking for updates, and from downloading updates even if it knows about
86 them.
88 .TP
89 \fB\-v\fP, \fB\-\-verbose\fP
90 More verbose output. Use twice for even more verbose output.
92 .TP
93 \fB\-\-with\-store=DIR\fP
94 Append a directory to the list of implementation caches. Each sub-directory
95 of DIR contains the contents of one version of a program or library.
97 .SH SUB-COMMANDS
99 .SS 0install select [OPTIONS] URI
102 Select a version of the program identified by URI, and compatible versions of
103 all of its dependencies. The information about available version is
104 downloaded if it's not yet in the cache.
107 The URI can be either an HTTP URL, such as
108 `http://site/program.xml', or a local path name like `/path/to/program.xml'.
111 For HTTP URLs, the remote file is a signed XML document. If the key is not
112 known and trusted, you will be prompted to accept it first. Local feed files
113 are not signed (any signature will be ignored).
116 You can also specificy a local selections document, as created previously using
117 the \fB\-\-xml\fP option, rather than a feed. In that case, 0install simply
118 uses those versions without running the solver.
121 After selecting (but not downloading) a set of versions, the selection is
122 displayed in a human-readable format. Use \fB\-\-xml\fP to get
123 machine-readable output.
126 If a set of versions cannot be selected using the cached information, 0install
127 will check for updates first.
130 If a set of versions can be selected based on the currently-cached information,
131 but that information is getting stale, 0install will immediately return the
132 current selection and will also start a background process to check for updates.
133 The `freshness' configuration setting controls when cached information is
134 considered to be stale.
137 Options for select:
140 \fB\-\-before=VERSION\fP
141 Select a version earlier than VERSION (i.e. force the use of an old version of
142 the program). You can only restrict the version of the program itself using this
143 option, not the version of any dependencies.
146 \fB\-\-command=COMMAND\fP
147 Some programs provide multiple commands. This selects which one you want. Common
148 values are `run' (the default), `test' (used by 0test) and `compile' (used by
149 0compile). You can also use \fB\-\-command=""\fP if you don't want to run any
150 command (for example, if the package contains data rather than a program).
153 \fB\-\-message=MESSAGE\fP
154 If we show a dialog box for the download, display MESSAGE to the user to
155 explain why the download is needed.
158 \fB\-\-not\-before=VERSION\fP
159 The selected version must not be earlier than VERSION.
160 e.g. if you want to run version 2.0 or later, use \fB\-\-not\-before=2.0\fP.
163 \fB\-\-refresh\fP
164 Download a fresh copy of all used feeds before selecting. Normally, cached
165 copies will be used if available (checking for updates later, in the
166 background).
169 \fB\-\-source\fP
170 Select source code rather than a binary. This is used internally by `0compile'.
173 \fB\-\-xml\fP
174 Print the set of chosen implementations as an XML document to stdout. This can
175 be used later with the `download' and `run' sub-commands.
179 `select' returns an exit status of zero if it selected a set of versions, and
180 a status of 1 if it could not find a consistent set.
183 .SS 0install download [OPTIONS] URI
185 This behaves similarly to `0install select', except that it also downloads the
186 selected versions if they are not already cached. Unlike `select', it does not
187 print the selected versions by default.
189 All options for `select' can also be used for `download'. In addition, these
190 options are available:
193 \fB\-\-show\fP
194 Print the selected versions in a human-readable format to stdout.
197 `download' returns an exit status of zero if it selected a suitable set of
198 versions and they are now all downloaded and in the cache. It returns a
199 status of 1 otherwise.
202 .SS 0install run [OPTIONS] URI [ARGS]
205 This behaves similarly to `0install download', except that it also runs the
206 program after ensuring it is in the cache.
209 To avoid having to keep typing the full URI, use the 0alias(1) command
210 to create shortcuts to run your programs.
213 All options for `select' and `download' can also be used for `run'. In
214 addition, these options are available:
217 \fB\-m\fP, \fB\-\-main=MAIN\fP
218 Run the specified executable instead of the default. If MAIN starts with '/'
219 then the path is relative to the implementation's top-level directory,
220 whereas otherwise it is relative to the directory containing the default
221 MAIN program. For example, if the default MAIN is \fBbin/svn\fP then
222 using \fB\-\-main=svnadmin\fP will run \fB.../bin/svnadmin\fP instead.
223 This option has been largely superseded by the newer \fB\-\-command\fP option.
226 \fB\-w\fP, \fB\-\-wrapper=WRAPPER\fP
227 Instead of executing the chosen program directly, run \fBWRAPPER PROGRAM ARGS\fP.
228 This is useful for running debuggers and tracing tools on the program (rather
229 than on 0install!). Note that the wrapper is executed in the environment selected
230 by the program; hence, this mechanism cannot be used for sandboxing. See the
231 DEBUGGING section below.
234 `run' returns an exit status of 1 if the download step failed. Otherwise,
235 the exit status will be the exit status of the program being run.
237 .SS 0install update [OPTIONS] URI
240 Check for updates to the program and download them if found. This is similar to
241 \fB0install download \-\-refresh\fP, except that it prints information about
242 whether any changes were found.
245 The options are the same as for `select'.
247 .SS 0install import FEED
250 Import a feed from a local file, as if it had been downloaded from the network.
251 This is useful when testing a feed file, to avoid uploading it to a remote
252 server in order to download it again. The file must have a trusted digital
253 signature, as when fetching from the network.
256 It is also useful when installing a feed from a CD or similar. Note: to create
257 a full bundle, for archiving or distribution on CD, see 0export(1).
259 .SS 0install add-feed FEED
262 Register an additional source of implementations (versions) of a program.
265 For example, when you check out a developer version of a project, it may
266 contain an XML feed file. To add this version to the list of available
267 versions, use `add-feed' on the XML file. The file is not copied, so you don't
268 need to re-add the feed each time it is updated. You will probably also want to
269 set the `help_with_testing' configuration option to ensure that testing
270 versions are selected by default.
273 Note that if you just want to run the program, you can invoke 0install on the
274 feed file directly (without using `add-feed'). This will force the it to
275 use that version, but won't affect what happens when you run it using the URI
276 as normal. Use `add-feed' when you want to use the developer version even when
277 using the URI, or if the program is a library (and thus referenced by URI by
278 other programs).
280 .SS 0install remove-feed [INTERFACE] FEED
283 Un-register a feed, reversing the effect of `add-feed'. If INTERFACE is not
284 given, you will be prompted to choose which INTERFACE to remove it from.
286 .SS 0install list-feeds URI
289 List all extra feeds added to URI using `add-feed'.
291 .SS 0install list PATTERN
294 List all known interface (program) URIs. If a search term is given, only
295 URIs containing that string are shown (case insensitive).
297 .SS 0install config [NAME [VALUE]]
300 View or change configuration settings.
303 With no arguments, `0install config' displays all configuration settings.
304 With one argument, it displays the current value of the named setting.
305 With two arguments, it sets the setting to the given value.
307 .SS 0install digest DIRECTORY | ARCHIVE [EXTRACT]
310 Calculate the secure hash of an implementation. This is a unique "fingerprint" of
311 a directory and all the files and subdirectories it contains. When publishing a
312 program using 0install, this value must be placed in the XML file.
315 \fB\-m\fP, \fB\-\-algorithm=HASH\fP
316 Select the secure hash function to be used. Supported values are "sha1new" (the
317 default) or "sha256".
320 If an archive is given then the hash is for the directory that would be created if
321 the archive were unpacked (or the EXTRACT subdirectory of it, if one is specified).
322 See also: 0store(1)'s manifest command.
324 .SS 0install --version
325 This can be used (without any command) the get version of 0install itself:
327 .SH DEBUGGING TIPS
330 To debug 0install itself, use the \-\-verbose and \-\-console options. For
331 example:
333 .B $ 0install \-vvc run http://myprog
336 To trace or debug programs run by 0install, use the \-\-wrapper option.
337 For example, to run \fBmyprog \-\-help\fP, displaying all calls to open(2):
339 .B $ 0install run \-\-wrapper="strace \-e open" http://myprog \-\-help
341 If your program is interpreted (e.g. a Python program), and you wish to debug
342 the interpreter running it, you can do it like this:
344 .B $ 0install run \-\-wrapper="gdb \-\-args python" http://myprog \-\-help
346 .SH FILES
348 Configuration files (see freedesktop.org basedir spec):
350 .IP "~/.config/0install.net/injector/global"
351 Global configuration settings.
353 .IP "~/.config/0install.net/injector/trustdb.xml"
354 List of trusted keys.
356 .IP "~/.config/0install.net/injector/feeds"
357 Per-feed information (e.g. time of last check).
359 .IP "~/.config/0install.net/injector/interfaces"
360 Per-interface settings (preferred stability and any extra feeds that have been
361 registered).
364 Cached data (can be re-downloaded if lost):
366 .IP "~/.cache/0install.net/interfaces"
367 Downloaded cached feed files.
369 .IP "~/.cache/0install.net/implementations"
370 Downloaded cached implementations, indexed by manifest digest.
373 See the 0store(1) man page for more information.
375 .SH LICENSE
377 Copyright (C) 2010 Thomas Leonard.
380 You may redistribute copies of this program under the terms of the GNU Lesser General Public License.
381 .SH BUGS
383 Please report bugs to the developer mailing list:
385 http://0install.net/support.html
387 .SH AUTHOR
389 The Zero Install Injector was created by Thomas Leonard.
391 .SH SEE ALSO
392 0alias(1), 0store(1), 0launch(1)
394 The Zero Install web-site:
396 .B http://0install.net