How to manage your site off of neocities.org using the Neocities CLI (on Debian, Ubuntu, etc) INSTALLATION ^^^^^^^^^^^^ 1. install ruby (sudo apt update && sudo apt install ruby-full) 2. install rake gem (sudo gem install rake) This is required I believe because rake isn't listed as one of the dependencies. (issue: https://github.com/neocities/neocities-ruby/issues/12) 3. install neocities gem (sudo gem install neocities) Run $ neocities to confirm everything works. As soon as you start trying to upload files, etc. the CLI will ask for your username and password. DOWNLOADING YOUR WEBSITE AND SETTING UP YOUR WORKSPACE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You'll want to download your site now. The CLI doesn't have a command for doing this, (issue: https://github.com/neocities/neocities-ruby/issues/5) so you'll need to go to https://neocities.org/dashboard and download your site as a ZIP. Then, extract it to a new folder. A WORD OF WARNING ^^^^^^^^^^^^^^^^^ Pushing your website can be dangerous, and you may overwrite files you don't want to. Keep backups. PUSHING YOUR WEBSITE ^^^^^^^^^^^^^^^^^^^^ Make changes to your site, then cd to your local website's root folder. Run $ neocities push . The "." tells the CLI to upload everything in that folder to your website's root on Neocities. Any file that changed from what's on Neocities will be reuploaded. Deleted files are ignored. IGNORING FILES/DIRECTORIES ^^^^^^^^^^^^^^^^^^^^^^^^^^ My site has a "moz" directory that I don't tend to update, and makes the push process take much longer than necessary. The Neocities CLI by default uses the .gitignore file to ignore any files you don't want to upload/reupload. I can create this .gitignore file and put "moz/*" inside. Now it will not upload anything in the "moz" directory. Of course, if I do edit something in the "moz" directory, I can remove that line from the .gitignore file so I can upload it when pushing. ________________________ Last Updated: 6/13/2018/