---
title: "Operations scripts for alerts, host checks, and personal exports"
description: "Five operator scripts provide Telegram alerts, Linux host checks, macOS Messages reads, X bookmark imports, and an X posting queue. Read the source."
canonical: "https://scalewithsearch.com/code/ops-scripts"
date: "2026-10-06"
---
# Operations scripts for alerts, host checks, and personal exports.

Five operator scripts provide Telegram alerts, Linux host checks, macOS Messages reads, X bookmark imports, and an X posting queue.

[Source repository](https://github.com/b2bvic/ops-scripts)

## Team workflow

Run synthetic tests before selecting credentials, destinations, or private data sources. Inspect complete post text before publishing. Protect exported conversations, bookmark records, and logs that contain caller messages or API responses.

## Quick start

Use Python 3.11 or later and Bash. Host checks require Linux and systemd. Personal-data readers require macOS permissions.

```sh
gh repo clone b2bvic/ops-scripts
cd ops-scripts
python3 -m venv .venv
.venv/bin/python -m pip install -r components/tg-notify/requirements-dev.txt
.venv/bin/python -m pip install -r components/twitter-bookmarks/requirements-dev.txt
.venv/bin/python components/twitter-bookmarks/twitter-bookmarks --help
```

Activate the virtual environment before running shell scripts. Component tests do not read your Messages database or browser cookies and do not publish posts.

## How it works

You run each component from its imported folder. Shell scripts use python3 and curl from your PATH. You supply scheduling and configuration. The component tests use temporary records and mocked calls. You get no root test runner or root CI workflow.

## Components

Select a component to inspect its purpose, example, and limits:

- [tg-notify](#tg-notify)
- [watchdog](#watchdog)
- [imessage-pull](#imessage-pull)
- [twitter-bookmarks](#twitter-bookmarks)
- [social-poster](#social-poster)

Start each component example from the cloned repository root. Use a fresh shell for each example.

Each Python example creates a component virtual environment and installs its documented development dependencies.

### tg-notify

You send Telegram bot messages with tg-notify. You JSON-encode the message and retry without a parse mode after an API rejection. Supply the intended chat identifier and bot token only when you intend to send. The example runs synthetic tests without sending messages.

```sh
cd components/tg-notify
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python -m pytest -q
```

**Limits**

- Invocation sends a live message when credentials are available.
- A retry does not guarantee delivery.
- Logs can contain message text and API response details.

### watchdog

You check configured user-systemd timers, failed services, and root disk usage with watchdog. You can also configure Syncthing peer checks and a Claude authentication probe. A host run sends Telegram alerts for detected issues and writes local state. Start with mocked tests before configuring credentials.

```sh
cd components/watchdog
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python -m pytest -q
```

**Limits**

- Host checks require Linux and systemd. Runs can send Telegram alerts and write local state and logs.
- The optional authentication probe runs `claude -p` and can use account capacity. Error-text matching does not prove complete service health.
- Configure timers with WATCHDOG_TIMERS. The documented legacy --config argument is not implemented.

### imessage-pull

You read recent conversations from the local macOS Messages SQLite database with imessage-pull. You bind a contact-identifier substring and a positive message count. You print timestamps and message bodies with heuristic attributed-body recovery. The example uses synthetic records instead of your Messages database.

```sh
cd components/imessage-pull
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python -m pytest -q
```

**Limits**

- The terminal needs macOS permission to read the Messages database. Output can contain private conversations.
- Contact matching uses a literal substring rather than a resolved contact identity.
- Attributed-body recovery can omit text or return attachment placeholders.

### twitter-bookmarks

You import saved X posts into classified Markdown with twitter-bookmarks. Capture reads configured Chrome cookies and a Keychain key. The script fetches bookmarks and tracks seen IDs in `~/.cache/twitter-bookmarks/seen_ids.json`. Markdown records and an index go under `BOOKMARKS_OUTPUT`. Use `--notify` to POST new records to `BOOKMARK_WEBHOOK_URL`. Inspect options before supplying credentials. The example displays help without importing your bookmarks.

```sh
cd components/twitter-bookmarks
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python twitter-bookmarks --help
.venv/bin/python -m pytest -q
```

**Limits**

- Capture reads Chrome cookies and a Keychain key. It depends on macOS access and an unstable web API.
- Dry-run still authenticates and fetches bookmarks.
- Classification uses keyword scores. Protect output files, cached seen IDs, and credentials separately.

### social-poster

You inspect eligible X queue items with social-poster, then publish posts or threads through separate commands. You can preview five lines with blitz-poster --dry-run. Read the complete content file before publishing. The example uses synthetic tests without reading your live queue or posting to X.

```sh
cd components/social-poster
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python -m pytest -q
```

**Limits**

- Direct posting has no preview mode and performs live API writes.
- Review the complete text before execution; the queue preview shows only five lines.
- Queue rewrites are not transactional, and duplicate section identities can share status updates.

## Limits

Authorize live alerts, webhook calls, and publishing where they execute. Bookmark dry-run reads credentials and fetches records; message-reader output contains private text. Review repository history before sharing earlier credential, email, and hostname findings.

## Model assistance

The root README discloses Codex assistance for its text. Component disclosures cover their README refit without attributing the underlying code. Review the code and tests to assess each tool.

## Related repositories

- [owned-record](/code/owned-record)
- [seo-checks](/code/seo-checks)
- [declip](/code/declip)

[Discuss a scoped build](/work).
