3 The raco planet Command-Line Tool
Link to this section with
@secref["cmdline" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["cmdline" #:doc '(lib "planet/planet.scrbl")]
The raco planet command-line tool allows a command-line interface to
the most commonly-performed PLaneT tasks. It is invoked from the
command line as
raco planet subcommand arg ...
where subcommand is a subcommand from the following list, and
arg is a sequence of arguments determined by that subcommand:
create: create a PLaneT archive from a directory
install: download and install a given package
remove: remove the specified package from the local cache
show: list the packages installed in the local cache
clearlinks: clear the linkage table, allowing upgrades
fileinject: install a local file to the planet cache
link: create a development link
unlink: remove development link associated with the given package
fetch: download a package file without installing it
url: get a URL for the given package
open: unpack the contents of the given package
structure: display the structure of a given .plt archive
print: display a file within of the given .plt archive
Each of these commands is described in more detail below. All the
functionality of the command-line tool is also provided with a programmatic interface by
the "util.rkt" library.
3.1 create
Link to this section with
@secref["create" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["create" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet create [ <option> ... ] <path>
Create a PLaneT archive in the current directory whose contents are the
directory <path>.
<option> is one of:
3.2 install
Link to this section with
@secref["install" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["install" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet install <owner> <pkg> <maj> <min>
Download and install the package that
(require (planet "file.rkt" (<owner> <pkg> <maj> <min>)))
would install.
3.3 remove
Link to this section with
@secref["remove" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["remove" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet remove [ <option> ... ] <owner> <pkg> <maj> <min>
Remove the specified package from the local cache, optionally also removing its
distribution file.
<option> is one of:
3.4 show
Link to this section with
@secref["show" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["show" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet show [ <option> ... ]
List the packages installed in the local cache.
<option> is one of:
-p, --packages: show packages only (default)
-l, --linkage: show linkage table only
-a, --all: show packages and linkage
3.5 clearlinks
Link to this section with
@secref["clearlinks" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["clearlinks" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet clearlinks
Clear the linkage table, allowing upgrades.
3.6 fileinject
Link to this section with
@secref["fileinject" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["fileinject" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet fileinject <owner> <plt-file> <maj> <min>
Install local file <plt-file> into the planet cache as though it had been
downloaded from the planet server. It is treated as though it had the given owner name as its owner name,
the given file’s filename as the its package name, and the given major and minor version numbers.
3.7 link
Link to this section with
@secref["link" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["link" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet link <owner> <pkg> <maj> <min> <path>
Create a development link (see
Development Links) between the given
package specifier and the specified directory name.
3.8 unlink
Link to this section with
@secref["unlink" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["unlink" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet unlink [ <option> ] <owner> <pkg> <maj> <min>
Remove any development link (see
Development Links) associated with
the given package.
<option> can only be:
3.9 fetch
Link to this section with
@secref["fetch" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["fetch" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet fetch <owner> <pkg> <maj> <min>
Download the given package file from the central PLaneT repository without installing it.
3.10 url
Link to this section with
@secref["url" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["url" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet url <owner> <pkg> <maj> <min>
Get a URL for the given package.
This is never necessary for normal use of planet, but may be helpful in some
circumstances for retrieving packages.
3.11 open
Link to this section with
@secref["open" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["open" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet open <plt-file> <target>
Unpack the contents of the given package into the given directory without
installing.
This command is not necessary for normal use of planet. It is intended to allow
you to inspect package contents offline without needing to install the package.
3.12 structure
Link to this section with
@secref["structure" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["structure" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet structure <plt-file>
Print the structure of the PLaneT archive named by <plt-file> to the standard
output port.
This command does not unpack or install the named .plt file.
3.13 print
Link to this section with
@secref["print" #:doc '(lib "planet/planet.scrbl")]
Link to this section with
@secref["print" #:doc '(lib "planet/planet.scrbl")]
Usage:
raco planet print <plt-file> <path>
Print the contents of the file named by <path>, which must be a relative path
within the PLaneT archive named by <plt-file>, to the standard output port.
This command does not unpack or install the named .plt file.