Code Monkey home page Code Monkey logo

s3-edit's Introduction

s3-edit

Edit directly a file on Amazon S3 in CLI.

GitHub release CircleCI branch Go Documentation MIT license

Installation

Use go get

$ go get -u github.com/tsub/s3-edit

Install with Homebrew

For macOS and Linux

$ brew install tsub/s3-edit/s3-edit

Get binary from GitHub releases

Download latest binary from https://github.com/tsub/s3-edit/releases

Requirements

  • AWS credentials
  • Upload files to S3 in advance

For examples, use aws-cli

$ aws configure --profile myaccount
$ export AWS_PROFILE=myaccount

Other methods,

$ export AWS_ACCESS_KEY_ID=xxxx
$ export AWS_SECRET_ACCESS_KEY=xxxx
$ export AWS_REGION=ap-northeast-1

Usage

Upload the file to S3 in advance.

$ echo "This is a test file." > myfile.txt
$ aws s3 cp test.txt s3://mybucket/myfile.txt

To directly edit a file on S3, use edit subcommand.

$ s3-edit edit s3://mybucket/myfile.txt

Then, open a file with the default editor specified by $EDITOR.

https://gyazo.com/96c9225da700f91e7b44c04f439fdd23

When you close the editor after edit, a file is automatically re-uploaded to S3.

$ aws s3 cp s3://mybucket/myfile.txt -
This is a test file.
Edited with s3-edit.

Development

Requirements

  • Golang >= 1.11

How to setup

$ git clone [email protected]:tsub/s3-edit.git
$ export GO111MODULE=on

s3-edit's People

Contributors

tsub avatar koooge avatar ryosms avatar masutaka avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.