SNOW-CHIBI(1)

๐Ÿ“ฆ version 0.12, in ubuntu jammy, ubuntu noble, ubuntu stonking

๐Ÿ’– SNOW-CHIBI ๐Ÿ’–

okay bestie, welcome to snow-chibi, section 1 of the General Commands Manual โ€” aka the Snow package manager, aka the way you share R7RS libraries with the world. it's giving main character energy and it's all yours ๐Ÿซถ


โœจ NAME โœจ

snow-chibi โ€” the Snow package manager ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

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

like, that's the whole vibe. options, then a command, then whatever arguments that command wants ๐ŸŽ€


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so Chibi Scheme ships with a package manager built on Snow2, and its whole job is letting you share R7RS libraries with other people. packages get distributed as tar gzipped files โ€” they're literally called โ€œsnowballsโ€ ๐ŸŽ€ โ€” and one single snowball can hold multiple libraries inside it. cute, right? โœจ


๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

๐Ÿ” Querying packages and status

by default snow-chibi goes looking for packages in the public repository, but you can customize that with the --repo option if you're feeling custom. you can absolutely just browse packages on the site, but bestie, you can also search and query straight from the command-line tool. no cap. ๐Ÿ’…

  • search terms ... โ€” prints you a whole list of available packages matching the keywords you gave it ๐Ÿ”Ž
  • show names ... โ€” shows the detailed tea on the packages you list. those names can be sexp library names, or the dotted shorthand that Chibi Scheme uses. for example:
snow-chibi show "(chibi match)"

can be shortened to:

snow-chibi show chibi.match

โœจ iconic, honestly.

  • status names ... โ€” prints the installed version of the packages you name. packages that aren't installed just won't show up at all (ghosted ๐Ÿ’€). and if you give it no names, it prints every currently installed package. the full roster ๐ŸŒˆ
  • implementations โ€” prints the Scheme implementations that are currently installed and supported by snow-chibi. if an implementation is found but it's running an older version, you get a warning printed at you. consider that your vibe check โš ๏ธ

๐Ÿ“ฆ Managing packages

the basic package management functionality, bestie: installing, upgrading, and removing packages. the holy trinity ๐Ÿซถ

  • install names ... โ€” installs the packages you name. package names can be sexp lists or use the dotted shorthand. explicit names for packages are optional, because 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'll be asked to confirm which implementation to install (so pay attention, no autopilot ๐Ÿ˜ญ).

you can also skip the repository entirely and install a manually downloaded snowball by handing it a path to that file instead of a name. lowkey the move when you've got a snowball sitting in your downloads folder ๐ŸŽ€

  • upgrade names ... โ€” upgrades the packages if new versions are available. give it no names and it upgrades all the eligible packages. spring cleaning energy ๐Ÿงš
  • remove names ... โ€” uninstalls the packages you name. heads up though: if the packages were not installed with snow-chibi, they cannot be removed. not yours to delete, bestie ๐Ÿ™ˆ
  • update โ€” snow-chibi keeps a local cache of the remote repository and updates it only periodically for performance reasons, but you can force an update with this command whenever you're impatient โญ
  • index files ... โ€” if you installed a package manually, you can use this command to move that package under snow-chibi supervision. just pass the path to the package files that contain the installed R7RS library. adoption arc complete ๐Ÿฅน

โœ๏ธ Authoring packages

creating packages happens through the package command, though a bunch of the other commands let you upload to public repositories too. you're not just consuming, you're creating ๐ŸŒˆ

  • package files ... โ€” creates a package snowball from the files you give it, which should be R7RS library files containing define-library forms. include files are inferred and packaged automatically (yes, automatically, we love a self-sufficient queen ๐Ÿ‘‘). you can share packages directly, or upload them to a snow repository so people can install them automatically with zero effort.
  • upload files ... โ€” signs and uploads to the default snow host. the files can be either .tgz package files, or files containing define-library forms just like in the package command, and packages get generated from them automatically. before you can upload to the default host, a key must be generated and registered first โ€” that's what the gen-key and reg-key commands are for. do the paperwork first, bestie ๐Ÿ”‘
  • gen-key โ€” creates a new key, with your name, your email address, and optionally an RSA public key pair (disabled by default in the current implementation). the key gets saved locally to ~/.snow/priv-key.scm. you need to register it with reg-key before it can be used for uploads. no registration, no uploading, periodt ๐Ÿ’…
  • reg-key โ€” registers your key on the default Snow host.
  • sign file โ€” signs a file with your key and writes it out to the .sig file. you can use this together with the verify command for testing, but otherwise you don't need it, because the upload command generates the signature automatically. convenient, right? โœจ
  • verify sig-file โ€” prints a message telling you whether a signature is valid. the moment of truth ๐Ÿ•ต๏ธ

๐ŸŽฒ Miscellaneous

  • help โ€” prints the command-line reference. the classic. when in doubt, ask for help ๐Ÿซถ

more coming, bestie โ€” don't go anywhere ๐Ÿ’œ

โœจ OPTIONS โœจ

okay bestie, this is the big one โ€” every switch, every flag, every little knob you can twist. buckle up, we're going through all of them. ๐Ÿ’…

