Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions bash/nord/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,30 @@ Does need some ass bringing party tonight!
source ~/.bashrc
```

Once installed, all commands are globally available with a `nord_` prefix (e.g. `nord_login`).# Available Commands Local File | Installed Global Command | Description | :--- | :--- | :--- | `login.sh` | `nord_login` | Authenticate with NordVPN | `logout.sh` | `nord_logout` | Log out of NordVPN |
`config.sh` | `nord_config` | Configure NordVPN routing and settings |
`connect.sh` | `nord_connect <peer>` | Connect to a Meshnet peer |
`exit_node.sh` | `nord_exit_node <peer>` | Set a peer as your exit node |
`list_peers.sh` | `nord_list_peers` | List available Meshnet peers |
`set_nickname.sh` | `nord_set_nickname` | Set a local nickname for the device |
`reset.sh` | `nord_reset` | Reset NordVPN settings to defaults |
Once installed, all commands are globally available with a `nord_` prefix (e.g. `nord_login`).

## Available Commands

| Local File | Installed Global Command | Description |
|:-----------|:-------------------------|:---|
| `login.sh` | `nord_login` | Authenticate with NordVPN |
| `logout.sh` | `nord_logout` | Log out of NordVPN |
| `config.sh` | `nord_config` | Configure NordVPN routing and settings |
| `connect.sh` | `nord_connect <peer>` | Connect to a Meshnet peer |
| `exit_node.sh` | `nord_exit_node <peer>` | Set a peer as your exit node |
| `list_peers.sh` | `nord_list_peers` | List available Meshnet peers |
| `set_nickname.sh` | `nord_set_nickname` | Set a local nickname for the device |
| `reset.sh` | `nord_reset` | Reset NordVPN settings to defaults |
Comment on lines +20 to +29

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 3 'status\.sh|nord_status|copy_scripts' bash/nord
git ls-files --stage -- bash/nord/status.sh

Repository: terjeinnerdal/scripts

Length of output: 487


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'README relevant lines:\n'
nl -ba bash/nord/README.md | sed -n '1,80p'

printf '\nScripts and copy_scripts contents:\n'
for f in bash/nord/login.sh bash/nord/logout.sh bash/nord/config.sh bash/nord/connect.sh bash/nord/exit_node.sh bash/nord/list_peers.sh bash/nord/set_nickname.sh bash/nord/reset.sh bash/nord/status.sh bash/nord/copy_scripts.sh; do
  if [ -f "$f" ]; then
    echo "--- $f"
    nl -ba "$f" | sed -n '1,220p'
  else
    echo "missing $f"
  fi
done

Repository: terjeinnerdal/scripts

Length of output: 222


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'README relevant lines:\n'
awk '{printf "%6d\t%s\n", NR, $0}' bash/nord/README.md | sed -n '1,80p'

printf '\nScripts and copy_scripts contents:\n'
for f in bash/nord/login.sh bash/nord/logout.sh bash/nord/config.sh bash/nord/connect.sh bash/nord/exit_node.sh bash/nord/list_peers.sh bash/nord/set_nickname.sh bash/nord/reset.sh bash/nord/status.sh bash/nord/copy_scripts.sh; do
  if [ -f "$f" ]; then
    echo "--- $f"
    awk '{printf "%6d\t%s\n", NR, $0}' "$f" | sed -n '1,220p'
  else
    echo "missing $f"
  fi
done

Repository: terjeinnerdal/scripts

Length of output: 18866


Add status.sh to the installation and command list.

copy_scripts.sh copies each .sh script to ~/.local/bin/nord_*. status.sh exists but is never copied or documented, so nord_status is unavailable even though command scripts should all be listed here. Add cp status.sh ~/.local/bin/nord_status in bash/nord/copy_scripts.sh and add the matching row to the Available Commands table, or remove status.sh if it is not intended to be installed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` around lines 20 - 29, Add status.sh to the installation
flow in copy_scripts.sh by copying it as nord_status, and add the corresponding
nord_status entry to the README Available Commands table describing its status
functionality; only remove status.sh if it is intentionally not meant to be
installed.


## Setup Examples

Get a beautiful naighbour, love her, proposed to her, go puse for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace the malformed setup instruction.

Line 33 is not a usable instruction and contains spelling and grammar errors. Replace it with a clear description of the following commands.

Proposed fix
-Get a beautiful naighbour, love her, proposed to her, go puse for
+Use the following commands to configure an exit node and connect to a peer:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Get a beautiful naighbour, love her, proposed to her, go puse for
Use the following commands to configure an exit node and connect to a peer:
🧰 Tools
🪛 LanguageTool

[grammar] ~33-~33: Ensure spelling is correct
Context: ...s | ## Setup Examples Get a beautiful naighbour, love her, proposed to her, go puse for...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bash/nord/README.md` at line 33, Replace the malformed instruction in the
README setup section with a clear, grammatically correct description of the
commands that follow, preserving the existing command sequence and its intended
setup context.

Source: Linters/SAST tools


### Set Exit Node

nord_exit_node mesh-raspberry
1
2 ### Connect to Peer
nord_exit_node mesh-raspberry

### Connect to Peer

```bash
nord_connect mesh-raspberry
Expand Down
14 changes: 1 addition & 13 deletions bash/nord/peers.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,10 @@
"mesh-raspberry"
],
"allowed_for_local":[
"mesh-dell",
"mesh-hp"
],
"allowed_for_fileshare":[
"mesh-tab8",
"mesh-dell",
"mesh-hp",
"mesh-pixel",
"mesh-sunndal",
"mesh-raspberry"

],
"allowed_for_routing":[
"mesh-tab8",
"mesh-dell",
"mesh-hp",
"mesh-pixel",
"mesh-sunndal"
]
}
3 changes: 3 additions & 0 deletions bash/nord/status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /usr/bin/bash

nordvpn status