Captain is one command-line program, captain. It holds the whole
toolchain: the checker, the compiler, the inspector, the planner, the
virtual machine, the run-log replayer and a language server for editors.
Nothing else is needed to check, build and run a program on your own
machine.
Getting the binary
Official binaries are built by Frogfish and published as the package
@frogfish/captain through Gritpack, Frogfish's package manager:
$ gritpack install @frogfish/captainThis puts captain on your path. Which versions are published, and for
which platforms, is on Versions and VM
generations.
Check what you have:
$ captain --version
captain 0.6.0+build-386The part after +build- is the build number: the number of commits that
lead to the commit the binary was built from. Every machine that builds a
commit gives it the same number.
captain --license prints the license the binary is distributed under, and
captain --copyright prints its copyright notice in a form tools can read.
Official binaries are licensed by Frogfish LLC under the Frogfish Binary
License 1.0, and each package carries the notices for the third-party
components it includes.
What else a program may need
A pure program needs nothing but captain. Programs with effects need what
their effects use:
- programs they run with
exec, found on the machine where the effect runs. A wrapper module states the version it needs withrequires tool:, andcaptain inspectlists the tools an artifact uses; - the system OpenSSH client, for programs that enter another machine
with
on host: ... using: #Ssh do: [ ... ]. Captain usessshin batch mode. The remote machine needssshdand the tools the program runs there, and nothing of Captain (Frontiers); - secrets, supplied when the program runs, never written into it (Secrets, receipts and grants).
Editor support
captain lsp is a language server that speaks the Language Server Protocol
over standard input and output. Point an editor's LSP client at it for
.capt files (and Forge's .forge files) to get the checker's diagnostics
as you type. captain check --json gives the same diagnostics as one JSON
document, for tools that are not editors.
The examples in this book
Every example in this book is checked against a captain built from the
same source as the book, by the script described in the
contents. Version-specific
facts, such as which VM generation a feature needs, are collected on
Versions and VM generations.