Ratakor/neocities-zig
Zig CLI and API for neocities.org
neocities-zig is a CLI and a library for the Neocities REST API.
git clone https://aur.archlinux.org/neocities-zig-bin.git
cd neocities-zig-bin
makepkg -si
Grab one of the release according to your system. Zsh completions are available here.
Requires zig 0.13.0.
git clone https://github.com/ratakor/neocities-zig.git
cd neocities-zig
zig build -Doptimize=ReleaseSafe
When launching neocities
for the first time you will be granted with a menu
where you can enter your username and password. This will get an api key from
neocities and save it in a config file so you won't have to connect again.
Add it to an existing project with this command:
zig fetch --save https://github.com/ratakor/neocities-zig/archive/master.tar.gz
Add the module to build.zig like that:
const neocities = b.dependency("neocities", .{});
exe.root_module.addImport("Neocities", neocities.module("neocities"));
And import it on a file.zig:
const Neocities = @import("Neocities");
Check src/main.zig for a detailed example on how to use the library.
Usage: neocities <command> [options]
Commands:
upload | Upload files to your Neocities website.
delete | Delete files from your Neocities website.
info | Display information about a Neocities website.
list | List files from your Neocities website.
key | Display the API key.
logout | Remove the API key from the configuration file.
help | Display information about a command.
version | Display program version.