9router-webui-plasma-git
maintainer Pakrohk
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package builds from the project's own GitHub source, uses standard build tools (bun), and installs a systemd user service for local execution; the only concerns are SKIP'd checksum and low AUR votes, but no malicious or unverifiable remote code execution is present.
Triggered rules
LOW
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
LOW
AI review
llm_review
An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package builds from the project's own GitHub source, uses standard build tools (bun), and installs a systemd user service for local execution; the only concerns are SKIP'd checksum and low AUR votes, but no malicious or unverifiable remote code execution is present.
PKGBUILD
1
# Maintainer: pakrohk <pakrohk@gmail.com>
2
pkgname=9router-webui-plasma-git
3
pkgver=0.0.0
4
pkgrel=2
5
pkgdesc="9Router - AI model router with WebUI. Built with Bun, optimized for KDE Plasma desktop (systemd user service)"
6
arch=('x86_64' 'aarch64')
7
url="https://github.com/decolua/9router"
8
license=('MIT')
9
depends=('bun' 'curl' 'rsync' 'libnotify' 'systemd')
10
makedepends=('git' 'python' 'make' 'gcc')
11
source=("$pkgname::git+https://github.com/decolua/9router.git")
12
sha256sums=('SKIP')
13
options=('!strip')
14
15
# ==================== VERSIONING (AUR STANDARD) ====================
16
pkgver() {
17
cd "$srcdir/$pkgname"
18
# Generate version from git tags: v0.1.0 -> 0.1.0.r12.g78a26cc
19
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
20
}
21
# ==================================================================
22
23
build() {
24
cd "$srcdir/$pkgname"
25
bun install
26
bun run build
27
}
28
29
package() {
30
cd "$srcdir/$pkgname"
31
32
# 1. Install built files to /usr/lib/9router
33
install -dm755 "$pkgdir/usr/lib/9router"
34
cp -r . "$pkgdir/usr/lib/9router/"
35
36
# 2. Remove unnecessary files
37
rm -rf "$pkgdir/usr/lib/9router/"{.git,.env.example,*.log}
38
39
# 3. Install production dependencies with Bun
40
cd "$pkgdir/usr/lib/9router"
41
bun install --production
42
43
# 4. Main launcher script (systemd user service + Plasma integration)
44
install -Dm755 /dev/stdin "$pkgdir/usr/bin/9router" <<'EOF'
45
#!/bin/bash
46
# 9Router Launcher - Built with Bun, Optimized for Plasma Desktop
47
48
PORT=${PORT:-20128}
49
APP_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/9router-app"
50
CONFIG_FILE="$APP_DIR/.env"
51
SERVICE_NAME="9router.service"
52
USER_SERVICE_DIR="$HOME/.config/systemd/user"
53
54
# Ensure app directory exists
55
if [ ! -d "$APP_DIR" ]; then
56
echo "📦 First run: Setting up 9Router in $APP_DIR ..."
57
mkdir -p "$APP_DIR"
58
rsync -a --exclude='node_modules' --exclude='.next' /usr/lib/9router/ "$APP_DIR/"
59
cd "$APP_DIR"
60
bun install --production
61
cat > "$APP_DIR/.env" <<EOL
62
PORT=$PORT
63
NODE_ENV=production
64
DATA_DIR=$APP_DIR/data
65
NEXT_PUBLIC_BASE_URL=http://localhost:$PORT
66
EOL
67
fi
68
69
mkdir -p "$APP_DIR/data"
70
71
if [ -f "$CONFIG_FILE" ]; then
72
set -a
73
source "$CONFIG_FILE"
74
set +a
75
fi
76
77
install_service() {
78
mkdir -p "$USER_SERVICE_DIR"
79
cat > "$USER_SERVICE_DIR/$SERVICE_NAME" <<EOL
80
[Unit]
81
Description=9Router - AI Model Router (WebUI)
82
After=network.target
83
84
[Service]
85
Type=simple
86
WorkingDirectory=$APP_DIR
87
Environment="NODE_ENV=production"
88
Environment="PORT=$PORT"
89
Environment="DATA_DIR=$APP_DIR/data"
90
Environment="NEXT_PUBLIC_BASE_URL=http://localhost:$PORT"
91
ExecStart=/usr/bin/bun run start
92
ExecStop=/usr/bin/pkill -f "bun.*$APP_DIR"
93
Restart=on-failure
94
RestartSec=10
95
96
[Install]
97
WantedBy=default.target
98
EOL
99
systemctl --user daemon-reload
100
echo "✅ Systemd user service installed: $SERVICE_NAME"
101
}
102
103
case "$1" in
104
start)
105
systemctl --user start "$SERVICE_NAME"
106
notify-send -i network-server "9Router" "Server started on port $PORT"
107
sleep 2
108
xdg-open "http://localhost:$PORT/dashboard"
109
;;
110
stop)
111
systemctl --user stop "$SERVICE_NAME"
112
notify-send -i network-server "9Router" "Server stopped"
113
;;
114
restart)
115
systemctl --user restart "$SERVICE_NAME"
116
notify-send -i network-server "9Router" "Server restarted"
117
;;
118
status)
119
systemctl --user status "$SERVICE_NAME"
120
;;
121
logs)
122
journalctl --user -u "$SERVICE_NAME" -f
123
;;
124
install)
125
install_service
126
systemctl --user enable "$SERVICE_NAME"
127
echo "🔧 Service enabled to start at login"
128
;;
129
*)
130
if ! systemctl --user is-active --quiet "$SERVICE_NAME"; then
131
echo "🚀 Starting 9Router service..."
132
install_service
133
systemctl --user start "$SERVICE_NAME"
134
sleep 2
135
notify-send -i network-server "9Router" "Server is now running on port $PORT"
136
fi
137
xdg-open "http://localhost:$PORT/dashboard"
138
;;
139
esac
140
EOF
141
142
# 5. Plasma desktop entry
143
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/9router.desktop" <<EOF
144
[Desktop Entry]
145
Name=9Router
146
Comment=AI Model Router & Token Saver (Built with Bun)
147
Exec=/usr/bin/9router start
148
Icon=network-server
149
Terminal=false
150
Type=Application
151
Categories=Development;Network;
152
StartupNotify=true
153
StartupWMClass=9router
154
Actions=OpenDashboard;StopServer;ViewLogs
155
156
[Desktop Action OpenDashboard]
157
Name=Open Dashboard
158
Exec=/usr/bin/9router start
159
Icon=network-server
160
161
[Desktop Action StopServer]
162
Name=Stop Server
163
Exec=/usr/bin/9router stop
164
Icon=process-stop
165
166
[Desktop Action ViewLogs]
167
Name=View Logs
168
Exec=konsole -e /usr/bin/9router logs
169
Icon=utilities-log
170
EOF
171
172
# 6. KRunner shortcut
173
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/9router-krunner.desktop" <<EOF
174
[Desktop Entry]
175
Name=9Router Dashboard
176
Comment=Open 9Router WebUI directly
177
Exec=xdg-open http://localhost:20128/dashboard
178
Icon=network-server
179
Terminal=false
180
Type=Application
181
Categories=Development;
182
OnlyShowIn=KDE;
183
EOF
184
185
# 7. Bash completion
186
install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/9router" <<'EOF'
187
_9router() {
188
local cmds="start stop restart status logs install"
189
COMPREPLY=($(compgen -W "$cmds" -- "${COMP_WORDS[1]}"))
190
}
191
complete -F _9router 9router
192
EOF
193
}
194
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 15:35:03 | LOW | 2 |