AGE-KEYGEN(1)
π age-keygen(1) β the girlies' guide to making age keys β¨
okay so real talk: this one's a page from the General Commands Manual and it's literally all about age-keygen. if you've ever been like "bestie where do my keys even come from," this is your moment. no cap. π
πΈ NAME πΈ
age-keygen β generate age(1) key pairs π
β¨ SYNOPSIS β¨
age-keygen [-pq] [-o OUTPUT]
age-keygen -y [-o OUTPUT] [INPUT]
π¦ DESCRIPTION π¦
okay so age-keygen does exactly one thing and it does it flawlessly: it makes you a brand-new native age(1) key pair. the identity gets output to standard output, or, if you're feeling fancy, to the OUTPUT file instead. the output comes with the public key and the current time chilling in there as comments π«Ά
and here's the lil detail that gets me: if the output is not going to a terminal, age-keygen lowkey prints the public key to standard error. so like, keep an eye on stderr bestie, it's doing things π
π OPTIONS π
-pqβ generates a post-quantum hybrid ML-KEM-768 + X25519 key pair β¨ the future is now, and apparently in the future this might become the default. so get in on it early, iykyk.-o,--output=OUTPUTβ writes the identity toOUTPUTinstead of standard output π and listen: ifOUTPUTalready exists, it is not overwritten. respect. she does not destroy your files. π«Ά-yβ reads an identity file fromINPUT(or from standard input if you're just piping it in) and outputs the corresponding recipient(s), one per line, with no comments. clean, minimal, no notes. π--versionβ prints the version and exits. that's it, that's the whole option. slay. π
π₯ EXAMPLES π₯
generate a new post-quantum identity π§
$ age-keygen -pq
# created: 2025-11-17T13:39:06+01:00
# public key: age1pq167[... 1950 more characters ...]
AGE-SECRET-KEY-PQ-1K30MYPZAHAXHR22YHH27EGDVLU0QNSUH3DSV7J7NR3X6D9LHXNWSDLTV4T
generate a new traditional identity π
$ age-keygen
# created: 2021-01-02T15:30:45+01:00
# public key: age1lvyvwawkr0mcnnnncaghunadrqkmuf9e6507x9y920xxpp866cnql7dp2z
AGE-SECRET-KEY-1N9JEPW6DWJ0ZQUDX63F5A03GX8QUW7PXDE39N8UYF82VZ9PC8UFS3M7XA9
write a new post-quantum identity to key.txt π
$ age-keygen -pq -o key.txt
Public key: age1pq1cd[... 1950 more characters ...]
convert an identity to a recipient π
$ age-keygen -y key.txt
age1pq1cd[... 1950 more characters ...]
π SEE ALSO π
π AUTHORS π
Filippo Valsorda age@filippo.io
ok that's the whole page bestie, and honestly? she ate. π β¨
and as for the boring-but-important fine print at the bottom β the page was dated August 2026, it's from AGE-KEYGEN(1) in the General Commands Manual. mwah. π«Άππ
π¦ where this page comes from
- alpine 3.24: age-doc 1.3.2-r1 Β· BSD-3-Clause
- arch rolling: age 1.3.2-1 Β· BSD-3-Clause
- nixos 26.05: age 1.3.2
- nixpkgs unstable: age 1.3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms