neocities-deploy • GitHub | Codeberg | Releases | AUR | AUR (git) | AUR (binary)
neocities-client • GitHub | Codeberg | crates.io | docs.rs
neocities-deploy is a command-line tool for deploying your Neocities site. It can upload files to your site, list remote files, and more.
Also part of this project is a Rust library for interacting with the Neocities API, neocities-client.
This project is in no way affiliated with Neocities. It is a personal project and is not endorsed by Neocities.
neocities-deploy [OPTIONS...] COMMAND
-
-c
,--config-file
: Path of the configuration file. -
-s
,--site
: Select a site. (If not given, all sites are selected.) -
-i
,--ignore-errors
: Ignore errors and continue. -
-v
,--verbose
: More verbosity. -
-q
,--quiet
: Less verbosity. -
-h
,--help
: Display help message. -
-V
,--version
: Display version.
-
config
: Configure a site interactively. -
key
: Replace credentials with API keys in the config file. -
list
: List files on the site(s). -
deploy
: Deploy local files to the site(s).
The configuration file is a TOML file.
The location of the configuration file varies with the platform you’re
using. (See the documentation for the config_dir
function in the Rust
package called directories
for clarification.)
On Linux, $XDG_CONFIG_HOME/neocities-deploy/config.toml
(or $HOME/.config/neocities-deploy/config.toml
if $XDG_CONFIG_HOME
is
not defined). For example: /home/alice/.config/neocities-deploy/config.toml
.
On macOS, $HOME/Library/Application Support/neocities-deploy/config.toml
.
For example, /Users/Alice/Library/Application Support/neocities-deploy/config.toml
.
On Windows, {FOLDERID_RoamingAppData}\neocities-deploy\config\config.toml
.
For example, C:\Users\Alice\AppData\Roaming\neocities-deploy\config\config.toml
.
A configuration file might look like this:
[site."site1"]
auth = "username:password"
path = "/path/to/site1"
free_account = true
[site."site2"]
auth = "6f5902ac237024bdd0c176cb93063dc4" # An API key
path = "/path/to/site2"
free_account = false
proxy = "http://localhost:8081"
-
Only the fields
auth
andpath
are required. -
The
auth
field can be either a username:password pair or an API key. If it contains a colon, it’s assumed to be a username:password pair. -
Setting
free_account
totrue
will make the tool to ignore file with extensions not allowed in free accounts when deploying.
The .neocitiesignore
file is a text file that specifies files and directories
that will be ignored when deploying. It has the same syntax as .gitignore
and
works similarly to it: each .neocitiesignore
file applies to the directory in
which it resides and all its subdirectories.
It would be best not to use Windows, but if you must, or if you are a masochist, you like having your data stolen, and you like seeing ads in your operating system, there are pre-built binaries available on the releases page.
Ditto for macOS. Pre-built binaries are available on the releases page.
The package is available in the AUR as neocities-deploy
.
You can install it with your favorite AUR helper, for example:
$ yay -S neocities-deploy
nix-shell -p '(pkgs.callPackage (import (builtins.fetchTarball "https://github.com/kugland/nur-packages/tarball/master")) { }).neocities-deploy'
# With NixOS
environment.systemPackages = [ (pkgs.callPackage (builtins.fetchGit {
url = "https://github.com/kugland/nur-packages";
ref = "master";
rev = "af06c3aa6bd9e350772139b09465ef5228ca514d"; # master
}) {}).neocities-deploy ];
# For a single user:
users.users.<user>.packages = [ ... ];
# With Home Manager
home.packages = [ ... ];
You should, of course, replace rev
with the latest commit hash.
You can build the project from source, or use the pre-built static binaries available on the releases page for a variety of architectures.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
If you find this project useful, you can send me a tip.
Bitcoin: bc1qlj7jdw6fff0q8yg93ssg6qp04p88cuurgwxk8r
Monero: 43mSMDDTuwbGX8LBH7XpT6gbnUcJ86KWVfrpKbopnk7QTDpQkSb53e43MBGGyZ8FgYZ3YzcaTa4Pb46cQUz3DsXeRn4Ef5e