Code Monkey home page Code Monkey logo

stu's Introduction

STU

Crate Status

S3 Terminal UI

About

STU is the TUI explorer application for Amazon S3 (AWS S3) written in Rust using ratatui.

Installation

Cargo

$ cargo install stu

Homebrew (macOS)

$ brew install lusingander/tap/stu

AUR (Arch Linux)

$ paru -S stu

Binary

You can download binaries from releases.

Usage

After installation, run the following command:

$ stu

Basically, you can use it in the same way as the AWS CLI.

In other words, if the default profile settings exist or the environment variables are set, you do not need to specify any options.

Options

STU - S3 Terminal UI

Usage: stu [OPTIONS]

Options:
  -r, --region <REGION>     AWS region
  -e, --endpoint-url <URL>  AWS endpoint url
  -p, --profile <NAME>      AWS profile name
  -b, --bucket <NAME>       Target bucket name
      --debug               Output debug logs
  -h, --help                Print help
  -V, --version             Print version

Here are some examples of how to run with options:

# Connect by specifying the profile
$ stu --profile foo-profile

# Show only the specified bucket objects
$ stu --bucket bar-bucket

# Connect to localstack, minio, etc.
$ stu --endpoint-url http://localhost:12345

# Connect by specifying environment variables
$ AWS_ACCESS_KEY_ID=abc AWS_SECRET_ACCESS_KEY=xyz stu

Keybindings

The basic key bindings are as follows:

Key Description
Ctrl-C Quit app
Esc Quit app / Close dialog
Enter Confirm / Open selected item
Backspace Go back to previous / Close dialog
j/k Select item / Scroll
? Show help

Detailed operations on each view can be displayed by pressing ? key.

Config

Config is loaded from $STU_ROOT_DIR/config.toml.

  • If STU_ROOT_DIR environment variable is not set, ~/.stu is used by default.
  • If the file does not exist, it will be created automatically at startup.
  • If no value is set, the default value will be set.

The values that can be set are as follows:

  • download_dir: string - Directory to save when downloading objects (default: $STU_ROOT_DIR/download)
  • preview.highlight: bool - Whether syntax highlighting is enabled in preview (default: false)

Features / Screenshots

Bucket list

  • Show list of buckets
    • filter/sort items

Object list

  • Show list of objects in a hierarchy
    • filter/sort items

Object detail

  • Show object details
  • Show object versions
  • Download object
  • Preview object (text file only)
  • Copy resource name to clipboard

Troubleshooting

  • If you cannot connect to AWS S3, first check whether you can connect using the AWS CLI with the same settings.
  • By running with the --debug flag, logs will be output to $STU_ROOT_DIR/debug.log.
    • Currently, application events and AWS SDK logs are output.
    • Pressing F12 while the application is running will dump the application state to the log.
  • When reporting a problem, please include the information like the following.
    • Application version
    • Operating system and version
    • Terminal you are using
    • Steps to reproduce the issue
    • Relevant log files or error messages

License

MIT

stu's People

Contributors

luisnquin avatar lusingander avatar orhun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stu's Issues

Example for config.toml with credentials

I'm struggling to provide a working config.toml or environment variables.
Should I be able to use the environment variables for AWS? Just like this AWS_ENDPOINT_URL?
For me this doesn't seem to be working.
Only when I provide the endpoint with -e I get a matching error message in the log file.

Fork to add copy/move files feature

Hey there, my bad if opening this issue is not the correct way of asking, but, can I fork your repo and try to add a copy/move (from a bucket to another) functionality?

Thanks

Crashes on empty bucket

I tested it against an empty bucket and it crashed with the following message:

thread 'main' panicked at src/pages/object_list.rs:151:17:
selected index 0 is out of range 0

Possibility to see object ACL

Hello @lusingander, I'm always using this tool in my work and I'd like to have that parameter if you don't see any trouble with that :)

I'm even recommending this tool to my near people and I'd like to contribute as soon as I can

Copy dialog: support for Wayland communication protocol

Hello, I tried this new feature on my computer and it seems that it has an error when trying to copy the selected text to my clipboard

image

image

Then I tried to open the copy dialog in another object but then the error doesn't persist even when I restart the program with another term session. It seems that the application says that the copy process was successful but that's wrong, there's no new content in my clipboard even when I exited

image

image

My computer:

Communication protocol

Wayland

Compositor

Hyprland

Slow / Stopped Interface In Listing View

I noticed that while accessing a bucket, I experienced a significant slow-down or freeze, where the interface no longer responded to key events. No errors in $STU_ROOT_DIR/error.log, this is where I get stuck:

Screenshot 2024-04-05 at 10 51 44 PM

Each folder has dozens of *.mkv video files ranging from 20-200MB.

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.