Tired of the manual grind when it comes to uploading projects to a shared hosting with FTP access? Enter
ftp-uploader
a robust command-line tool engineered to simplify your workflow and automate the process of deploying projects to your FTP server.
- Seamless Automation: Bid farewell to manual uploads. Effortlessly deploy your projects with a single command.
- Selective Uploads: Tailor your uploads by leveraging Gitignore logic. Easily ignore specific paths and files, putting you in control of your project uploads.
- Time-Efficient: Save precious time on repetitive FTP uploads, allowing you to concentrate on refining your projects.
Install the latest build
sudo curl -fsSL -o /usr/local/bin/ftp-uploader https://github.com/Ragueel/ftp-uploader/releases/latest/download/ftp-uploader-linux-amd64
sudo chmod +x /usr/local/bin/ftp-uploaderdocker pull ghcr.io/ragueel/ftp-uploader:main
Init project with:
ftp-uploader initIt should generate your ftp-uploader.yaml with the following content:
configs:
default:
root: . # local root directory, in which files you want to upload lie
uploadRoot: my-relative-path/ # directory where files will be uploaded
ignorePaths:
- ftp-uploader.yamlnote: You can have as many configs as you want!
ignorePaths follows the same structure as ignore lines of any normal .gitignore file
You can also provide ignoreFile variable in the config. It will merge lines from the file with ignorePaths
You can configure the behaviour of the tool via the following environment variables
| name | description |
|---|---|
| FTP_UPLOADER_CONNECTION_COUNT | controls how many parallel connections are created |
| ROOT_CONFIG_PATH | path to your ftp-upload.yaml file |
| FTP_UPLOADER_USERNAME | username |
| FTP_UPLOADER_PASSWORD | password |
| FTP_UPLOADER_HOST | host (port should be included) |
If you set up everything properly, you can start your upload via the following command:
ftp-uploader upload -c defaultIf config is not passed it uploads all configs. Example:
ftp-uploader upload
You can also pass authentication credentials via terminal. Like in the example below
ftp-uploader upload --username MY_USER --pasword MY_PASSWORD --host MY_HOST --config exampleIt is also possible to use multiple connections to speed up the process of uploading. To do that pass -t flag with integer.
The tool will create connections equal to that amount, and will use it to upload your files.
ftp-uploader upload -c default -t 10 # will use 10 connections to upload filesGet more info with
ftp-uploader -hThis tool was created to simplify the FTP uploading process for projects hosted on shared servers. Your feedback and contributions will make it even better!