Skip to content

Commit

Permalink
readme screenshots + gif
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Jan 6, 2024
1 parent 00094bd commit abf1345
Show file tree
Hide file tree
Showing 15 changed files with 98 additions and 57 deletions.
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ An efficient terminal application/TUI for interacting with your [HashiCorp Nomad
- See full job or allocation specs
- Save any content to a local file

![](./img/home.png)
`wander` is written with tools from [Charm](https://charm.sh/).

[More Screenshots](./img/screenshots#readme)
[Feature requests and bug reports are welcome](https://github.com/robinovitch61/wander/issues/new/choose).

![](./img/wander_flow.drawio.png)
## Demo

`wander` is written with tools from [Charm](https://charm.sh/).
![](./img/wander.gif)

[Screenshots](./img/screenshots#readme)

[Feature requests and bug reports for wander are welcome](https://github.com/robinovitch61/wander/issues/new/choose).
## Flow Diagram
![](./img/wander_flow.drawio.png)

## Installation

Expand All @@ -52,17 +55,11 @@ yay -S wander-bin

# with go (https://go.dev/doc/install)
go install github.com/robinovitch61/wander@latest

# build from source
git clone [email protected]:robinovitch61/wander.git
cd wander
go build
mv ./wander /usr/local/bin # or somewhere else in your PATH

# OR download prebuilt release from https://github.com/robinovitch61/wander/releases
# and move the unpacked executable to somewhere in your PATH, e.g. /usr/local/bin
```

You can also download [prebuilt releases](https://github.com/robinovitch61/wander/releases) and move the unpacked
executable to somewhere in your `PATH`, e.g. `/usr/local/bin`.

## Usage

Run the app by running `wander` in a terminal. See `wander --help` and config section below for details.
Expand Down Expand Up @@ -234,8 +231,7 @@ Serve the ssh app with `wander serve`.

## Trying It Out

You can try `wander` out by running a local nomad cluster in dev mode
following [these instructions](https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started):
You can try `wander` out by running a local development nomad cluster following [these instructions](https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started):

```sh
# in first terminal session, start and leave nomad running in dev mode
Expand Down Expand Up @@ -263,9 +259,14 @@ In this case, you're responsible for ensuring the specified version is in sync w

## Development

The `scripts/dev.sh` script watches the source code and rebuilds the app on changes
using [entr](https://github.com/eradman/entr). Install the latest release of `nomad`.
To manually build:

```shell
git clone [email protected]:robinovitch61/wander.git
cd wander
go build # outputs ./wander executable
```

`wander` runs the built app. You must rerun it on rebuild.
The [scripts](/scripts) directory contains various development helper scripts.

If the `WANDER_DEBUG` environment variable is set to `true`, the `dev.Debug(s string)` function outputs to `wander.log`.
Binary file removed img/home.png
Binary file not shown.
Binary file added img/screenshots/All_Jobs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/All_Tasks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/Allocation_Statistics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/Exec.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/screenshots/Global_Events.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/screenshots/Job_Events.png
Binary file not shown.
16 changes: 14 additions & 2 deletions img/screenshots/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# All Jobs
![](./All_Jobs.png)
# All Tasks
![](./All_Tasks.png)
# Allocation Statistics
![](./Allocation_Statistics.png)
# Exec
![](./Exec.png)
# Global Events
![](./Global_Events.png)
# Job Events
![](./Job_Events.png)
# Save Any View to Local File
![](./Save_Any_View_to_Local_File.png)
# Task Logs
![](./Task_Logs.png)
# Tasks for Job
![](./Tasks_for_Job.png)
Binary file added img/screenshots/Save_Any_View_to_Local_File.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/Task_Logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/Tasks_for_Job.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/wander.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions scripts/gif_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# expects nomad to already be running locally
# should be run from scripts directory

# get the latest tag on this branch
latest_tag=$(git describe --tags --abbrev=0)
./rebuild.sh "$latest_tag"
tag=${1:-$latest_tag}
./rebuild.sh "$tag"
mv ~/.wander.{yaml,yaml.tmp}
vhs vhs.tape
mv ~/.wander.{yaml.tmp,yaml}
Expand Down
96 changes: 62 additions & 34 deletions scripts/vhs.tape
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# Sleep:
# Sleep <time> Sleep for a set amount of <time> in seconds
#
# Type@1ms:
# Type@1ms[@<time>] "<characters>" Type@1ms <characters> into the terminal with a
# Type:
# Type[@<time>] "<characters>" Type <characters> into the terminal with a
# <time> delay between each character
#
# Keys:
Expand All @@ -40,78 +40,106 @@
# Hide Hide the subsequent commands from the output
# Show Show the subsequent commands in the output

Output "ignore.gif"
Require wander
Output "../img/wander.gif"

Set Padding 10
Set FontSize 13
Set Width 1100
Set Height 450
Set Framerate 15

Type@1ms "wander"
Hide
Type "wander"
Enter
Sleep 500ms
Show

# All Jobs
Type@1ms "j"
Sleep 200ms
Screenshot ../img/home.png
Sleep 200ms
Sleep 1s
Type@500ms "jj"
Type@500ms "k"
Screenshot ../img/screenshots/All_Jobs.png
Sleep 1s

# All Events
Type "V"
Sleep 200ms
Sleep 2s
Screenshot ../img/screenshots/Global_Events.png
Sleep 200ms
Type@300ms "j"
Enter
Sleep 1s
Type@500ms "dd"

# Job Events
Escape 2
Type@1ms "v"
Sleep 200ms
Screenshot ../img/screenshots/Job_Events.png
Sleep 200ms
# Back to All Jobs
Escape@1s 2
Sleep 1s

# All Tasks
Type@1ms "A"
Type@1ms "jj"
Type@1ms "k"
Type "A"
Sleep 1s
Screenshot ../img/screenshots/All_Tasks.png
Type@500ms "jj"
Type@500ms "k"
Sleep 1s

# Exec for Task
Type@1ms "e"
Type "e"
Sleep 1s
Backspace 10
Type@1ms "bash"
Type@200ms "bash"
Sleep 500ms
Enter
Type@1ms "ls -la"
Type@150ms "ls -la"
Sleep 300ms
Enter
Sleep 2s
Screenshot ../img/screenshots/Exec.png
Ctrl+d
Escape 2
Sleep 2s
Escape@300ms 2
Sleep 500ms

# Back to All Jobs
Type@1ms "J"
Type "J"
Sleep 1s

# Tasks for Job
Enter
Screenshot ../img/screenshots/Tasks_for_Job.png
Sleep 2s

# Logs for Task, Filtering
Enter
Type@1ms "/"
Type@1ms "INFO"
Sleep 2s
Screenshot ../img/screenshots/Task_Logs.png
Type "/"
Sleep 1s
Type@200ms "INFO"
Sleep 0.5s
Enter
Type@1ms "nnnN"
Type@1ms "jjkk"
Type@0.5s "nnnN"
Type@300ms "jjkk"
Enter
Escape 2
Sleep 1s
Escape@200ms 2

# Save Logs
Ctrl+S
Type@1ms "my_logs.txt"
Type@100ms "/tmp/my_logs.txt"
Sleep 500ms
Screenshot ../img/screenshots/Save_Any_View_to_Local_File.png
Enter
Sleep 3s

# Back to Tasks for Job
Escape
Sleep 1s

# Stats for Allocation
Type@1ms "s"
Type "s"
Screenshot ../img/screenshots/Allocation_Statistics.png
Sleep 2s

# Back to Tasks for Job
Escape
# Exit
Ctrl+c
Sleep 1s

0 comments on commit abf1345

Please sign in to comment.