Project commands

spork-lang 0.6.0

Reference for project-aware commands and standalone file execution.

The commands in this reference belong to the spork-lang launcher. Package-owned commands, such as spork site, use the same dispatch and result contracts but own their subcommands and arguments.

CommandBehavior
spork new <name>Scaffolds a project in a new directory.
spork replStarts a REPL with project source paths and .venv packages available. Creates the environment if it is missing.
spork add <package...>Adds or updates runtime requirements in the nearest spork.it.
spork remove <package...>Removes runtime requirements from the nearest spork.it.
spork syncCreates .venv and installs manifest dependencies plus a toolchain satisfying :spork-version.
spork run [args...]Loads and calls the configured entry point. Creates the environment if it is missing.
spork testDiscovers and runs declared Spork tests.
spork checkChecks project structure, imports, exports, and compilation without writing build output.
spork buildCompiles all .spork files under :source-paths into .spork-out/.
spork distBuilds compiled output, then creates a wheel and source distribution in dist/.
spork cleanRemoves .venv/.
spork clean --allAlso removes build and distribution artifacts.
spork lspStarts the Language Server Protocol server on standard input/output.
spork versionPrints the Spork, Python, and platform versions.

Use spork <command> --help for command-specific options. Install any project-specific development dependencies before testing with spork sync --dev.

Standalone commands#

A manifest is not required for individual files or command-line expressions:

spork script.spork
spork -c '(print (+ 1 2 3))'
spork -e script.spork       # print generated Python
spork -i script.spork       # run, then enter the REPL
spork --nrepl               # start the editor-facing nREPL server

Run spork without arguments to start a standalone REPL. The --nrepl-client flag is a diagnostic client for testing an nREPL server rather than an ordinary editing workflow.