๐Ÿ’– General options ๐Ÿ’–

these are the universal vibes, they work pretty much everywhere.

  • -v, --verbose โ€” spill the extra tea: print additional informative messages. ๐Ÿ—ฃ๏ธ
  • -y, --always-yes โ€” answer every question with yes. no take-backs. โœ…
  • -n, --always-no โ€” answer every question with no. hard pass. โŒ

๐ŸŒธ Implementation selection ๐ŸŒธ

so these options pick which implementations get the packages. by default? packages are installed only for Chibi Scheme. you can use the implementations command to list available implementations. โœจ

  • --impls=impl1,impl2... โ€” comma-separated list of implementations for which libraries are to be installed.
    • Use all to install for all available implementations. ๐ŸŒˆ
  • --program-implementation=impl โ€” implementation for which to install executable programs. ๐Ÿ‘‘

๐Ÿ” Package verification ๐Ÿ”

these let you manually override or enforce consistency and authenticity checks for installed or uploaded packages. yes, we're being extra secure. ๐Ÿ›ก๏ธ

  • --require-sig โ€” verify signatures on packages before installing them. no sig, no entry. ๐Ÿšซ
  • --ignore-sig โ€” do not verify package signatures when installing. living dangerously, i see. ๐Ÿ’€
  • --ignore-digest โ€” do not verify package checksums when installing. checksum? never heard of her. ๐Ÿ™ˆ
  • --skip-digest โ€” do not compute checksums when making packages if there is no signing key configured. ๐Ÿงš
  • --skip-version-checks โ€” do not verify implementation versions for compatibility. compatibility is a social construct. ๐Ÿ’…
  • --sign-uploads โ€” sign uploaded packages with the signing key if it is configured. make it official. โœ๏ธ

๐Ÿ“ฆ Package installation ๐Ÿ“ฆ

these modify the default behavior of the install and upgrade commands when installing packages. very handy, very demure. ๐ŸŽ€

  • --skip-tests โ€” do not run tests even if they are present. ain't nobody got time. โญ๏ธ
  • --show-tests โ€” show test output even if they are successful. let me see the receipts. ๐Ÿงพ
  • --install-tests โ€” install test-only libraries. normally these are skipped. ๐Ÿงช
  • --auto-upgrade-dependencies โ€” upgrade installed dependencies when newer versions are available. glow-up time. โœจ
  • --use-sudo={always|never|as-needed} โ€” normally sudo is used only when necessary to install system files. use this option to override the default. ๐Ÿ‘ฎโ€โ™€๏ธ

๐Ÿ—‚๏ธ Repository configuration ๐Ÿ—‚๏ธ

these override the defaults for custom repository configuration. it's giving custom setup. ๐Ÿ› ๏ธ

  • --host=URI โ€” base URI of Snow repository.
  • --repo=URI,path... โ€” comma-separated list of URIs or paths of Snow repositories. ๐Ÿ“
  • --update-strategy={always|never|cache|confirm} โ€” 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 ๐Ÿ”‘

these control the gen-key and reg-key commands used for generating new signature keys. big security energy. ๐Ÿ—๏ธ

  • --name=string โ€” name to be associated with the key. if not specified, the name will be prompted interactively. ๐Ÿ“›
  • --email=string โ€” email to be associated with the key. if not specified, the address will be prompted interactively. ๐Ÿ“ง
  • --uri=URI โ€” URI of the repository where reg-key should upload the key, if not the default host. โ˜๏ธ
  • --gen-rsa-key โ€” enable RSA key generation. ๐Ÿ”ข
  • --bits=number โ€” length of RSA key to use, between 256 and 2048 bits. not too small, not too big. ๐ŸŽฏ
  • --gen-key-in-process โ€” generate RSA key without spawning a child interpreter. no extra babies. ๐Ÿ‘ถ

โœ๏ธ Signature options โœ๏ธ

these are used by the sign command. sign, seal, deliver. ๐Ÿ’Œ

  • --output=filename โ€” store signature in the specified file rather than using the *.sig extension with the input. ๐Ÿ“
  • --digest={md5|sha-224|sha-256} โ€” message digest function to use. SHA-256 is the default. ๐Ÿงฌ
  • --email=string โ€” email address to associate with the signature. ๐Ÿ“ฉ

๐Ÿ“ Package metadata ๐Ÿ“

