Sync files to neocities while doing the least amount of API requests.
You can use this to deploy a Vite, Astro or Next.js app to neocities.
neocities-sync will:
- Only upload files that have been modified.
- Delete files which exist on neocities, but don't exist locally.
- Store SHA1 hashes locally inside a
.statefile. - If the
.statefile doesn't exist, it will fetch all files from neocities and store them in the.statefile. - If
--ignore-disallowed-file-typesis set, it will ignore disallowed file types. Use this if you are NOT a supporter.
Install Bun https://bun.sh/
No need to install, just run
bunx github:aspizu/neocities-syncUsage: neocities-sync [options]
Sync files to neocities while doing the least amount of API requests.
Options:
-V, --version output the version number
--username <USERNAME> Neocities username.
--password <PASSWORD> Neocities password.
--path <PATH> Path to sync.
--state <STATE> Path to state file. (default: <PATH>/.state)
--ignore-disallowed-file-types Ignore disallowed file types. (default: false)
-h, --help display help for command
neocities-sync --username foo --password bar --path dist --ignore-disallowed-file-types --state .stateHere, we use --state .state to store the state outside the dist directory because
it will be emptied on every build.
The shell script neocities-sync.sh provides a basic user interface using
zenity.
./neocities-sync.shgit clone https://github.com/aspizu/neocities-sync
cd neocities-sync
bun run src/index.tsPull requests are welcome.
