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 to OUTPUT instead of standard output πŸ’– and listen: if OUTPUT already exists, it is not overwritten. respect. she does not destroy your files. 🫢
  • -y β€” reads an identity file from INPUT (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 πŸ’€

age(1), age-inspect(1)

🌟 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