rubber-ducky 1.3.0__py3-none-any.whl → 1.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show disk usage with highlights
4
+
5
+ echo "=== Disk Usage Overview ==="
6
+ df -h 2>/dev/null | grep -E "(/|Filesystem)"
7
+
8
+ echo -e "\n=== Detailed Disk Usage ==="
9
+ du -h -d 2 . 2>/dev/null | sort -hr | head -20
10
+
11
+ echo -e "\n=== Largest Files in Current Directory ==="
12
+ find . -type f -not -path '*/\.git/*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/\__pycache__/*' -exec du -h {} + 2>/dev/null | sort -rh | head -10
@@ -0,0 +1,3 @@
1
+ name: disk-usage
2
+ type: shell
3
+ description: Show disk usage with highlights on full drives
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show recent commit history with details
4
+
5
+ if ! git rev-parse --git-dir > /dev/null 2>&1; then
6
+ echo "Not a git repository."
7
+ exit 1
8
+ fi
9
+
10
+ # Default to showing last 10 commits
11
+ COMMIT_COUNT=10
12
+
13
+ if [ -n "$1" ] && [[ "$1" =~ ^[0-9]+$ ]]; then
14
+ COMMIT_COUNT=$1
15
+ fi
16
+
17
+ echo "=== Recent ${COMMIT_COUNT} Commits ==="
18
+ git log --oneline -$COMMIT_COUNT
19
+
20
+ echo -e "\n=== Detailed View of Last ${COMMIT_COUNT} Commits ==="
21
+ git log -${COMMIT_COUNT} --pretty=format:"%h - %an, %ar : %s" --stat
22
+
23
+ echo -e "\n=== Author Statistics ==="
24
+ git shortlog -sn --all -${COMMIT_COUNT} 2>/dev/null
@@ -0,0 +1,3 @@
1
+ name: git-log
2
+ type: shell
3
+ description: Show recent commit history with detailed information
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show comprehensive git status and recent activity
4
+
5
+ echo "=== Git Status ==="
6
+ git status --short 2>/dev/null || echo "Not a git repository."
7
+
8
+ echo -e "\n=== Current Branch ==="
9
+ git branch --show-current 2>/dev/null || echo "Not a git repository."
10
+
11
+ echo -e "\n=== Last 3 Commits ==="
12
+ git log --oneline -3 2>/dev/null || echo "No commits found."
13
+
14
+ echo -e "\n=== Staged Changes (if any) ==="
15
+ git diff --cached --stat 2>/dev/null
16
+
17
+ echo -e "\n=== Unstaged Changes (if any) ==="
18
+ git diff --stat 2>/dev/null
19
+
20
+ echo -e "\n=== Untracked Files (if any) ==="
21
+ git ls-files --others --exclude-standard 2>/dev/null | head -20
@@ -0,0 +1,3 @@
1
+ name: git-status
2
+ type: shell
3
+ description: Show current git branch, uncommitted changes, and provide suggestions for next steps
@@ -0,0 +1,3 @@
1
+ name: process-list
2
+ type: shell
3
+ description: Show running processes with key information
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show running processes with useful information
4
+
5
+ echo "=== Running Processes (Top 20 by CPU) ==="
6
+ ps aux | sort -rk 3,3 | head -21 | awk '{printf "%-8s %-6s %-8s %s\n", $1, $2, $3, $11}' | column -t
7
+
8
+ echo -e "\n=== Running Processes (Top 20 by Memory) ==="
9
+ ps aux | sort -rk 4,4 | head -21 | awk '{printf "%-8s %-6s %-8s %s\n", $1, $2, $4, $11}' | column -t
10
+
11
+ echo -e "\n=== Process Counts by User ==="
12
+ ps aux | awk '{print $1}' | sort | uniq -c | sort -rn | head -10
13
+
14
+ echo -e "\n=== Check for Specific Processes ==="
15
+ for proc in "node" "python" "java" "docker" "npm" "uv"; do
16
+ count=$(pgrep -c "$proc" 2>/dev/null || echo "0")
17
+ if [ "$count" -gt 0 ]; then
18
+ echo "$proc: $count process(es)"
19
+ fi
20
+ done | sort
@@ -0,0 +1,3 @@
1
+ name: recent-files
2
+ type: shell
3
+ description: Show recently modified files in the current directory
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show recently modified files in current directory
4
+ # Takes optional argument for number of files to show (default 20)
5
+
6
+ FILE_COUNT=20
7
+
8
+ if [ -n "$1" ] && [[ "$1" =~ ^[0-9]+$ ]]; then
9
+ FILE_COUNT=$1
10
+ fi
11
+
12
+ echo "=== ${FILE_COUNT} Most Recently Modified Files ==="
13
+ find . -type f -not -path '*/\.*' -not -path '*/node_modules/*' -not -path '*/\.git/*' -not -path '*/venv/*' -not -path '*/\__pycache__/*' -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -${FILE_COUNT} | awk '{print strftime("%Y-%m-%d %H:%M:%S", $1), $2}'
@@ -0,0 +1,3 @@
1
+ name: system-health
2
+ type: shell
3
+ description: Show system health metrics including CPU, memory, and load
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Show system health metrics
4
+ # Works on macOS and Linux
5
+
6
+ detect_os() {
7
+ if [[ "$OSTYPE" == "darwin"* ]]; then
8
+ echo "macos"
9
+ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
10
+ echo "linux"
11
+ else
12
+ echo "unknown"
13
+ fi
14
+ }
15
+
16
+ OS=$(detect_os)
17
+
18
+ echo "=== System Health ==="
19
+ echo "Platform: $OS"
20
+ echo "Uptime: $(uptime)" | awk '{print $3, $4}'
21
+ echo "Users logged in: $(who | wc -l | tr -d ' ')"
22
+
23
+ echo -e "\n=== CPU Usage ==="
24
+
25
+ if [ "$OS" == "macos" ]; then
26
+ echo "Load averages (1m, 5m, 15m): $(sysctl -n vm.loadavg)"
27
+ top -l 1 | grep "CPU usage"
28
+ elif [ "$OS" == "linux" ]; then
29
+ echo "Load averages (1m, 5m, 15m): $(uptime | awk -F'load average:' '{print $2}')"
30
+ top -bn1 | grep "Cpu(s)"
31
+ fi
32
+
33
+ echo -e "\n=== Memory Usage ==="
34
+
35
+ if [ "$OS" == "macos" ]; then
36
+ # macOS memory
37
+ echo "Memory Stats:"
38
+ vm_stat | perl -ne '/page size of (\d+)/ and $ps=$1; /Pages\s+([^:]+)[^\d]+(\d+)/ and printf("%-16s % 16.2f MB\n", "$1:", $2 * $ps / 1048576);'
39
+ elif [ "$OS" == "linux" ]; then
40
+ free -h
41
+ fi
42
+
43
+ echo -e "\n=== Disk Space ==="
44
+ df -h | grep -vE '^Filesystem|tmpfs|cdrom|devtmpfs'
45
+
46
+ echo -e "\n=== Network Connections ==="
47
+
48
+ if [ "$OS" == "macos" ]; then
49
+ netstat -an | grep ESTABLISHED | wc -l | xargs echo "Active network connections:"
50
+ elif [ "$OS" == "linux" ]; then
51
+ ss -tun | grep ESTAB | wc -l | xargs echo "Active network connections:"
52
+ fi
53
+
54
+ echo -e "\n=== Top 5 Processes by CPU ==="
55
+ ps aux | sort -rk 3,3 | head -11 | tail -10 | awk '{printf "%-10s %6s %s\n", $1, $3, $11}'
56
+
57
+ echo -e "\n=== Top 5 Processes by Memory ==="
58
+ ps aux | sort -rk 4,4 | head -11 | tail -10 | awk '{printf "%-10s %6s %s\n", $1, $4, $11}'