Scroll to navigation

SNOW-CHIBI(1) General Commands Manual SNOW-CHIBI(1)

NAME

snow-chibi - Snow package manager

SYNOPSIS

snow-chibi [options] command [arguments ...]

DESCRIPTION

Chibi Scheme comes with a package manager based on Snow2 which can be used to share R7RS libraries. Packages are distributed as tar gzipped files called "snowballs" and may contain multiple libraries.

COMMANDS

Querying packages and status

By default snow-chibi looks for packages in the public repository, though you can customize this with the --repo option. Packages can be browsed on the site, but you can also search and query from the command-line tool.

Print a list of available packages matching the given keywords.

Show detailed information for the listed packages, which can be sexp library names or the dotted shorthand used by Chibi Scheme. For example,
snow-chibi show "(chibi match)"
    
can be shortened as
snow-chibi show chibi.match
    
.

Print the installed version of the given packages. Uninstalled packages will not be shown. If no names are given, prints all currently installed packages.

Print the currently installed Scheme implementations supported by snow-chibi. If an implementation is found but has an older version, a warning is printed.

Managing packages

The basic package management functionality, installing upgrading and removing packages.

Install the given packages. Package names can be sexp lists or use the dotted shorthand. Explicit names for packages are optional, as a package can always be referred to by the name of any library it contains. If multiple packages provide libraries with the same name, you will be asked to confirm which implementation to install.

You can also bypass the repository and install a manually downloaded snowball by giving a path to that file instead of a name.

Upgrade the packages if new versions are available. If no names are given, upgrades all eligible packages.

Uninstalls the given packages. If the packages were not installed with snow-chibi they cannot be removed.

snow-chibi keeps a local cache of the remote repository and updates only periodically for performance, but you can force an update with this command.

If you have installed a package manually you can use this command to move the package under snow-chibi supervision. Just pass the path to the package files containing the installed R7RS library.

Authoring packages

Creating packages can be done with the package command, though other commands allow for uploading to public repositories.

Create a package snowball from the given files, which should be R7RS library files containing define-library forms. Include files are inferred and packaged automatically. You can share packages directly, or upload them to a snow repository for easy automated install.

Sign and upload to the default snow host. The files may either be .tgz package files, or files containing define-library forms as in the package command, from which packages are generated automatically. Before you can upload to the default host a key must be generated and registered first with the gen-key and reg-key commands.

Create a new key, with your name, email address, and optionally an RSA public key pair (disabled by default in the current implementation). The key is saved locally to ~/.snow/priv-key.scm. You need to register it with reg-key before it can be used for uploads.

Register your key on the default Snow host.

Sign a file with your key and write it to the .sig file. This can be used with the verify command for testing, but otherwise is not needed as the upload command generates the signature automatically.

Print a message verifying if a signature is valid.

Miscellaneous

Prints command-line reference.

OPTIONS

General options

Print additional informative messages.

Answer all questions with yes.

Answer all questions with no.

Implementation selection

The following options are used to select implementations for which the packages are installed. By default the packages are installed only for Chibi Scheme. You can use the implementations command to list available implementations.

Comma-separated list of implementations for which libraries are to be installed.

Use all to install for all available implementations.

Implementation for which to install executable programs.

Package verification

The following options can be used to manually override or enforce consistency and authenticity checks for installed or uploaded packages.

Verify signatures on packages before installing them.

Do not verify package signatures when installing.

Do not verify package checksums when installing.

Do not compute checksums when making packages if there is no signing key configured.

Do not verify implementation versions for compatibility.

Sign uploaded packages with the signing key if it is configured.

Package installation

The following options modify the default behavior of the install and upgrade commands when installing packages.

Do not run tests even if they are present.

Show test output even if they are successful.

Install test-only libraries. Normally these are skipped.

Upgrade installed dependencies when newer versions are available.

Normally sudo is used only when necessary to install system files. Use this option to override the default.

Repository configuration

The following options are used to override the defaults for custom repository configuration.

Base URI of Snow repository.

http://snow-fort.org is used by default.

Comma-separated list of URIs or paths of Snow repositories.

Specify when to refresh repository cache. By default the cache is refreshed automatically every 3 hours. You can also force an update, prohibit any updates, or ask for an interactive prompt.

Key generation and registration

The following options control the gen-key and reg-key commands used for generating new signature keys.

Name to be associated with the key. If not specified, the name will be prompted interactively.

Email to be associated with the key. If not specified, the address will be prompted interactively.

URI of the repository where reg-key should upload the key, if not the default host.

Enable RSA key generation.

Length of RSA key to use, between 256 and 2048 bits.

Generate RSA key without spawning a child interpreter.

Signature options

The following options are used by the sign command.

Store signature in the specified file rather than using the *.sig extension with the input.

Message digest function to use. SHA-256 is the default.

