splinter-ftp
v1.0.2
Published
FTP client CLI for managing uploads and downloads via .splinter action files
Downloads
424
Readme
Splinter FTP Client
A command-line FTP client that lets you define reusable upload and download actions in a .splinter file.
Full documentation: https://splinter.seremtitus.co.ke/
Installation
npm i -g splinter-ftpRequires Node.js 18 or later.
Quick Start
# Save credentials (interactive menu)
splinter logins
# Navigate to project and add actions
cd my-project
splinter add # add an upload action
splinter add # add another action
# Run uploads
splinter up
# Run downloads
splinter downCommands
| Command | Description |
|---------|-------------|
| splinter logins | Manage FTP connection credentials (add, list, delete) |
| splinter add | Interactively add an action to the .splinter file |
| splinter delete | Interactively delete actions from the .splinter file |
| splinter up | Execute all upload actions defined in .splinter |
| splinter down | Execute all download actions defined in .splinter |
| splinter history | Browse folders registered via splinter commands |
.splinter File Format
The .splinter file is a JSON file in your project directory that holds the login alias and an array of actions:
{
"login": "prod",
"actions": [
{
"type": "up",
"source": "./dist",
"to": "/var/www/html",
"recursive": true,
"overwrite": true,
"command": "npm run build"
},
{
"type": "down",
"source": "/backups/data",
"to": "./downloads",
"recursive": true,
"overwrite": false
}
]
}Fields
| Field | Type | Description |
|-------|------|-------------|
| login | string | Alias of saved credentials to use |
| type | "up"|"down" | Direction of transfer |
| source | string | Source file or directory path |
| to | string | Destination file or directory path |
| recursive | boolean | Transfer directories recursively |
| overwrite | boolean | Overwrite existing files |
| command | string | Optional shell command run before the transfer |
Credentials
Credentials are stored globally in ~/.splinter/credentials.json and managed via splinter logins.
