···11+[package]
22+name = "fuk"
33+version = "0.1.0"
44+edition = "2021"
55+66+[dependencies]
77+async-trait = "0.1.77"
88+clap = { version = "4.4.18", features = ["derive"] }
99+futures = "0.3.30"
1010+reqwest = "0.11.24"
1111+serde = { version = "1.0.196", features = ["derive"] }
1212+serde_json = "1.0.113"
1313+simple-eyre = "0.3.1"
1414+ssh-key = { version = "0.6.4", features = ["alloc", "serde"] }
1515+tokio = { version = "1.36.0", default-features = false, features = ["rt-multi-thread", "fs", "io-std", "io-util", "macros", "process", "net"] }
1616+toml = "0.8.10"
+97
docs/fuk.1.scd
···11+FUK(1) "git.sr.hr/~hauleth/fuk" "General Commands Manual"
22+33+# NAME
44+55+fuk - Fetch User Keys
66+77+# SYNOPSIS
88+99+*fuk* -h++
1010+*fuk* [--format (json|pretty)] _config.toml_
1111+1212+# DESCRIPTION
1313+1414+Tool for fetching public SSH keys from various sources.
1515+1616+# CONFIGURATION
1717+1818+Configuration uses TOML file format. In root it requires _entry_ field which
1919+must be a list of entries to be present in output. Each entry must have at least
2020+2 keys:
2121+2222+*name*
2323+ Name of output field.
2424+2525+*keys*
2626+ List of sources for the keys. See _SOURCES_
2727+2828+# SOURCES
2929+3030+*raw*
3131+ Takes as a value list of public SSH keys. These keys will be printed in
3232+ the output as is.
3333+3434+*host*
3535+ Hostnames that will be passed to _ssh-keyscan_(1).
3636+3737+*forge*
3838+ Takes map as an argument, that map must have 2 keys, _user_ which will
3939+ be the name of the user used for querying and _host_ which will be the
4040+ host that will be queried. The resulting URL will be constructed as
4141+ _https://{host}/{user}.keys_.
4242+4343+*github*, *gitlab*, *sourcehut*, *codeberg*
4444+ Each of these are shortcuts for *forge* entries to provide default
4545+ _host_ for equivalent entries. In order these would be _github.com_,
4646+ _gitlab.com_, _meta.sr.ht_, and _codeberg.org_.
4747+4848+Example configuration:
4949+5050+```
5151+[[entry]]
5252+name = "hauleth"
5353+keys = [
5454+ { github = "hauleth" },
5555+ { sourcehut = "~hauleth" }
5656+]
5757+5858+[[entry]]
5959+name = "sourcehut"
6060+keys = [
6161+ { hosts = [ "git.sr.ht", "hg.sr.ht" ] }
6262+]
6363+```
6464+6565+# OUTPUT
6666+6767+_fuk_ prints result to stdout in JSON format. Keys will be deduplicated by
6868+algorithm and key, but the comment *will* be ignored when comparing for
6969+equality. If comments for duplicated keys are different, then there is no
7070+guarantee about comment content.
7171+7272+Example output:
7373+7474+```
7575+{
7676+ "hauleth": [
7777+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...",
7878+ ],
7979+ "sourcehut": [
8080+ "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNo...",
8181+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...",
8282+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB...",
8383+ ]
8484+}
8585+```
8686+8787+# AUTHORS
8888+8989+Maintained by Łukasz Niemier <~@hauleth.dev>. Sources can be found at
9090+https://git.sr.ht/~hauleth/fuk.
9191+9292+# BUGS AND PATCHES
9393+9494+Report bugs and submit patches to public inbox of maintainer at
9595+<~hauleth/public-inbox@lists.sr.ht>.
9696+9797+; vim: noexpandtab