Skip to content

Commit

Permalink
chore: updated readme, licensing and getting project ready for use
Browse files Browse the repository at this point in the history
  • Loading branch information
wllfaria committed May 22, 2024
1 parent 4a0f57a commit 2e935f8
Show file tree
Hide file tree
Showing 10 changed files with 141 additions and 68 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Willians Faria

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
106 changes: 101 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,105 @@
<img src="./extra/logo.jpg" height="300" />
# REQTUI

# ReqTUI
`reqTUI` is a API Client, much like Postman or Insomnia, but for your terminal.
reqTUI has the goal of providing a good experience for testing APIs without the
need of creating an account, being completely offline, and free and open source.

Terminal HTTP Client UI to test APis.
![Preview](./extra/preview.gif)

# Demo
<details>
<summary>Expand to see more examples</summary>

![demo](./extra/examples/editor.gif)
> ![NOTE]
> this section will be filled with more examples soon
</details>

## Table of contents
- [Installation](#installation)
- [Documentation](#usage)
- [Customization](#customization)
- [Contributing](#contributing)
- [Changelog](#changelog)

## Installation

This section should guide you through the installation process and how to use
reqTUI.

You can get reqTUI with cargo, or get the latest release
[tag](https://github.com/wllfaria/reqtui/tags).

### Installing with cargo

> ![NOTE]
> you need rust v1.76 or newer
You can get reqTUI from crates.io with:

```sh
cargo install rqt
```

### Building from source

Clone the repository into your machine, and you'll be able to run, or build by
following the steps below:

```sh
git clone https://github.com/wllfaria/reqtui
cd reqtui
cargo run

# alternatively, you can run:
cargo build --release
# or if you have just:
just build
# the binary will be located at target/release/rqt
```

> ![IMPORTANT]
> reqTUI is in its very early stages of development, new features are added constantly,
> and we have many features planned, feel free to report any bugs, ask for features or
> discuss ideas.
## Documentation

> ![NOTE]
> Documentation is still a work in progress
Documentation can be found in the [reqTUI wiki](https://github.com/wllfaria/reqtui/wiki)

## Customization

Customizing reqTUI is as simple as editing toml files on the config directory, which can
be in different places based on your system and maybe in your environment variables, but
you can run the following command to know where reqTUI is looking for your configuration:

```sh
# this command will print the path to the configuration directory reqTUI is trying to load
rqt --config-dir
```

> ![NOTE]
> You can check all the configuration options and what they mean in the wiki secion
> for customizing reqTUI
reqTUI comes with a set of default configurations, you can check more on the
[wiki](https://github.com/wllfaria/reqtui/wiki), or if you prefer, you can dump the default
configuration and colorscheme to the configuration directory by using:

```sh
rqt --config-dump

# alternatively, you can specify a path

rqt --config-dump <path>
```

## Contributing

All contributions are welcome! Just open a pull request. Please read [CONTRIBUTING.md](./CONTRIBUTING.md)

## Changelog

Changelogs can be found [here](./CHANGELOG.md)
2 changes: 1 addition & 1 deletion colors/src/colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl Default for PrimaryColors {
fn default() -> Self {
PrimaryColors {
foreground: Color::Rgb(0x0F, 0x14, 0x19),
background: Color::Rgb(0x1f, 0x1f, 0x28),
background: Color::Rgb(0x18, 0x16, 0x16),
accent: Color::Rgb(0xb6, 0x92, 0x7b),
hover: Color::Rgb(0x38, 0x38, 0x38),
}
Expand Down
Binary file removed extra/examples/editor.gif
Binary file not shown.
Binary file removed extra/examples/list.gif
Binary file not shown.
42 changes: 0 additions & 42 deletions extra/examples/list.tape

This file was deleted.

Binary file removed extra/logo.jpg
Binary file not shown.
Binary file added extra/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 10 additions & 20 deletions extra/examples/editor.tape → extra/tapes/preview.tape
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
Output extra/examples/editor.gif
Output extra/preview.gif
Hide
Set Shell zsh

Set Theme { "name": "Kanagawa", "cursor": "#DCD7BA", "selection": "#2A2A37", "background": "#181616", "foreground": "#DCD7BA", "black": "#1F1F28", "blue": "#658594", "cyan": "#9CABCA", "green": "#76946A", "magenta": "#957FB8", "red": "#E82424", "white": "#DCD7BA", "yellow": "#FF9E3B", "brightBlack": "#2A2A37", "brightBlue": "#7FB4CA", "brightCyan": "#A3D4D5", "brightGreen": "#98BB6C", "brightMagenta": "#D27E99", "brightRed": "#FF5D62", "brightWhite": "#DCD7BA", "brightYellow": "#E6C384" }

Set FontSize 16
Set FontSize 12
Set Width 1200
Set Height 600

Set Padding 20
Set Padding 0
Set FontFamily "JetBrains Mono"

Set WindowBar Colorful
Set WindowBarSize 40
Set WindowBarSize 50

Type "cargo run -q"
Enter
Expand Down Expand Up @@ -56,25 +56,15 @@ Sleep 0.5s
Tab
Sleep 0.5s
Enter
Type@100ms "WWWWWW"
Type@100ms "jjjj"
Sleep 1s
Type@100ms "wwwww"
Sleep 1s
Type "D"
Sleep 1s
Type "i"
Sleep 1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Backspace
Sleep 0.1s
Type@100ms "Hello "
Type@100ms 'reqtui@is_awesome.com",'
Sleep 0.2s
Escape
Sleep 3s
8 changes: 8 additions & 0 deletions extra/tapes/run_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tapes_dir="$PWD/extra/tapes"
tapes=$(ls "$tapes_dir")

for tape in $tapes; do
if [[ "$tape" != "run_all.sh" ]]; then
vhs "$tapes_dir/$tape"
fi
done

0 comments on commit 2e935f8

Please sign in to comment.