Email address to associate with the signature.

Package metadata

The following options specify the information that package and upload commands record in the created packages. Most of these data fields can be reused and specified in the configuration file, see the EASY PACKAGING section for details.

Name of the package. Either an sexp library name or the dotted shorthand.

Short textual description of the package.

Version of the package.

Specify a text file with the version string.

If both --version and --version-file are present then --version takes priority.

Comma-separated list of executable programs installed by this package.

Comma-separated list of extra data files installed by this package.

Recursively visit and package subdependencies as well.

--authors=author1,author2...
Comma-separated list of the package authors. Names may be followed by email addresses:

snow-chibi --authors="A. U. Thor <thor@example.com>" ...
    

--maintainers=maintainter1,maintainter2...
Comma-separated list of the package maintainers. Format is the same as for the --authors list.

--license=name
Package license, such as "gpl". Please consult the Snow specification for the full list of supported license codes.

Automatically generate package documentation from Scribble literate comments. See chibi-doc(1) for details.

Explicit documentation file to include with the package.

Name of the test program containing test suite to run when installing the package.

Name of the library in the package exporting a (run-tests) function that runs the test suite.

Directory where to put the resulting package. By default, the packages are created in the current directory.

Save the resulting package under the specified name.

Normally, the package file name is derived from the name and version of the package. Use this option to set the file name explicitly, it can be either a relative or an absolute path.

Existing signature file to use when uploading a package.

Repository where the package should be uploaded, if not the default host.

Path configuration

The following options are used to override defaults for local paths used for installing packages. Normally these are selected automatically based on the environment and the implementation for which the package is installed.

Repository cache directory for root.

Repository cache directory for non-root users.

Prefix directory for installation.

Where to install library source code.

Where to install compiled shared libraries.

Where to install executable programs.

Where to install data files.

Filename extension for libraries (*.sld is the default for Chibi Scheme).

Path separator to use for library components ("/" is the default).

Comma-separated list of additional paths to search for local libraries.

Installation tools

The following options are used to override defaults for tools used for installing packages. Normally they are selected automatically based on the environment and the implementation for which the package is installed.

Name of the builder to use for compiling libraries.

Name of the installer to use for library files.

Name of the program builder to use for executables.

Shell command to use for running Scheme scripts. You can pass additional arguments by separating them with spaces, for example:

snow-chibi --scheme-script="chibi-scheme -s" install ...
    

Shell command to use for running Scheme programs. You can pass additional arguments by separating them with spaces, like in --scheme-script.

Path to Chibi Scheme executable.

By default chibi-scheme is expected to be available.

Path to C compiler.

This overrides the CC environment variable.

Additional flags for the C compiler.

This overrides the CFLAGS environment variable.

Miscellaneous

Use cURL for file uploads. Make sure that it is installed and available as curl in the search path.

Output information in machine-readable sexp format instead of the default human-readable output.

EASY PACKAGING

To encourage sharing code it's important to make it as easy as possible to create packages, while encouraging documentation and tests. In particular, you should never need to duplicate information anywhere. Thus the package command automatically locates and packages include files (and data, and FFI files) and determines dependencies for you. In addition, it can automatically handle versions, docs and tests:

version can come explicitly from the --version option, or the --version-file=file option
docs can come explicitly from the --doc=file option, or be extracted automatically from literate documentation with --doc-for-scribble
tests can come either explicitly from the --test=program option, or the --test-library=lib-name which will generate a program to run just the run-tests thunk in that library

Other useful meta-info options include:

comma-delimited list of the package authors

comma-delimited list of the package maintainers

the package license

These three are typically always the same, so it's useful to save them in your ~/.snow/config.scm file. This file contains a single sexp and can specify any option, for example:

((repository-uri "http://alopeke.gr/repo.scm")

(command
(package
(authors "Socrates <hemlock@aol.com>")
(doc-from-scribble #t)
(version-file "VERSION")
(test-library (append-to-last -test))
(license gpl))))

Top-level snow options are represented as a flat alist. Options specific to a command are nested under (command (name ...)), with most options here being for package. Here unless overridden on the command-line, all packages will use the given author and license, try to extract literate docs from the code, look for a version in the file named "VERSION", and try to find a test suite with the same library name appended with -test; e.g. for the library (socratic method), the test library would be (socratic method-test). This form is an alternate to using an explicit test-library name, and encourages you to keep your tests close to the code they test. In the typical case, if using these conventions, you can thus simply run snow-chibi package lib-file without any other options.

Use can use the SNOW_CHIBI_CONFIG environment variable to specify the path to the configuration file explicitly, rather than using the default ~/.snow/config.scm

AUTHORS

Alex Shinn

REPORTING BUGS

Please report bugs on Github.

SEE ALSO

chibi-scheme(1)

2020-08-08 0.9 (fluorine)