Skip to content

Commit 63f5ff7

Browse files
committed
doc: add age(1) and age-keygen(1) man pages
Closes #131
1 parent 11659e8 commit 63f5ff7

File tree

10 files changed

+379
-1
lines changed

10 files changed

+379
-1
lines changed

.github/workflows/ronn.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
on:
2+
push:
3+
branches:
4+
- '**'
5+
paths:
6+
- '**.ronn'
7+
name: Generate man pages
8+
jobs:
9+
ronn:
10+
runs-on: ubuntu-latest
11+
name: Ronn
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Run ronn
16+
uses: ./.github/workflows/ronn
17+
id: ronn
18+
- name: Undo email mangling
19+
# rdiscount randomizes the output for no good reason, which causes
20+
# changes to always get committed. Sigh.
21+
# https://github.com/davidfstr/rdiscount/blob/6b1471ec3/ext/generate.c#L781-L795
22+
run: |-
23+
for f in doc/*.html; do
24+
awk '/Filippo Valsorda/ { $0 = "<p>Filippo Valsorda <a href=\"mailto:[email protected]\" data-bare-link=\"true\">[email protected]</a></p>" } { print }' "$f" > "$f.tmp"
25+
mv "$f.tmp" "$f"
26+
done
27+
- name: Commit and push if changed
28+
run: |-
29+
git config user.name "GitHub Actions"
30+
git config user.email "[email protected]"
31+
git add -A
32+
git commit -m "doc: regenerate groff and html man pages" || exit 0
33+
git push

.github/workflows/ronn/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM ruby:3.0.1-buster
2+
3+
RUN apt-get update && apt-get install -y groff
4+
RUN bundle config --global frozen 1
5+
COPY Gemfile Gemfile.lock ./
6+
RUN bundle install
7+
ENTRYPOINT ["bash", "-O", "globstar", "-c", \
8+
"/usr/local/bundle/bin/ronn **/*.ronn"]

.github/workflows/ronn/Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gem "ronn", "~> 0.7.3"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
hpricot (0.8.6)
5+
mustache (1.1.1)
6+
rdiscount (2.2.0.2)
7+
ronn (0.7.3)
8+
hpricot (>= 0.8.2)
9+
mustache (>= 0.7.0)
10+
rdiscount (>= 1.5.8)
11+
12+
PLATFORMS
13+
aarch64-linux
14+
x86_64-linux
15+
16+
DEPENDENCIES
17+
ronn (~> 0.7.3)
18+
19+
BUNDLED WITH
20+
2.2.15

.github/workflows/ronn/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: Ronn
2+
runs:
3+
using: docker
4+
image: Dockerfile

HomebrewFormula/age.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ def install
1616
mkdir bin
1717
system "go", "build", "-trimpath", "-o", bin, "-ldflags", "-X main.Version=v#{version}", "filippo.io/age/cmd/..."
1818
prefix.install_metafiles
19+
man1.install "doc/age.1"
20+
man1.install "doc/age-keygen.1"
1921
end
2022
end

age.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@
3535
// encryption operations. If you need to tie into existing key management
3636
// infrastructure, you might want to consider implementing your own Recipient
3737
// and Identity.
38+
//
39+
// Backwards compatibility
40+
//
41+
// Files encrypted with a stable version (not alpha, beta, or release candidate)
42+
// of age, or with any v1.0.0 beta or release candidate, will decrypt with any
43+
// later versions of the v1 API. This might change in v2, in which case v1 will
44+
// be maintained with security fixes for compatibility with older files.
45+
//
46+
// If decrypting an older file poses a security risk, doing so might require an
47+
// explicit opt-in in the API.
3848
package age
3949

4050
import (

cmd/age-keygen/keygen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Options:
2727
-o, --output OUTPUT Write the result to the file at path OUTPUT.
2828
-y Convert an identity file to a recipients file.
2929
30-
age-keygen generates a new standard X25519 key pair, and outputs it to
30+
age-keygen generates a new native X25519 key pair, and outputs it to
3131
standard output or to the OUTPUT file.
3232
3333
If an OUTPUT file is specified, the public key is printed to standard error.

doc/age-keygen.1.ronn

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
age-keygen(1) -- generate age(1) key pairs
2+
====================================================
3+
4+
## SYNOPSIS
5+
6+
`age-keygen` [`-o` <OUTPUT>]<br>
7+
`age-keygen` `-y` [`-o` <OUTPUT>] [<INPUT>]<br>
8+
9+
## DESCRIPTION
10+
11+
`age-keygen` generates a new native age(1) key pair, and outputs the identity to
12+
standard output or to the <OUTPUT> file. The output includes the public key and
13+
the current time as comments.
14+
15+
If the output is not going to a terminal, `age-keygen` prints the public key to
16+
standard error.
17+
18+
## OPTIONS
19+
20+
* `-o`, `--output`=<OUTPUT>:
21+
Write the identity to <OUTPUT> instead of standard output.
22+
23+
If <OUTPUT> already exists, it is not overwritten.
24+
25+
* `-y`:
26+
Read an identity file from <INPUT> or from standard input and output the
27+
corresponding recipient(s), one per line, with no comments.
28+
29+
* `--version`:
30+
Print the version and exit.
31+
32+
## EXAMPLES
33+
34+
Generate a new identity:
35+
36+
$ age-keygen
37+
# created: 2021-01-02T15:30:45+01:00
38+
# public key: age1lvyvwawkr0mcnnnncaghunadrqkmuf9e6507x9y920xxpp866cnql7dp2z
39+
AGE-SECRET-KEY-1N9JEPW6DWJ0ZQUDX63F5A03GX8QUW7PXDE39N8UYF82VZ9PC8UFS3M7XA9
40+
41+
Write a new identity to `key.txt`:
42+
43+
$ age-keygen -o key.txt
44+
Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
45+
46+
Convert an identity to a recipient:
47+
48+
$ age-keygen -y key.txt
49+
age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
50+
51+
## SEE ALSO
52+
53+
age(1)
54+
55+
## AUTHORS
56+
57+
Filippo Valsorda <[email protected]>

0 commit comments

Comments
 (0)