diff --git a/docs/commands/aq.md b/docs/commands/aq.md new file mode 100644 index 0000000000000000000000000000000000000000..80d7b5c0a41f8f4b63a68dc4538176e9ef29dd42 --- /dev/null +++ b/docs/commands/aq.md @@ -0,0 +1,16 @@ +## `aq` command +``` +zigmod aq +``` + +This is a stub subcommand for parenting all subcommands that interfact with instances of https://github.com/nektro/aquila and currently only displays help text. + +The default remote is https://aquila.red/. + +You can learn more about it on its wiki here: https://github.com/nektro/aquila/wiki. + +The subcommands available are: +- [`add`](aq_add.md) +- [`update`](aq_update.md) +- [`modfile`](aq_modfile.md) +- [`showjson`](aq_showjson.md) diff --git a/docs/commands/aq_add.md b/docs/commands/aq_add.md new file mode 100644 index 0000000000000000000000000000000000000000..66dcb97897cf6978e96038819d953316e788d285 --- /dev/null +++ b/docs/commands/aq_add.md @@ -0,0 +1,10 @@ +## `aq add` command +``` +zigmod aq add +``` + +This command takes `` and adds its most recent version to your `zig.mod`. + +If 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`. + +It 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. diff --git a/docs/commands/aq_modfile.md b/docs/commands/aq_modfile.md new file mode 100644 index 0000000000000000000000000000000000000000..198c6d8defbb2438b37b139141d64b9a9a3c95fe --- /dev/null +++ b/docs/commands/aq_modfile.md @@ -0,0 +1,15 @@ +## `aq modfile` command +``` +zigmod aq modfile +``` + +This is a temporary command that can print the corresponding `zig.mod` yaml for a new version. + +If on the details page for a package version, the string `` 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`. + +### Example Output +`$ zigmod aq modfile 1/nektro/iana-tlds/v0.2` +``` + - src: http https://aquila.red/1/nektro/iana-tlds/v0.2.tar.gz _ 0 2 + version: sha256-d2e50438ad3ab45ee56b13f285234bed0738c2cb7c1c7023da8489b48ecf876f +``` diff --git a/docs/commands/aq_showjson.md b/docs/commands/aq_showjson.md new file mode 100644 index 0000000000000000000000000000000000000000..34091d0c76a9a18d60b31d0740704dc0e4fbe128 --- /dev/null +++ b/docs/commands/aq_showjson.md @@ -0,0 +1,20 @@ +## `aq showjson` command +``` +zigmod aq showjson +``` + +This is a meta command for obtaining raw json from Aquila servers and ideally paired with [`jq`](https://stedolan.github.io/jq/). + +A number of extra functionality can be gained by composing this command with other utilities. Some examples are shown below: + +---- + +- List a user's published packages: +``` +zigmod aq showjson 1/nektro | jq '.pkgs[].name' +``` + +- List a package's published versions: +``` +zigmod aq showjson 1/nektro/iana-tlds | jq -c '.versions[] | [.real_major, .real_minor] | "v\(.[0]).\(.[1])"' +``` diff --git a/docs/commands/aq_update.md b/docs/commands/aq_update.md new file mode 100644 index 0000000000000000000000000000000000000000..466e13830383c5f909799ba8394c747087eaf614 --- /dev/null +++ b/docs/commands/aq_update.md @@ -0,0 +1,8 @@ +## `aq update` command +``` +zigmod aq update +``` + +This 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`. + +In the next version of the manifest format, this process will be done automatically without the need for `aq modfile`.