Previous: , Up: Programming Interface   [Contents][Index]

6.8 Invoking guix repl

The guix repl command spawns a Guile read-eval-print loop (REPL) for interactive programming (see Using Guile Interactively in GNU Guile Reference Manual). Compared to just launching the guile command, guix repl guarantees that all the Guix modules and all its dependencies are available in the search path. You can use it this way:

$ guix repl
scheme@(guile-user)> ,use (gnu packages base)
scheme@(guile-user)> coreutils
$1 = #<package coreutils@8.29 gnu/packages/base.scm:327 3e28300>

In addition, guix repl implements a simple machine-readable REPL protocol for use by (guix inferior), a facility to interact with inferiors, separate processes running a potentially different revision of Guix.

The available options are as follows:

-t type

Start a REPL of the given TYPE, which can be one of the following:


This is default, and it spawns a standard full-featured Guile REPL.


Spawn a REPL that uses the machine-readable protocol. This is the protocol that the (guix inferior) module speaks.


By default, guix repl reads from standard input and writes to standard output. When this option is passed, it will instead listen for connections on endpoint. Here are examples of valid options:


Accept connections on localhost on port 37146.


Accept connections on the Unix-domain socket /tmp/socket.

-L directory

Add directory to the front of the package module search path (see Package Modules).

This allows users to define their own packages and make them visible to the command-line tool.


Inhibit loading of the ~/.guile file. By default, that configuration file is loaded when spawning a guile REPL.

Previous: , Up: Programming Interface   [Contents][Index]