commit f65d79fd7ab532ddfe6d2063977e365c07529b1d
Author: MeghdadFadaee <61308304+MeghdadFadaee@users.noreply.github.com>
Date: Wed Nov 4 21:51:31 2026 +0330
Initial public release of ShellGleam
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6313b56
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..1163c03
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,22 @@
+---
+name: Bug report
+about: Report unexpected dashboard or installer behavior
+title: ''
+labels: bug
+assignees: ''
+---
+
+**What happened?**
+
+**What did you expect?**
+
+**Steps to reproduce**
+
+**Environment**
+- Distribution/version:
+- Python version:
+- Shell/terminal:
+- ShellGleam version:
+
+**Sanitized output**
+Remove real hostnames, IPs, usernames, container names and credentials before posting.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..3a626c3
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: github-actions
+ directory: /
+ schedule:
+ interval: monthly
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..dc93c5f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,23 @@
+name: CI
+on:
+ push:
+ branches: [main]
+ pull_request:
+permissions:
+ contents: read
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python: ['3.9', '3.13']
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - uses: actions/setup-python@v7
+ with:
+ python-version: ${{ matrix.python }}
+ - run: python -m unittest discover -s tests -v
+ - run: bash -n scripts/bootstrap.sh deploy.sh && sh -n setup.sh
+ - run: python scripts/build_site.py
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
new file mode 100644
index 0000000..16f7e07
--- /dev/null
+++ b/.github/workflows/pages.yml
@@ -0,0 +1,41 @@
+name: Pages
+on:
+ push:
+ branches: [main]
+ workflow_dispatch:
+permissions:
+ contents: read
+concurrency:
+ group: pages
+ cancel-in-progress: false
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - uses: actions/setup-python@v7
+ with:
+ python-version: '3.13'
+ - run: python -m unittest discover -s tests -v
+ - name: Build website and installer
+ env:
+ SITE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
+ run: python scripts/build_site.py --site-url "$SITE_URL"
+ - uses: actions/upload-pages-artifact@v4
+ with:
+ path: _site
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ permissions:
+ pages: write
+ id-token: write
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - name: Deploy GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7a458bd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,13 @@
+__pycache__/
+*.py[cod]
+.idea/
+.vscode/
+.venv/
+_site/
+.env
+.env.*
+*.pem
+*.key
+*.tar.gz
+*.log
+.DS_Store
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..86695ab
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,8 @@
+# Changelog
+
+## 1.0.0
+
+- Configurable system, runtime and health dashboard for Linux login sessions.
+- Independent per-login rendering with bounded probes and ASCII support.
+- Validated setup, original backups, exception rollback and uninstall.
+- Static documentation site and checksum-verified remote installer.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..cfb209d
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,22 @@
+# Contributing
+
+Small, focused pull requests are welcome. Explain the behavior being changed,
+include meaningful regression tests, and keep login fast and failure-tolerant.
+
+Use Python 3.9+ and the standard library. Run:
+
+```bash
+python3 -m unittest discover -s tests -v
+bash -n scripts/bootstrap.sh deploy.sh
+sh -n setup.sh
+python3 scripts/build_site.py
+```
+
+Website source lives in `site/`; generated output belongs in `_site/` and is
+not committed. Please use fictional hostnames and addresses from documentation
+ranges in examples. Never submit credentials, live server output, private
+addresses or customer deployment notes. Review both source and built artifacts.
+
+Installer tests operate in temporary filesystem roots. Test real SSH/PAM changes
+only on a disposable VM with a second recovery session. Preserve rollback,
+symlink metadata and concurrent-session behavior when changing installation.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a53ae02
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 ShellGleam contributors
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c84b041
--- /dev/null
+++ b/README.md
@@ -0,0 +1,157 @@
+
+
+# ✦ ShellGleam
+
+**A brighter first look at your Linux server.**
+
+A beautiful, configurable login dashboard for Ubuntu and Debian.
+System metrics, services, containers, and health checks — before your first command.
+
+[Website & installer](https://meghdadfadaee.github.io/shell-gleam/) · [Configuration](docs/configuration.md) · [Operations](docs/operations.md) · [MIT license](LICENSE)
+
+
+
+```text
+ ╭────────────────────────────────────────────────────────────────────────╮
+ │ ◆ ORBIT ● HEALTHY │
+ │ Ubuntu 24.04 LTS · 192.0.2.10 │
+ ├─ SYSTEM ───────────────────────────────────────────────────────────────┤
+ │ │
+ │ ↑ Uptime 12d 4h ≋ Load average 0.24 (8 cores) │
+ │ Memory ████░░░░░░░░░░░░░░ 23% · 3.7 / 16.0 GiB │
+ │ Disk / ██████░░░░░░░░░░░░ 34% · 68.0 / 200.0 GiB │
+ │ │
+ ├─ RUNTIME ──────────────────────────────────────────────────────────────┤
+ │ ● Nginx is online │
+ │ ● Docker is online │
+ │ 4 containers running · 4 healthchecked │
+ ├─ HEALTH ───────────────────────────────────────────────────────────────┤
+ │ ✓ No failed systemd units │
+ │ ✓ Packages current (cached) │
+ │ ✓ No reboot needed │
+ ╰────────────────────────────────────────────────────────────────────────╯
+```
+
+*Illustrative output. Hostnames, addresses and metrics above are fictional.*
+
+## Install in one command
+
+```bash
+curl -fsSL https://meghdadfadaee.github.io/shell-gleam/setup.sh | bash
+```
+
+The bootstrap downloads a versioned package, verifies its embedded SHA-256,
+and requests `sudo` if needed. It retains setup at `/opt/shell-gleam`.
+
+Pass options after `bash -s --`:
+
+```bash
+curl -fsSL https://meghdadfadaee.github.io/shell-gleam/setup.sh | bash -s -- install --title ORBIT
+curl -fsSL https://meghdadfadaee.github.io/shell-gleam/setup.sh | bash -s -- install --wizard
+curl -fsSL https://meghdadfadaee.github.io/shell-gleam/setup.sh | bash -s -- install --dry-run
+```
+
+Prefer to inspect first? Download the generated script, read it, then execute:
+
+```bash
+curl -fsSLo shell-gleam-setup.sh https://meghdadfadaee.github.io/shell-gleam/setup.sh
+less shell-gleam-setup.sh
+bash shell-gleam-setup.sh install --wizard
+```
+
+For automation, enable `set -o pipefail` in your calling Bash shell to propagate
+curl failures through the pipeline. The checksum detects payload corruption or a
+script/package mismatch; it is not an independent signature of the publisher.
+
+## What you get
+
+- **A useful first glance:** uptime, CPU load, memory and disk bars.
+- **Runtime visibility:** configurable systemd services and local Docker state.
+- **Honest health checks:** failed units, cached update age, reboot and firmware notices.
+ Containers without healthchecks are never described as healthy.
+- **All login users:** optional PAM session display, independent rendering for concurrent logins.
+- **Your style:** JSON configuration, Unicode or ASCII, colors, sections and thresholds.
+- **Reversible setup:** original backups, rollback on handled errors, uninstall and reinstall support.
+- **Small footprint:** Python's standard library; no network requests during login.
+
+## Requirements
+
+Ubuntu/Debian with Python **3.9+**, systemd, GNU `timeout`, Debian `run-parts`,
+OpenSSH server and the standard `pam_motd`/`pam_exec` modules. SSH must already use
+`UsePAM yes` and `PrintMotd no`. Both `/etc/pam.d/sshd` and `/etc/pam.d/login`
+must have the normal dynamic MOTD entry. Preflight checks reject unsupported
+setups before making system changes. Other distributions are not supported yet.
+The bootstrap also needs Bash and curl; it does not install packages.
+
+## Install from source
+
+```bash
+git clone https://github.com/meghdadfadaee/shell-gleam.git
+cd shell-gleam
+sudo ./setup.sh install --wizard
+```
+
+Or copy this directory to the server. `./deploy.sh root@your-server` copies it
+to `/opt/shell-gleam` over SSH and installs it; set `SSH_CONFIG` if needed.
+
+## Make it yours
+
+```bash
+sudoedit /etc/server-status/config.json
+server-status --check
+sudo server-status --no-color
+```
+
+The repository is named `shell-gleam`; the installed preview command and settings
+path remain `server-status`. Configuration changes apply on the next login.
+See [all options and examples](docs/configuration.md).
+
+```json
+{
+ "title": "ORBIT",
+ "services": [{"unit": "nginx.service", "label": "Nginx", "required": true}],
+ "disks": ["/", "/srv"],
+ "docker": false,
+ "disk_warning": 70,
+ "disk_critical": 85,
+ "footer": "Welcome aboard."
+}
+```
+
+A supplied config overlays built-in defaults. Reinstalling without overrides
+preserves the server's existing config. Missing optional services are neutral;
+missing required services and unavailable probes raise ATTENTION.
+
+## Undo
+
+```bash
+sudo /opt/shell-gleam/setup.sh uninstall --dry-run
+sudo /opt/shell-gleam/setup.sh uninstall
+```
+
+If installed from a checkout, run `sudo ./setup.sh uninstall` there instead.
+Backups remain root-only in `/var/lib/server-status`. Uninstall restores original
+PAM display entries, stock hooks and static/dynamic messages. [Details and limitations](docs/operations.md).
+
+## Website and releases
+
+The [website](https://meghdadfadaee.github.io/shell-gleam/) provides an interactive
+dashboard preview, command builder and remote installer. GitHub Actions tests
+changes and publishes the site and a checksum-verified setup package from `main`.
+
+For release maintenance, custom domains and forks, see the
+[publishing guide](docs/publishing.md).
+
+## Development
+
+```bash
+python3 -m unittest discover -s tests -v
+python3 src/server_status.py --config config/default.json --no-color
+python3 scripts/build_site.py
+python3 -m http.server 8000 --directory _site
+```
+
+Open `http://localhost:8000`. The site has no package manager, framework,
+external fonts, trackers or third-party runtime assets. See [CONTRIBUTING.md](CONTRIBUTING.md).
+
+MIT licensed. Demo content uses fictional hostnames and documentation-only IP addresses.
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..e023905
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,13 @@
+# Security
+
+ShellGleam changes privileged login message-display configuration. Review the
+installer before running it. Its PAM entry is optional; authentication and
+authorization rules are not changed. Keep installed code and config root-owned.
+
+Do not include credentials, live hostnames or sensitive logs in public issues.
+For a vulnerability, use GitHub's **Security → Report a vulnerability** if private
+reporting is enabled. Otherwise, open a minimal issue requesting a private
+reporting channel without publishing exploit details or secrets.
+
+The bootstrap checksum detects corruption and script/package mismatch. It does
+not provide independent publisher authentication. No telemetry is collected.
diff --git a/VERSION b/VERSION
new file mode 100644
index 0000000..3eefcb9
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+1.0.0
diff --git a/config/default.json b/config/default.json
new file mode 100644
index 0000000..9ee07ac
--- /dev/null
+++ b/config/default.json
@@ -0,0 +1,23 @@
+{
+ "title": "",
+ "address": "auto",
+ "width": 72,
+ "color": true,
+ "ascii": false,
+ "sections": ["system", "runtime", "health"],
+ "services": [
+ {"unit": "nginx.service", "label": "Nginx", "required": false},
+ {"unit": "docker.service", "label": "Docker", "required": false}
+ ],
+ "disks": ["/"],
+ "docker": true,
+ "command_timeout": 1.0,
+ "memory_warning": 75,
+ "memory_critical": 90,
+ "disk_warning": 75,
+ "disk_critical": 90,
+ "load_warning": 0.7,
+ "load_critical": 1.0,
+ "updates_max_age_hours": 48,
+ "footer": ""
+}
diff --git a/deploy.sh b/deploy.sh
new file mode 100755
index 0000000..4a7dead
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+set -euo pipefail
+if [[ $# != 1 || $1 == -* ]]; then
+ echo "Usage: [SSH_CONFIG=path] $0 root@server" >&2
+ exit 2
+fi
+project_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+ssh_args=()
+if [[ -n ${SSH_CONFIG:-} ]]; then
+ ssh_args+=(-F "$SSH_CONFIG")
+fi
+tar -C "$project_dir" --exclude='__pycache__' -czf - setup.sh deploy.sh README.md src config tests docs reference |
+ ssh "${ssh_args[@]}" "$1" 'mkdir -p /opt/shell-gleam && tar -xzf - -C /opt/shell-gleam && cd /opt/shell-gleam && ./setup.sh install'
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 0000000..13f1126
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,54 @@
+# Configuration
+
+Live file: `/etc/server-status/config.json`. Validate with `server-status --check`;
+preview with `sudo server-status --no-color`. Changes appear on the next login.
+
+`config/default.json` lists every setting. For an alternate file use
+`sudo ./setup.sh install --config /absolute/path/config.json`. A supplied file
+overlays built-in defaults, rather than merging with existing settings. Unknown
+keys and invalid types are rejected before installation. `--wizard` prompts for
+a title, address, services and disks; remote wizard setup reads `/dev/tty`.
+
+| Key | Default / accepted values |
+| --- | --- |
+| `title` | Empty: automatic uppercase short hostname |
+| `address` | `auto`: first IPv4 from `hostname -I`; override for multiple interfaces |
+| `width` | `72`; integer 52–120, interior columns |
+| `color` | `true`; manual previews honor `NO_COLOR` |
+| `ascii` | `false`; use plain ASCII borders, bars and symbols |
+| `sections` | `["system", "runtime", "health"]`; reorder or omit |
+| `services` | Nginx and Docker, optional; up to 16 `{unit,label,required}` objects |
+| `disks` | `["/"]`; 1–8 absolute filesystem paths |
+| `docker` | `true`; query the local Unix socket if CLI is installed |
+| `command_timeout` | `1.0`; 0.1–2 seconds per concurrent subprocess |
+| `memory_warning`, `memory_critical` | `75`, `90` percent |
+| `disk_warning`, `disk_critical` | `75`, `90` percent |
+| `load_warning`, `load_critical` | `0.7`, `1.0` load per CPU |
+| `updates_max_age_hours` | `48`; age limit for Ubuntu update-notifier data |
+| `footer` | Empty; optional message |
+
+Resource thresholds, failed units, inactive installed services, required missing
+services, unknown/stale updates and unhealthy containers affect the summary.
+Checks still affect the summary when their display section is hidden.
+Missing optional services are neutral. A systemd active state is not an
+application readiness check; configure the actual unit for your workload.
+
+Example database configuration:
+
+```json
+{
+ "title": "DATABASE",
+ "services": [
+ {"unit": "postgresql.service", "label": "PostgreSQL", "required": true},
+ {"unit": "ssh.service", "label": "SSH", "required": true}
+ ],
+ "disks": ["/", "/var/lib/postgresql"],
+ "docker": false,
+ "disk_warning": 70,
+ "disk_critical": 85
+}
+```
+
+The PostgreSQL umbrella service may be active when a cluster is down; select
+its specific cluster unit if needed. Settings and rendered container names are
+visible to login users. Do not place secrets in the configuration.
diff --git a/docs/operations.md b/docs/operations.md
new file mode 100644
index 0000000..2f0ca3f
--- /dev/null
+++ b/docs/operations.md
@@ -0,0 +1,81 @@
+# Operations and implementation
+
+## System-wide login
+
+The installer writes a root-owned renderer at `/usr/local/bin/server-status`,
+JSON settings at `/etc/server-status/config.json` and a bounded shell wrapper at
+`/etc/update-motd.d/00-server-status`.
+
+It replaces only the dynamic MOTD session-display entry in `/etc/pam.d/sshd`
+and `/etc/pam.d/login` with optional `pam_exec.so stdout type=open_session`.
+Every session receives independent output, avoiding the shared dynamic MOTD
+cache race during concurrent logins. Authentication and authorization rules and
+SSH daemon settings are unchanged. The second static MOTD entry remains intact;
+`/etc/motd` is emptied with its original content backed up. No daemon restart is
+needed. SSH's normal `Last login` line remains.
+
+Standard executable MOTD scripts are renamed with `~server-status-disabled`.
+The installer checks `run-parts --lsbsysinit --test /etc/update-motd.d` to ensure
+only the managed hook remains selected. The tilde matters: ordinary run-parts
+and PAM's LSB mode accept different filenames. Renaming in place preserves
+relative symlinks and avoids changing a linked package-owned file's mode.
+
+## Bounded probes
+
+External probes run concurrently with configurable individual timeouts. The
+wrapper adds a six-second overall timeout and one-second kill grace period.
+It shows an unavailable notice on failure and returns success to PAM. Kernel
+uninterruptible I/O cannot be forcibly timed out by normal userspace tools.
+Python runs with `-I`, the command PATH is fixed, and text control characters
+are removed. Only root should be able to modify installed code and settings.
+
+Login does not access the network, run apt, or install dependencies. Package
+updates come from Ubuntu's existing update-notifier cache; missing or old data
+is unknown/stale. `/run/reboot-required` is an OS hint, not an independent audit.
+Docker queries the local socket regardless of caller Docker context; containers
+without healthchecks are not labeled healthy. A manual preview runs with the
+caller's permissions and may show Docker unavailable without sudo.
+
+## Backup, reinstall, uninstall
+
+Original content, mode, ownership and symlink targets are recorded once per path
+in `/var/lib/server-status/manifest.json`; the directory is root-only. Each
+operation also snapshots its current touched files for exception rollback.
+`flock` serializes installation changes; replacement writes are atomic per file.
+
+Reinstall preserves current settings unless overrides are supplied. It also
+disables new package MOTD hooks. After package upgrades, rerun setup if stock
+messages or PAM display entries reappear.
+
+Uninstall restores pre-install content, including both PAM files, and retains
+backups. Save later manual edits you want to keep before uninstalling. File
+replacement and exception rollback are not a multi-file power-loss transaction.
+After SIGKILL or power loss, inspect the newest backup folder and manifest before
+proceeding. VM snapshots provide a stronger recovery boundary.
+
+## Troubleshooting
+
+Check `server-status --check`, `sudo server-status`, `sudo sshd -T`, executable
+hook permissions and the two PAM session-display entries. User MOTD opt-outs,
+non-login shells, `su`/`sudo`, and SSH command/SFTP sessions do not necessarily
+show a login message. Noninteractive SSH command output should remain clean.
+
+Extra messages may come from `/etc/motd.d`, `/run/motd.d`, `/usr/lib/motd.d`, user
+shell files or SSH `Banner`; those sources are not removed. Fixed-width Unicode
+output depends on your terminal font. Select ASCII mode and a smaller width for
+limited terminals.
+
+## Remote bootstrap
+
+GitHub Pages serves a generated Bash bootstrap and a versioned archive whose
+SHA-256 is embedded in that script. Download and verification happen before
+sudo and installation. The extractor rejects links, traversal paths and large
+unexpected archives. The package is built from an explicit file allowlist;
+local dotfiles, deployment notes, credentials and arbitrary files cannot enter
+it by a recursive copy. Checksums detect mismatches and corruption, not a
+compromised publisher. The website makes no requests to visitors' servers.
+
+The verified source is retained in `/opt/shell-gleam` for future uninstall. Dry
+runs execute from the temporary package without copying it into `/opt`.
+Temporary downloads are removed on exit. For local integration tests only,
+`SHELL_GLEAM_BASE_URL=http://127.0.0.1:PORT` can point to a local build.
diff --git a/docs/publishing.md b/docs/publishing.md
new file mode 100644
index 0000000..a7da26a
--- /dev/null
+++ b/docs/publishing.md
@@ -0,0 +1,52 @@
+# Website and release maintenance
+
+ShellGleam is maintained in
+[`meghdadfadaee/shell-gleam`](https://github.com/meghdadfadaee/shell-gleam).
+
+- Website: `https://meghdadfadaee.github.io/shell-gleam/`
+- Bootstrap: `https://meghdadfadaee.github.io/shell-gleam/setup.sh`
+- License: MIT
+
+## GitHub Pages
+
+The **Pages** workflow tests the source, builds the static website and installer
+package, and deploys `_site` from `main`. Repository Settings → Pages must use
+**GitHub Actions** as the source. Run the workflow manually to redeploy the
+current version without a source change.
+
+Only the built `_site` directory is published. Do not enable branch publishing
+from the repository root, where `setup.sh` is the local source installer.
+
+## Build and inspect locally
+
+```bash
+python3 -m unittest discover -s tests -v
+python3 scripts/build_site.py
+python3 -m http.server 8000 --directory _site
+```
+
+The build creates a content-addressed payload, embedded-checksum bootstrap,
+`release.json` and a checksum list under `_site/downloads`. The payload uses an
+explicit source allowlist, normalized metadata and reproducible compression.
+Public demo data is fictional and uses documentation-only IP addresses.
+
+No live server deployment records or captured production outputs belong in
+this repository. Sanitize screenshots and examples before committing them.
+Use a GitHub no-reply commit email to keep your personal email private.
+
+## Releases
+
+Update `VERSION` and `CHANGELOG.md`, run tests, and push to `main` to redeploy.
+Previously downloaded bootstrap scripts refer to their exact package; after a
+later site deployment replaces that package, fetch a fresh bootstrap. A missing
+old package fails safely rather than silently installing another version.
+
+## Forks and custom domains
+
+For another account or repository, update links in the README and `site/`.
+The workflow passes its own account/repository URL to `scripts/build_site.py`.
+For a custom domain, change the workflow's `SITE_URL` and the website's
+`BASE_URL` in `site/app.js` together.
+
+The landing page has no external fonts, analytics, trackers or runtime assets.
+Its customization form only changes a local preview and generated command.
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
new file mode 100755
index 0000000..187b555
--- /dev/null
+++ b/scripts/bootstrap.sh
@@ -0,0 +1,98 @@
+#!/usr/bin/env bash
+# ShellGleam remote installer. Published by scripts/build_site.py.
+set -euo pipefail
+
+main() {
+ if [[ ${1:-} == --help || ${1:-} == -h ]]; then
+ cat <<'HELP'
+ShellGleam — a brighter first look at your Linux server.
+Usage: curl -fsSL https://meghdadfadaee.github.io/shell-gleam/setup.sh | bash -s -- [options]
+
+Setup options: install (default), uninstall, status, --dry-run, --wizard,
+ --title NAME, --address IP, --config FILE, --no-color, --ascii
+Downloads and verifies a versioned package before requesting sudo.
+Persistent project: /opt/shell-gleam. Live config: /etc/server-status/config.json.
+HELP
+ return
+ fi
+ local base_url=${SHELL_GLEAM_BASE_URL:-@@SITE_URL@@}
+ local expected='@@SHA256@@'
+ local artifact='@@ARCHIVE@@'
+ local work_dir
+ case "$base_url" in
+ https://*) ;;
+ http://127.0.0.1:*|http://localhost:*) ;;
+ *) echo 'ShellGleam: download URL must use HTTPS (loopback HTTP is allowed for local testing).' >&2; return 1 ;;
+ esac
+ for dependency in curl python3 bash; do
+ command -v "$dependency" >/dev/null || { echo "ShellGleam: install $dependency first." >&2; return 1; }
+ done
+ python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 9) else "ShellGleam requires Python 3.9+")'
+ work_dir=$(mktemp -d "${TMPDIR:-/tmp}/shell-gleam.XXXXXXXX")
+ shell_gleam_temp_dir=$work_dir
+ trap '[[ -z ${shell_gleam_temp_dir:-} ]] || rm -rf -- "$shell_gleam_temp_dir"' EXIT
+ echo 'ShellGleam: downloading the verified setup package…'
+ curl --fail --silent --show-error --location --retry 2 --connect-timeout 15 --max-time 120 \
+ --proto '=https,http' --proto-redir '=https' "$base_url/$artifact" -o "$work_dir/package.tar.gz"
+ python3 - "$work_dir/package.tar.gz" "$expected" "$work_dir" <<'PY'
+import hashlib
+from pathlib import Path, PurePosixPath
+import shutil
+import sys
+import tarfile
+archive, expected, directory = sys.argv[1:]
+if hashlib.sha256(Path(archive).read_bytes()).hexdigest() != expected:
+ sys.exit('ShellGleam: checksum mismatch; nothing installed.')
+root = Path(directory)
+with tarfile.open(archive, 'r:gz') as package:
+ members = package.getmembers()
+ if len(members) > 1000 or sum(m.size for m in members) > 20 * 1024 * 1024:
+ sys.exit('ShellGleam: unexpected package size.')
+ for member in members:
+ path = PurePosixPath(member.name)
+ if (path.is_absolute() or '..' in path.parts or not path.parts
+ or path.parts[0] != 'shell-gleam' or not (member.isfile() or member.isdir())):
+ sys.exit('ShellGleam: unsafe package member; nothing installed.')
+ for member in members:
+ target = root / member.name
+ if member.isdir():
+ target.mkdir(parents=True, exist_ok=True)
+ else:
+ target.parent.mkdir(parents=True, exist_ok=True)
+ with package.extractfile(member) as source, target.open('wb') as destination:
+ shutil.copyfileobj(source, destination)
+ target.chmod(0o755 if member.mode & 0o111 else 0o644)
+print('ShellGleam: SHA-256 verified.')
+PY
+ local dry_run=false wizard=false
+ for argument in "$@"; do
+ [[ $argument != --dry-run && $argument != status ]] || dry_run=true
+ [[ $argument != --wizard ]] || wizard=true
+ done
+ local -a elevation=()
+ if [[ $(id -u) != 0 ]]; then
+ command -v sudo >/dev/null || { echo 'ShellGleam: run as root or install sudo.' >&2; return 1; }
+ elevation=(sudo)
+ fi
+ # Absolute --config paths remain valid after changing the project directory.
+ # The argument array is forwarded unchanged; never evaluate user arguments.
+ if $wizard && ! { : /dev/null; then
+ echo 'ShellGleam: --wizard requires an interactive terminal.' >&2
+ return 1
+ fi
+ if $dry_run; then
+ if $wizard; then
+ "${elevation[@]}" bash "$work_dir/shell-gleam/setup.sh" "$@" (ascii ? '#' : '█').repeat(filled) + (ascii ? '-' : '░').repeat(18 - filled);
+ dashboard.replaceChildren();
+ add((ascii ? '+' : '╭') + horizontal.repeat(width) + (ascii ? '+' : '╮'), 'term-border');
+ const right = symbol.dot + ' ' + (warning ? 'ATTENTION' : 'HEALTHY');
+ const left = symbol.diamond + ' ' + Array.from(title.toUpperCase()).slice(0, 32).join('');
+ line(left + ' '.repeat(Math.max(2, width - 2 - Array.from(left).length - right.length)) + right, warning ? 'term-warning' : 'term-good');
+ line(' Ubuntu 24.04 LTS / 192.0.2.10', 'term-dim');
+ divider('SYSTEM'); line();
+ line(` ${symbol.up} Uptime 12d 4h ${ascii ? '~' : '≋'} Load average 0.24 (8 cores)`, 'term-title');
+ line(` Memory ${bar(4)} 23% / 3.7 / 16.0 GiB`, 'term-good');
+ line(` Disk / ${bar(warning ? 16 : 6)} ${warning ? '91%' : '34%'} / ${warning ? '182' : '68'} / 200 GiB`, warning ? 'term-warning' : 'term-good'); line();
+ divider('RUNTIME'); line();
+ line(` ${symbol.dot} Nginx is online`, 'term-good');
+ line(` ${symbol.dot} Docker is online`, 'term-good');
+ line(warning ? ' 4 running / 1 unhealthy / 0 failed' : ' 4 containers running / 4 healthchecked', warning ? 'term-warning' : 'term-good'); line();
+ divider('HEALTH'); line();
+ line(warning ? ` ${symbol.warn} 1 unit failed / worker.service` : ` ${symbol.tick} No failed systemd units`, warning ? 'term-warning' : 'term-good');
+ line(` ${symbol.tick} Packages current (cached)`, 'term-good');
+ line(` ${symbol.tick} No reboot needed`, 'term-good'); line();
+ add((ascii ? '+' : '╰') + horizontal.repeat(width) + (ascii ? '+' : '╯'), 'term-border');
+ commandNode.textContent = commandFor({ title, ascii, color, wizard });
+ statusNode.textContent = '';
+}
+form.addEventListener('input', render);
+form.addEventListener('submit', (event) => event.preventDefault());
+document.querySelectorAll('[data-state]').forEach(button => {
+ button.addEventListener('click', () => {
+ health = button.dataset.state;
+ document.querySelectorAll('[data-state]').forEach(item => {
+ const selected = item === button;
+ item.classList.toggle('selected', selected);
+ item.setAttribute('aria-pressed', String(selected));
+ });
+ render();
+ });
+});
+document.querySelector('#wizard-toggle').addEventListener('click', event => {
+ wizard = !wizard;
+ event.currentTarget.setAttribute('aria-pressed', String(wizard));
+ event.currentTarget.textContent = wizard ? 'Setup wizard included ✓' : 'Use the setup wizard →';
+ render();
+});
+document.querySelector('#copy-command').addEventListener('click', async () => {
+ try {
+ await navigator.clipboard.writeText(commandNode.textContent);
+ statusNode.textContent = 'Copied. Your next login is looking brighter.';
+ } catch {
+ const range = document.createRange();
+ range.selectNodeContents(commandNode);
+ const selection = window.getSelection();
+ selection.removeAllRanges(); selection.addRange(range);
+ statusNode.textContent = 'Command selected. Press Ctrl+C (or Cmd+C) to copy.';
+ }
+});
+render();
diff --git a/site/favicon.svg b/site/favicon.svg
new file mode 100644
index 0000000..d3fd2b0
--- /dev/null
+++ b/site/favicon.svg
@@ -0,0 +1 @@
+
diff --git a/site/index.html b/site/index.html
new file mode 100644
index 0000000..ef5e3f6
--- /dev/null
+++ b/site/index.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ ShellGleam — a brighter first look
+
+
+
+
+
+Skip to content
+
+ ShellGleam.
+
+
+
+
+
+
A SMALL UPGRADE TO YOUR EVERYDAY SSH
+
A better hello from your server.
+
All the signs of life, right when you log in. A beautiful little dashboard. A much better first glance.
01 Install once02 Every login user03 Your rules, your look04 Undo anytime
+
+
LESS DIGGING. MORE KNOWING.
The first ten commands, in one first glance.
+
Uptime. Memory. That container acting up. ShellGleam brings the useful bits together, so you can spend less time checking in and more time getting on with it.
+
+
+ 01 / SYSTEM
MEMORY 23%
LOAD 0.24 / 8
A pulse, not a puzzle.
Uptime, CPU load, memory and disks. Clear bars and adjustable thresholds tell you where things stand.
+ 02 / RUNTIME
nginx online docker 4 running
Know what’s running.
Pick the systemd services you care about. See local Docker state and actual healthcheck results.
+ 03 / HEALTH
✓Nothing to chase.NO REBOOT NEEDED
A little peace of mind.
Failed units, cached package updates and reboot notices. Unknown data stays unknown. No false confidence.
+
+
+
FEELS LIKE YOUR PLACE
Your server. Your kind of hello.
A name, a few preferences, and you’re home. Make it yours here, then copy your install command.
Add --wizard to choose a name, services and disks in your terminal.
↶
Easy come. Easy go.
Original login files are backed up. Restore them with one command.
sudo /opt/shell-gleam/setup.sh uninstall
+ The details before you install +
Supports Ubuntu/Debian with systemd, Python 3.9+, GNU timeout, Debian run-parts, OpenSSH and standard PAM MOTD/exec modules. Setup checks compatibility before making changes. Docker is optional.
Installation replaces two PAM message-display entries, backs up the originals, and leaves authentication rules and SSH daemon settings unchanged. Additional MOTD snippets may still appear. Checksum verification detects corruption and package mismatch; it is not an independent publisher signature.
Prefer to read before running? Download setup.sh and inspect it. For scripted pipelines, enable set -o pipefail to catch curl failures. Read the operations guide ↗