JANET-PM(1)

πŸ“¦ version 1.3.0, in arch rolling

πŸ’… janet-pm β€” the Janet Project Manager

okay bestie, you found the manual page for janet-pm, aka the Janet Project Manager, a build tool for Janet. welcome to the group chat ✨

✨ NAME ✨

janet-pm β€” the Janet Project Manager, a build tool for Janet 🫢

🌸 SYNOPSIS 🌸

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

πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the whole deal: run janet-pm from a directory that has a project.janet file and it does operations on a project, or run it from anywhere to do operations on the global module cache (modpath). the filesystem is the group chat now. 😌

πŸ’€ privileged-command warning: 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.

πŸ“š DOCUMENTATION πŸ“š

πŸ’– GLOBAL COMMANDS πŸ’–

  • help β€” show this help text. yes, the classic.
  • install [repo...] β€” install remote bundles, and any required dependencies.
  • clear-cache β€” clear the cache of saved remote dependencies.
  • list-pkgs [search] β€” list packages in the remote package listing that contain the string search. if no search pattern is given, prints the entire package listing.
  • env name β€” create an environment with which one can install Janet dependencies and scripts in an isolated manner.
  • new-project [name] β€” create a new Janet project in a directory name.
  • new-simple-project [name] β€” create a new Janet project that can be installed and distributed without spork in a directory name.
  • new-c-project [name] β€” create a new C+Janet project in a directory name.
  • new-exe-project [name] β€” new-exe-project name β€” create a new project for an executable in a directory name.

πŸ¦‹ PER-PROJECT COMMANDS πŸ¦‹

  • deps β€” install dependencies for the current project.
  • install [repos...] β€” install artifacts of the current project. shorthand for janet --install .
  • uninstall [repos...] β€” uninstall the current project's artifacts. shorthand for janet --uninstall {current-project-name}
  • prune β€” remove any bundles that have no dependents and are marked for auto-remove.
  • build β€” build all artifacts of the project. the build configuration is determined by JANET_BUILD_TYPE, and the location of artifacts will be in the JANET_BUILD_DIR directory.
  • clean β€” remove any generated files or artifacts. calls the (clean) hook.
  • test β€” 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.
  • quickbin [entry] [output] β€” 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-lockfile [destination] β€” save all currently installed bundles to a lockfile.
  • load-lockfile [source] β€” install all bundles in the given lockfile.

🌈 ENVIRONMENT VARIABLES 🌈

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.

xoxo, bestie πŸ’– β€” that's JANET-PM(1), General Commands Manual. footer vibe: just the page title, no extra source/version/date line to copy. go make something iconic πŸ’…

πŸ“¦ where this page comes from