{"id":21215815,"url":"https://github.com/betahuhn/spaces-cli","last_synced_at":"2025-07-10T11:31:41.688Z","repository":{"id":36983830,"uuid":"301860082","full_name":"BetaHuhn/spaces-cli","owner":"BetaHuhn","description":"☁️ Quickly upload and download files from DigitalOcean Spaces.","archived":false,"fork":false,"pushed_at":"2023-10-24T02:37:06.000Z","size":1941,"stargazers_count":22,"open_issues_count":16,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-01T16:48:18.194Z","etag":null,"topics":["asset-hosting","cdn","cli","cli-tool","cloud-storage","digitalocean","digitalocean-spaces","file-upload","hacktoberfest","nodejs","s3-bucket","s3-storage"],"latest_commit_sha":null,"homepage":"https://mxis.ch","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BetaHuhn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"betahuhn","github":"betahuhn"}},"created_at":"2020-10-06T21:34:36.000Z","updated_at":"2024-01-09T01:12:58.000Z","dependencies_parsed_at":"2023-02-19T03:00:31.006Z","dependency_job_id":null,"html_url":"https://github.com/BetaHuhn/spaces-cli","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fspaces-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fspaces-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fspaces-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BetaHuhn%2Fspaces-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BetaHuhn","download_url":"https://codeload.github.com/BetaHuhn/spaces-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225635380,"owners_count":17500350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asset-hosting","cdn","cli","cli-tool","cloud-storage","digitalocean","digitalocean-spaces","file-upload","hacktoberfest","nodejs","s3-bucket","s3-storage"],"created_at":"2024-11-20T21:45:20.487Z","updated_at":"2024-11-20T21:45:20.965Z","avatar_url":"https://github.com/BetaHuhn.png","language":"JavaScript","funding_links":["https://ko-fi.com/betahuhn","https://github.com/sponsors/betahuhn","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=394RTSBEEEFEE","https://ko-fi.com/F1F81S2RK"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# spaces-cli\n\n[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/BetaHuhn/spaces-cli/blob/master/LICENSE) ![David](https://img.shields.io/david/betahuhn/spaces-cli) [![npm](https://img.shields.io/npm/v/spaces-cli)](https://www.npmjs.com/package/spaces-cli)\n\nQuickly upload and download files from DigitalOcean Spaces.\n\n\u003c/div\u003e\n\n## 👋 Introduction\n\n[spaces-cli](https://github.com/BetaHuhn/spaces-cli) lets you quickly upload and download files from DigitalOcean Spaces. You can upload individual files or entire directories to any of your spaces associated with your DigitalOcean account. Instantly get a link to your uploaded files, or download a file simply by providing its Spaces URL.\n\n## 🚀 Get started\n\nInstall [spaces-cli](https://github.com/BetaHuhn/spaces-cli) globally via npm:\n\n```shell\nnpm install -g spaces-cli\n```\n\n\u003e Make sure you already have a DigitalOcean Space (of not, you can create one [here](https://m.do.co/c/779397b07aaa))\n\nThen start the interactive setup with:\n\n```shell\nspaces-cli setup\n```\n\nOr specify all options via [command line arguments](#command-line-arguments) or [environment variables](#environment-variables) on each run.\n\nRefer to the [setup-options](#interactive-setup-command) section for more details on all required and optional configuration options.\n\nAfter that you are ready to upload/download your files! 🎉\n\n## 📚 Usage\n\n```shell\nUsage: spaces-cli [command] [options]\n\nCommands:\n  upload|up [options] \u003cfiles...\u003e  Upload file/s or directories to DO spaces\n  download|down [options] \u003cfile\u003e  Download file from DO spaces\n  config [options]                Output current config\n  setup|start [options]           Start interactive setup\n  help [command]                  display help for command\n\nOptions:\n  -t, --upload-to \u003cpath\u003e         path to upload file to\n  -o, --output \u003cpath\u003e            path/file name of downloaded file\n  -s, --space \u003cname\u003e             specify the name of your DO space\n  -r, --region \u003cname\u003e            specify the region of your space\n  -a, --access \u003cpermission\u003e      file permission public/private (default: private)\n  -i, --access-key-id \u003ckey\u003e      space access key id\n  -k, --secret-access-key \u003ckey\u003e  space secret key\n  -c, --custom-domain \u003cname\u003e     specify custom CDN endpoint\n  -d, --debug                    enable debug mode (default: false)\n  -h, --help                     display help for command\n```\n\nCheck out the examples [below](#%EF%B8%8F-examples) to help you get started.\n\n## ⚙️ Setup Options\n\nHere are all the options [spaces-cli](https://github.com/BetaHuhn/spaces-cli) takes:\n\n| Name | Description | Env Variable | Command Line Arg | Required |\n| ------------- | ------------- | ------------- | ------------- | ------------- |\n| *Access Key ID* | Needs to be generated on your DO account page ([here](https://cloud.digitalocean.com/account/api/tokens)) | `ACCESS_KEY_ID` | `--access-key-id` | **Yes** |\n| *Secret Access Key* | Needs to be generated on your DO account page ([here](https://cloud.digitalocean.com/account/api/tokens)) | `SECRET_ACCESS_KEY` | `--secret-access-key` | **Yes** |\n| *Space Name* | Name of your Space | `SPACE` | `--space` | **Yes** |\n| *Space Region* | Region where your Space is located | `REGION` | `--region` | **Yes** |\n| *Access* | File permission, either public/private (default: private) | `ACCESS` | `--access` | **No** |\n| *Custom Domain* | Use a custom domain/CDN endpoint (only used for output) | `CUSTOM_DOMAIN` | `--custom-domain` | **No** |\n| *Upload To* | Specify a upload directory to use | `UPLOAD_TO` | `--upload-to` | **No** |\n| *Output* | Path/file name for downloaded file | N/A | `--output` | **Only for download** |\n| *Debug* | Enable debug mode to get more output on what's happening | `DEBUG` | `--debug` | **No** |\n\n\u003e **Note:** for convenience, you can also specify the space name and region via one option like this: `--space name.region` or `SPACE=name.region`\n\nThere are multiple ways to specify these values. Each of them can either be specified via [command line arguments](#command-line-arguments) (e.g. `--access-key-id xxx`), set as an [environment variable](#environment-variables) (e.g. `ACCESS_KEY_ID=xxx`), or stored permanently in a configuraton file via the [setup command](#interactive-setup-command) (Note: Command line arguments will take precedence over environment variables and the stored configuration file).\n\nThe recommended way to use [spaces-cli](https://github.com/BetaHuhn/spaces-cli) is to save your `ACCESS_KEY_ID` and `SECRET_ACCESS_KEY` via the [`setup`](#interactive-setup-command) command once and then specify all other options as command line arguments on each run.\n\n### Command Line Arguments\n\nYou can specify each value individually as an command line argument when running any command. Run `spaces-cli help \u003ccommand\u003e` to see which options are available for each command.\n\n### Interactive Setup Command\n\nIf you don't want to specify these values every time you run the command, you can store them permanently in a configuration file.\n\nStart the interactive setup process with this command:\n\n```shell\nspaces-cli setup\n```\n\nThe configuration will be stored in your home directory: `~/.config/configstore/spaces-cli.json` and can be returned at any point with the `config` command.\n\n### Environment Variables\n\nAs mentioned above, you can also store the values as environment variables. They have to be uppercase and words need be seperated by underscores, e.g `ACCESS_KEY_ID`.\n\n## 🛠️ Examples\n\nAll examples below assume that you have saved your `ACCESS_KEY_ID` and `SECRET_ACCESS_KEY` either via the [`setup`](#interactive-setup-command) command or as [environment variables](#environment-variables). All other options will be specifed as [command line arguments](#command-line-arguments).\n\n### Upload a file\n\nCommand:\n\n```shell\n$ spaces-cli up file.txt -s space-name -r region\n```\n\nOutput:\n\n```shell\n✔  Uploaded to: http://space-name.region.digitaloceanspaces.com/file.txt\n```\n\n**Specify upload path:**\n\nCommand:\n\n```shell\n$ spaces-cli up file.txt -t /folder/name/file.txt -s space-name -r region\n```\n\nOutput:\n\n```shell\n✔  Uploaded to: http://space-name.region.digitaloceanspaces.com/folder/name/file.txt\n```\n\n**Upload multiple files**\n\nCommand:\n\n```shell\n$ spaces-cli up file.txt file2.txt -t /folder/name/ -s space-name -r region\n```\n\nOutput:\n\n```shell\n✔  Uploaded to: http://space-name.region.digitaloceanspaces.com/folder/name/file.txt\n✔  Uploaded to: http://space-name.region.digitaloceanspaces.com/folder/name/file2.txt\n```\n\n**Upload directories**\n\nCommand:\n\n```shell\n$ spaces-cli up /from/folder -t /to/folder -s space-name -r region\n```\n\nOutput:\n\n```shell\n✔  All files uploaded to:  https:/space-name.region.digitaloceanspaces.com/to/folder/\n```\n\n### Download a file\n\nCommand:\n\n```shell\n$ spaces-cli down http://space-name.region.digitaloceanspaces.com/folder/name/file.txt\n```\n\nor \n\n```shell\n$ spaces-cli down /folder/name/file.txt -s space-name -r region\n```\n\nOutput:\n\n```shell\n✔  Downloaded to: file.txt\n```\n\n**Specify output file:**\n\nCommand:\n\n```shell\n$ spaces-cli down http://space-name.region.digitaloceanspaces.com/folder/name/file.txt -o newFile.txt\n```\n\nOutput:\n\n```shell\n✔  Downloaded to: newFile.txt\n```\n\n## 💻 Development\n\nIssues and PRs are very welcome!\n\n- run `yarn lint` or `npm run lint` to run eslint.\n- run `yarn build` or `npm run build` to build a single file in the `dist` folder.\n\nThis project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). To see differences with previous versions refer to the [CHANGELOG](./CHANGELOG.md).\n\n## ❔ About\n\nThis project was developed by me ([@betahuhn](https://github.com/BetaHuhn)) in my free time. If you want to support me:\n\n[![Donate via PayPal](https://img.shields.io/badge/paypal-donate-009cde.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=394RTSBEEEFEE)\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F81S2RK)\n\nOr use my referral link https://m.do.co/c/779397b07aaa to get 100$ Credit on DigitalOcean (I get 25$)\n\n**[spaces-cli](https://github.com/BetaHuhn/spaces-cli) is in no way affiliated with DigitalOcean.**\n\n## 📄 License\n\nCopyright 2021 Maximilian Schiller\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetahuhn%2Fspaces-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetahuhn%2Fspaces-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetahuhn%2Fspaces-cli/lists"}