these 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=sexp โ€” name of the package. either an sexp library name or the dotted shorthand. ๐Ÿท๏ธ
  • --description=string โ€” short textual description of the package. tell me about it. ๐Ÿ’ฌ
  • --version=major.minor.patch โ€” version of the package. ๐Ÿ”ข
  • --version-file=path โ€” specify a text file with the version string.
    • If both --version and --version-file are present then --version takes priority. โš–๏ธ
  • --programs=prog1,prog2... โ€” comma-separated list of executable programs installed by this package. ๐Ÿƒ
  • --data-files=file1,file2... โ€” comma-separated list of extra data files installed by this package. ๐Ÿ“‚
  • --recursive โ€” recursively visit and package subdependencies as well. go deep. ๐Ÿ•ณ๏ธ
  • --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. ๐Ÿ“œ
  • --doc-from-scribble โ€” automatically generate package documentation from Scribble literate comments. see chibi-doc(1) for details. ๐Ÿ“š
  • --doc=path โ€” explicit documentation file to include with the package. ๐Ÿ“„
  • --test=path โ€” name of the test program containing test suite to run when installing the package. ๐Ÿงช
  • --test-library=sexp โ€” name of the library in the package exporting a (run-tests) function that runs the test suite. ๐Ÿƒโ€โ™€๏ธ
  • --output-dir=path โ€” directory where to put the resulting package. by default, the packages are created in the current directory. ๐Ÿ“ฆ
  • --output=path โ€” 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. ๐Ÿ›ค๏ธ
  • --sig-file=path โ€” existing signature file to use when uploading a package. ๐Ÿ–Š๏ธ
  • --uri=URI โ€” repository where the package should be uploaded, if not the default host. ๐Ÿš€

๐Ÿ“ Path configuration ๐Ÿ“

these 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. set it and forget it. ๐Ÿ—บ๏ธ

  • --local-root-repository=path โ€” repository cache directory for root. ๐Ÿ‘‘
  • --local-user-repository=path โ€” repository cache directory for non-root users. ๐Ÿ‘ค
  • --install-prefix=path โ€” prefix directory for installation. ๐Ÿ 
  • --install-source-dir=path โ€” where to install library source code. ๐Ÿ“œ
  • --install-library-dir=path โ€” where to install compiled shared libraries. ๐Ÿ“š
  • --install-binary-dir=path โ€” where to install executable programs. ๐Ÿƒ
  • --install-data-dir=path โ€” where to install data files. ๐Ÿ’พ
  • --library-extension=string โ€” filename extension for libraries (*.sld is the default for Chibi Scheme). ๐Ÿ”ค
  • --library-separator=string โ€” path separator to use for library components ("/" is the default). โž—
  • --library-path=path1,path2... โ€” comma-separated list of additional paths to search for local libraries. ๐Ÿ”

๐Ÿงฐ Installation tools ๐Ÿงฐ

these 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. the right tool for the right job. ๐Ÿ› ๏ธ

  • --builder={chibi|chicken|cyclone} โ€” name of the builder to use for compiling libraries. ๐Ÿ—๏ธ
  • --installer={chicken|cyclone} โ€” name of the installer to use for library files. ๐Ÿ“ฅ
  • --program-builder={chicken|cyclone} โ€” name of the program builder to use for executables. ๐Ÿƒโ€โ™‚๏ธ
  • --scheme-script=command โ€” 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 ...

๐Ÿš

  • --scheme-program-command=command โ€” shell command to use for running Scheme programs. you can pass additional arguments by separating them with spaces, like in --scheme-script. ๐Ÿ–ฅ๏ธ
  • --chibi-path=path โ€” path to Chibi Scheme executable.
    • By default chibi-scheme is expected to be available. ๐Ÿฃ
  • --cc=path โ€” path to C compiler.
    • This overrides the CC environment variable. ๐ŸŒŠ
  • --cflags=flags โ€” additional flags for the C compiler.
    • This overrides the CFLAGS environment variable. ๐Ÿšฉ

๐ŸŽฒ Miscellaneous ๐ŸŽฒ

the odds and ends, the little extras, the sprinkles on top. ๐Ÿง

  • --use-curl โ€” use cURL for file uploads. make sure that it is installed and available as curl in the search path. ๐ŸŒ€
  • --sexp โ€” output information in machine-readable sexp format instead of the default human-readable output. ๐Ÿค–

๐Ÿ“ฆ EASY PACKAGING ๐Ÿ’–

okay bestie, listen, the whole point of this is that sharing code should be effortless, right?? like the more annoying it is to make a package, the less people do it, and then the docs and tests never get written. so snow-chibi said "not on my watch" ๐Ÿ’… and made it so you literally never have to duplicate info anywhere. that's the vibe. the package command just goes and finds your include files (and data, and FFI files) all by itself, and it figures out your dependencies for you, no cap. and it can also handle versions, docs and tests automatically:

  • 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 โœจ

  • --authors โ€” comma-delimited list of the package authors ๐Ÿซถ
  • --maintainers โ€” comma-delimited list of the package maintainers ๐Ÿซถ
  • --license โ€” the package license ๐Ÿ“œ

these three are typically always the same, so it's highkey 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. so in that example above, unless you override stuff on the command-line, all your 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 it encourages you to keep your tests close to the code they test (iconic behaviour honestly ๐Ÿงš). so in the typical case, if you're using these conventions, you can simply run snow-chibi package lib-file without any other options. periodt. โœจ

you 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.

ngl if something's busted, go tell the Github, bestie, that's literally what it's there for ๐Ÿ™ˆ

๐ŸŒธ SEE ALSO ๐ŸŒธ

chibi-scheme(1)


and that's the whole page, babe!! this one was SNOW-CHIBI(1), version 0.9 (fluorine), dated 2020-08-08 ๐Ÿฆ‹ go make some packages and slay ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from