JANET-PM(1)
π 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 themodpathare considered privileged commands β in some environments they may require super user privileges. other project-level commands need to have a./project.janetfile 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 directoryname.new-simple-project [name]β create a new Janet project that can be installed and distributed without spork in a directoryname.new-c-project [name]β create a new C+Janet project in a directoryname.new-exe-project [name]βnew-exe-project nameβ create a new project for an executable in a directoryname.
π¦ PER-PROJECT COMMANDS π¦
depsβ install dependencies for the current project.install [repos...]β install artifacts of the current project. shorthand forjanet --install .uninstall [repos...]β uninstall the current project's artifacts. shorthand forjanet --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 byJANET_BUILD_TYPE, and the location of artifacts will be in theJANET_BUILD_DIRdirectory.cleanβ remove any generated files or artifacts. calls the(clean)hook.testβ run tests. tests should be.janetfiles in thetest/directory relative toproject.janet. will patch the module paths to load built native code without installing it. shorthand forrun 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 amainfunction that will serve as themainfunction 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 aproject.janet. defaults to_build.JANET_BUILD_TYPEβ what kind of build to make when building a bundle that has aproject.janet. should be"develop","release", or"debug".JANET_CURLβ where to get the"curl"command when handlingproject.janet. defaults to"curl".JANET_GITβ where to get the"git"command when handlingproject.janet. defaults to"git".JANET_OFFLINEβ if set to1,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 tohttps://github.com/janet-lang/pkgs.git.JANET_PREFIXβ where POSIX toolchain will look for Janet headers andlibjanet.a. by default, will try to autodetect by searching through thesyspath, thePREFIXenvironment variable,/usr/, and/usr/local. most installs should not need to set this, but otherwise should be set to whateverPREFIXwas whenjanetwas installed.JANET_TARβ where to get the"tar"command. defaults to"tar".JANET_TOOLCHAINβ name of the toolchain to use to compileproject.janetbased natives. should be one of"gcc","clang","msvc", or"cc". defaults to autodetecting based on the presence of other environment variablesMSVC,GCC,CLANG, andCC. will then finally default to whatever compiler was used to compile thejanetexecutable running this script. this is the output ofjanet -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
- arch rolling: janet-spork 1.3.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms