authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-03 00:21:08 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-05-03 00:21:08 -07:00
logb7c93c0112665a7cc46b2a9a00e2c9f1dedbf50c
tree236f3f02a7752dc6142f08c5fc8e0977b24fbd0d
parent0ec2bbf801c9d440a8823534fbd3d09a5c3c630a

docs- add aquila commands


5 files changed, 69 insertions(+), 0 deletions(-)

docs/commands/aq.md created+16
...@@ -0,0 +1,16 @@
1## `aq` command
2```
3zigmod aq
4```
5
6This is a stub subcommand for parenting all subcommands that interfact with instances of https://github.com/nektro/aquila and currently only displays help text.
7
8The default remote is https://aquila.red/.
9
10You can learn more about it on its wiki here: https://github.com/nektro/aquila/wiki.
11
12The subcommands available are:
13- [`add`](aq_add.md)
14- [`update`](aq_update.md)
15- [`modfile`](aq_modfile.md)
16- [`showjson`](aq_showjson.md)
docs/commands/aq_add.md created+10
...@@ -0,0 +1,10 @@
1## `aq add` command
2```
3zigmod aq add <package>
4```
5
6This command takes `<package>` and adds its most recent version to your `zig.mod`.
7
8If you're on the details page for a package, the string this command is expecting is the path of the url after the domain name. So for example for the package https://aquila.red/1/truemedian/zfetch, you would add it using `zigmod aq add 1/truemedian/zfetch`.
9
10It will append the details to the end of your `zig.mod` file. If you're project is using both `dependencies` and `dev_dependencies` you may need to move the appended text up manually to the correct section. This step will be unnecessary in the next manifest format version.
docs/commands/aq_modfile.md created+15
...@@ -0,0 +1,15 @@
1## `aq modfile` command
2```
3zigmod aq modfile <version>
4```
5
6This is a temporary command that can print the corresponding `zig.mod` yaml for a new version.
7
8If on the details page for a package version, the string `<version>` is expecting is the path of the url after the domain. So for the version https://aquila.red/1/nektro/iana-tlds/v0.2, the version ID is `1/nektro/iana-tlds/v0.2`.
9
10### Example Output
11`$ zigmod aq modfile 1/nektro/iana-tlds/v0.2`
12```
13 - src: http https://aquila.red/1/nektro/iana-tlds/v0.2.tar.gz _ 0 2
14 version: sha256-d2e50438ad3ab45ee56b13f285234bed0738c2cb7c1c7023da8489b48ecf876f
15```
docs/commands/aq_showjson.md created+20
...@@ -0,0 +1,20 @@
1## `aq showjson` command
2```
3zigmod aq showjson <query>
4```
5
6This is a meta command for obtaining raw json from Aquila servers and ideally paired with [`jq`](https://stedolan.github.io/jq/).
7
8A number of extra functionality can be gained by composing this command with other utilities. Some examples are shown below:
9
10----
11
12- List a user's published packages:
13```
14zigmod aq showjson 1/nektro | jq '.pkgs[].name'
15```
16
17- List a package's published versions:
18```
19zigmod aq showjson 1/nektro/iana-tlds | jq -c '.versions[] | [.real_major, .real_minor] | "v\(.[0]).\(.[1])"'
20```
docs/commands/aq_update.md created+8
...@@ -0,0 +1,8 @@
1## `aq update` command
2```
3zigmod aq update
4```
5
6This command takes no arguments and will check your `zig.mod` file for direct dependencies that have new versions available. If found it will print the respective version ID string that you can then pass to [`aq modfile`](aq_modfile.md) to get the relevant yaml text to update in your `zig.mod`.
7
8In the next version of the manifest format, this process will be done automatically without the need for `aq modfile`.