command module
Version: v1.0.4 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 1 Imported by: 0


OSS upload CLI tool

This is a CLI tool for upload files to OSS, now support Aliyun only

Quick start

  • Install
go get github.com/helloworlde/oss
  • Config

Add configuration file in $HOME/.oss.yaml like this:

  accessKeyId: YOUR_AK
  accessSecretId: YOUR_SK
    endPoint: YOUR_ENDPOINT
    bucketName: YOUR_BUCKET
    host: YOUR_HOST
    picturePath: /picture

For more convenient upload picture to OSS, so there have an picturePath config


  • Upload file
oss upload file.zip

And then will print url after success like below:

Transfer Rate:100% TotalSize: 2M FinishedSize: 2M
file.zip https://hellowoodes.oss-cn-beijing.aliyuncs.com/file.zip
  • Upload file to specify directory

Just add -d directory when upload

oss upload file.zip -d archive/file/zip
  • Upload picture to picture dicrectory

Just add -p for upload to picture directory

oss upload hello.jpg -p
  • Print as Markdown format when upload picture

Just add -m for print in Markdown format

oss upload hello.jpg -p -m
Transfer Rate:100% TotalSize: 0.20K FinishedSize: 0.20K
  • Upload folder

Upload folder is also support

oss upload .idea/ -d idea


How to create a CLI tool



Copyright © 2019 HelloWoodes <hellowoodes@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL