JUST-LOCK(1)

πŸ’– just-lock β€” the manual page, but make it make sense πŸ’–

okay bestie, this is just-lock(1) from the General Commands Manual, section 1, and I'm gonna walk you through it like we're texting at 2am. no cap, every flag stays. let's go 🫢


✨ NAME ✨

just-lock β€” generate and maintain a multi-repository configuration file

like, it makes the file. it keeps the file correct. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

just-lock [OPTION]...

that's it. just options. iconic minimalism. πŸ’…


✨ DESCRIPTION ✨

so Just-Lock is a tool that's literally several tools in a trench coat, and all of them are about generating and maintaining the just-mr-repository-config(5) of a Just project. its whole main character energy is centered around multi-repository configuration composition. periodt.

the headline act: it imports dependencies that other Just projects declared, and then generates a repository configuration you can hand straight to just-mr(1). the imported repos get renamed so that no conflicts pop off, and also so you can tell at a glance which repos they came in as a dependency of. this mirrors what tools like just-import-git(1) can do, but it's like… the upgraded version. it adds features such as letting multiple imports just happen implicitly, and supporting imports from sources that aren't Git repos β€” think distfiles, local clones, repos living under whatever arbitrary version control system you're obsessed with. 🌈

by default, the final configuration has its repositories deduplicated β€” meaning indistinguishable repositories get merged into a single entry, except for the "main" repository and any explicitly stated ones. this mirrors the standalone capability of just-deduplicate-repos(1). so you get that feature for free, no extra tool needed. πŸ”₯

and how does it know what to do? it runs these operations based on a provided just-lock-config(5) input file, and it drops the resulting configuration file either at a location you explicitly gave it, or at the location just-mr(5) expects to find it. yes bestie, it knows where the file goes. it's got main character energy AND good instincts. πŸ‘‘


✨ OPTIONS ✨

  • -h, --help β€” outputs a usage message and then exits. the classic. the "wait what were the flags again" move. πŸ™ˆ
  • -C CONFIGFILE β€” use the specified file as the input just-lock-config(5) file. if you don't specify one, it goes looking for a file named repos.in.json, and it searches the same directories just-mr searches when it's invoked with --norc while hunting for its configuration file. so like, same search behavior, different file. iykyk. πŸ’œ
  • -o CONFIGFILE β€” use the specified file as the output just-mr-repository-config(5) file. if you don't specify one, it searches for a file the same way just-mr does when invoked with --norc. and if that search finds nothing? then it's a file with filename repos.json in the parent directory of the input configuration file. so there's always a fallback, she's prepared. ✨
  • --local-build-root PATH β€” the root for local CAS, cache, and build directories. if that path doesn't exist yet, it will be created, so don't stress. 🫢 Default: the path .cache/just in your home directory.
  • --just PATH β€” path to the justbuild binary in PATH, or just a direct path to the justbuild binary. either works, she's flexible. Default: "/usr/bin/justbuild".
  • -L, --local-launcher JSON_ARRAY β€” a JSON array with the list of strings representing the launcher to prepend to any commands being executed locally. yes, prepend. launcher goes first, always. πŸŽ€ Default: ["env", "--"].
  • --git PATH β€” path to the git binary in PATH, or a path to the git binary. this one gets used whenever shelling out to git is needed. Default: "git".
  • --clone JSON_MAP β€” a JSON map from a filesystem path to a pair of: a repository name, and a list of bindings. for each entry in that map, the target repository β€” found by following the bindings starting from a given start repository, and only after all repositories have been imported β€” will have its workspace root cloned into the specified filesystem directory, and its description in the output configuration will be made to point to this clone. πŸ¦‹ heads up though: the start repository names must be known, meaning an initial repository or a declared import. and both the start and the target repositories will be kept during deduplication. no merging those two away, bestie. πŸ’…

✨ See also ✨

go read these too, they're the whole friend group: git(1), just-lock-config(5), just-import-git(1), just-deduplicate-repos(1), just-mr-repository-config(5), just-mr(1).


and that's the page!! 🌸 this was JUST-LOCK(1) from the General Commands Manual, section 1 β€” go lock those repos, bestie, you're literally gonna slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from