git-annex-lookupkey(1)

πŸ“¦
version 10.20261026 Β· 3 versions
, in alpine 3.24, arch rolling, debian trixie, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– git-annex-lookupkey β€” the manual page, bestie edition πŸ’–

okay so you're in the General Commands Manual and we're talking about git-annex-lookupkey, which is the little tool that looks up the key used for a file. that's it. that's the whole job. she's a specialist. πŸŽ€


✨ NAME ✨

git-annex-lookupkey β€” looks up key used for file πŸ¦‹


🌸 SYNOPSIS 🌸

git annex lookupkey [file ...]

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so this is a plumbing-level command (iykyk β€” plumbing commands are the ones other commands call, the backstage crew, the main character's makeup artist) and what it does is look up the key used for a file in the index.

the key gets printed to stdout. that's the output. that's the vibe. πŸ’…

but listen β€” if there's no key, because either:

  • the file is not present in the index, or
  • it's not a git-annex managed file,

then nothing is output and it exits nonzero. no key, no party. periodt. 😭


⭐ OPTIONS ⭐

  • --ref β€” instead of looking for the specified files in the index, interpret them as git refs. so like, you can go digging through history and tags and branches and pull out the key from any point in time. iconic behaviour fr fr.

for example, to find the key used for somefile in tag v1.0:

git-annex lookupkey v1.0:somefile
  • --batch β€” turn on batch mode ✨ in this mode, a line containing the filename is read from stdin, the key is output to stdout (with a trailing newline), and then it repeats. over and over. she doesn't stop. she's booked and busy. πŸ”₯
heads up bestie: if there's no key corresponding to the file, an empty line is output to stdout instead. so you still get a line β€” just a sad little empty one. πŸ™ˆ
  • -z β€” makes the --batch input be delimited by nulls instead of the usual newlines. perfect for filenames that are out here being chaotic with newlines in them. slay. πŸ’œ

also, the git-annex-common-options(1) can be used. so many options. she has range. 🌈


🫢 SEE ALSO 🫢

git-annex(1)


🧚 AUTHOR 🧚

Joey Hess <id@joeyh.name>


and that's the whole page!! git-annex-lookupkey(1), straight from the General Commands Manual, brought to you with love and also a nonzero exit status when the key isn't there πŸ’–βœ¨πŸŽ€ no cap, go look up some keys bestie πŸ¦‹πŸŒΈπŸ‘‘