files-cli

command module
v1.3.31 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 9 Imported by: 0

README

Files.com Command Line App

The Files.com CLI App provides convenient access to the Files.com API.

Installation

Download the latest release for Windows, macOS, or Linux here

Homebrew
brew tap Files-com/homebrew-tap
brew install files-cli

Documentation

Setting API Key
Setting by ENV
export FILES_API_KEY="XXXX-XXXX..."
Set Via a Flag
files-cli folders list-for --api-key "XXXX-XXXX..."
List files

Return root folder listing

files-cli folders list-for --fields path,type

[{
    "path": "document.docx",
    "type": "file"
},
{
    "path": "other",
    "type": "directory"
}]

List a Folder

files-cli folders list-for other
Download a File/Folder
files-cli download [remote-path] [local-path]
Upload a File/Folder
files-cli upload [source-path] [remote-path]
Command Help
files-cli [command] --help

Development

To build for testing it assumes the go package is in parallel directory.

DEVELOPMENT_BUILD ./build.sh

This will build both the compressed release version and an uncompressed executable for the 3 platforms.

Docker
docker build . --tag files-cli:latest
docker run --workdir /app --volume ${PWD}:/app -it files-cli 
Run CLI
 docker run --workdir /app --volume ${PWD}:/app -it files-cli bash -c "go run main.go"
go mod edit -replace github.com/Files-com/files-sdk-go/v2=../files-sdk-go
docker run --workdir /app --volume ${PWD}:/app --volume ${HOME}/go/src/github.com/Files-com/files-sdk-go:/files-sdk-go -it files-cli 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL