JANET-PM(1) General Commands Manual JANET-PM(1)

janet-pm - the Janet Project Manager, a build tool for Janet

janet-pm [--flag ...] [--option=value ...] command args...

Run from a directory containing a project.janet file to perform operations on a project, or from anywhere to do operations on the global module cache (modpath). Commands that need write permission to the modpath are considered privileged commands - in some environments they may require super user privileges. Other project-level commands need to have a ./project.janet file in the current directory.

Show this help text.
Install remote bundles, and any required dependencies.
Clear the cache of saved remote dependencies.
List packages in the remote package listing that contain the string search. If no search pattern is given, prints the entire package listing.
Create an environment with which one can install Janet dependencies and scripts in an isolated manner.
Create a new Janet project in a directory `name`.
Create a new Janet project that can be installed and distributed without spork in a directory `name`.
Create a new C+Janet project in a directory `name`.
new-exe-project name Create a new project for an executable in a directory `name`.

Install dependencies for the current project.
Install artifacts of the current project. Shorthand for `janet --install .`
Uninstall the current project's artifacts. Shorthand for `janet --uninstall {current-project-name}`
Remove any bundles that have no dependents and are marked for auto-remove.
Build all artifacts of the project. The build configuration is determined by JANET_BUILD_TYPE, and the location of artifacts will by in the JANET_BUILD_DIR directory.
Remove any generated files or artifacts. Calls the `(clean)` hook.
Run tests. Tests should be .janet files in the test/ directory relative to project.janet. Will patch the module paths to load built native code without installing it. Shorthand for `run check`.
Create an executable file from a script, statically linking in any dependencies found while compiling the script. The script should contain a main function that will serve as the main function for the generated executable.
Save all currently installed bundles to a lockfile.
Install all bundles in the given lockfile.

janet-pm inherits all of the environment variables used by janet, as well some of its own. Many of these are only used in support of building bundles that use a project.janet.

JANET_BUILD_DIR

Where to create build outputs when building a bundle has a project.janet. Defaults to _build.

JANET_BUILD_TYPE

What kind of build to make when building a bundle that has a project.janet. Should be "develop", "release", or "debug".

JANET_CURL

Where to get the "curl" command when handling project.janet. Defaults to "curl".

JANET_GIT

Where to get the "git" command when handling project.janet. Defaults to "git".

JANET_OFFLINE

If set to 1, true, on, etc., will only look at packages in the local cache.

JANET_PKGLIST

The package listing repository to use to resolve package nicknames. Defaults to https://github.com/janet-lang/pkgs.git

JANET_PREFIX

Where POSIX toolchain will look for Janet headers and libjanet.a. By default, will try to autodetect by searching through the syspath, the PREFIX environment variable, /usr/, and /usr/local. Most installs should not need to set this, but otherwise should be set to whatever PREFIX was when janet was installed.

JANET_TAR

Where to get the "tar" command. Defaults to "tar".

JANET_TOOLCHAIN

Name of the toolchain to use to compile project.janet based natives. Should be one of "gcc", "clang", "msvc", or "cc". Defaults to autodetecting based on the presence of other environment variables MSVC, GCC, CLANG, and CC. Will then finally default to whatever compiler was used to compile the `janet` executable running this script. This is the output of `janet -e '(print (os/compiler))'`

VERBOSE

Print full output from running commands.

WORKERS

Number of processes to run in parallel when compiling C and C++ source code.