GitXplorerGitXplorer
t

s3-edit

public
81 stars
13 forks
2 issues

Commits

List of commits on branch master.
Verified
9196f7f29073f57caaee79f08fad9b1a86cc6b71

Merge pull request #23 from fbugaj-mrx/master

ttsub committed 2 years ago
Unverified
cca85ad5c4b041b3b3f2c1a08399570ff19bc186

update aws-sdk to the latest version (v1.44.77)

ffbugaj-mrx committed 2 years ago
Verified
0f107c677a32075560577f069e0f052326658a3b

chore: Update to go v1.17

ttsub committed 3 years ago
Verified
44033a7b01cd4c33838ec5e0b28f533e04651ac0

fix: Fix broken settings in the latest version of goreleaser

ttsub committed 3 years ago
Verified
1cf289ad370dcb09b18d968cfa33e313fd415c95

docs: Modify README.md

ttsub committed 5 years ago
Verified
6a92c1a1073e253ee0c640afdfac2019dcd9782a

Merge pull request #18 from koooge/mfa_profile

ttsub committed 5 years ago

README

The README file for this repository.

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.17