# Lockfile → Watchlist Transformer (`collinjreynolds/lockfile-to-watchlist-transformer`) Actor

Parse-only transform of Brewfile, package.json, requirements.txt, or Cargo.toml into watchlist rows mapped to Collin delta monitors (Homebrew / npm) or suggested PyPI/crates destinations. PPE event: watchlist-row. Stateless — no LAST\_SEEN.

- **URL**: https://apify.com/collinjreynolds/lockfile-to-watchlist-transformer.md
- **Developed by:** [Collin Reynolds](https://apify.com/collinjreynolds) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 watchlist rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Lockfile → Watchlist Transformer

Parse a **Brewfile**, **package.json**, **requirements.txt**, or **Cargo.toml** into normalized **watchlist rows** ready to feed Collin’s live delta monitors (Homebrew / npm) — or carry a clear PyPI / crates suggestion when no live Actor exists yet.

**Status:** Publishing under standing auth (B). Hygiene complete (real `exampleRunInput` / `INPUT.example.json`, schemas avoid reserved dataset fields `title`/`description`, tests green).

**Pricing (pay per event — document now, Console later):**

| Event | Suggested price | Notes |
|-------|-----------------|-------|
| `watchlist-row` (primary) | **`$0.001`** per emitted row | Stateless transform; charge per useful row |
| Actor start | platform small event (~`$0.00005`) | — |

No LAST\_SEEN baseline — every successful parse emits rows (PPE-friendly for agent/MCP one-shots).

### Why this exists

- Agents / n8n / MCP runners already have lockfiles, not curated Store inputs
- Upsells owned inventory: `suggestedActor` points at live `collinjreynolds/*-delta-monitor` names
- Pure local parse = ToS-safe, $0 infra, standby/MCP friendly

### Input

| Field | Required | Description |
|-------|----------|-------------|
| `lockfileText` | yes | Raw Brewfile / package.json / requirements.txt / Cargo.toml text |
| `format` | yes | `brewfile` | `package-json` | `requirements-txt` | `cargo-toml` |
| `targetActor` | no | Optional filter/hint (e.g. `collinjreynolds/homebrew-version-delta-monitor`) |
| `includeDevDependencies` | no | Include dev/optional/peer / Cargo dev+build deps (default **true**) |

#### Example / exampleRunInput (Brewfile — not helloWorld)

Canonical publish-day input: [`INPUT.example.json`](./INPUT.example.json) (= `.actor/example_run_input.json`).

```json
{
  "lockfileText": "brew \"wget\"\nbrew \"git\"\nbrew \"jq\"\ncask \"iterm2\"\ncask \"visual-studio-code\"\n",
  "format": "brewfile",
  "includeDevDependencies": true
}
```

#### Example (package.json)

```json
{
  "lockfileText": "{\"dependencies\":{\"lodash\":\"^4.17.21\",\"axios\":\"^1.7.0\"}}",
  "format": "package-json",
  "includeDevDependencies": true
}
```

### Output

Each dataset item:

| Field | Meaning |
|-------|---------|
| `ecosystem` | `homebrew` | `npm` | `pypi` | `crates` |
| `name` | Package / formula / cask / crate |
| `kind` | e.g. `formula`, `cask`, `dependency`, `devDependency`, `requirement`, `crate` |
| `constraint` | Version pin/range from the file when present |
| `suggestedActor` | Live Store name or “not live yet” note |
| `suggestedInput` | Sibling-shaped fragment (`formulae` / `casks` / `packages` / `crates`) |
| `note` | Extra guidance for PyPI/crates |
| `source_format` | Echo of input `format` |

#### suggestedActor map (accurate as of scaffold)

| Ecosystem | suggestedActor |
|-----------|----------------|
| Homebrew formulae/casks | `collinjreynolds/homebrew-version-delta-monitor` (**LIVE**) |
| npm packages | `collinjreynolds/npm-package-version-delta-monitor` (**LIVE**) |
| PyPI requirements | `pypi-package-version-delta-monitor (Store-ready local scaffold; not published under collinjreynolds yet)` |
| crates.io | `crates-io-version-delta-monitor (Store-ready local scaffold; not published under collinjreynolds yet)` |

Related live portfolio (not auto-mapped from these lockfiles):\
`github-releases-delta-monitor`, `docker-hub-tag-digest-delta-monitor`, `gitlab-releases-delta-monitor`.

`suggestedInput` shapes match sibling inputs, e.g.:

- Homebrew formula → `{ "formulae": ["wget"] }`
- Homebrew cask → `{ "casks": ["iterm2"] }`
- npm → `{ "packages": ["lodash"] }`

A KV `TRANSFORM_SUMMARY` also stores an **aggregated** sibling input blob for the whole run.

### Local development

```bash
cd /workspace/revenue-ops/apify-actors/lockfile-to-watchlist-transformer
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt pytest
pytest -q
python scripts/run_offline_demo.py
```

### ToS / scope

Parse-only. Never executes installs. No third-party fetches in v1. See [AGREEMENT.md](./AGREEMENT.md).

### Store / Console

- Publish checklist: `exampleRunInput` = Brewfile text (not helloWorld); PPE `watchlist-row` $0.001; LIMITED\_PERMISSIONS; categories DEVELOPER\_TOOLS/AI; memory 512; timeout 300.

# Actor input Schema

## `lockfileText` (type: `string`):

Raw contents of a Brewfile, package.json, requirements.txt, or Cargo.toml. Parsed locally only — never executed.

## `format` (type: `string`):

Which parser to use for lockfileText.

## `targetActor` (type: `string`):

Optional Store name filter/hint (e.g. collinjreynolds/homebrew-version-delta-monitor). When set, only rows whose suggestedActor matches (or whose ecosystem maps to it) are emitted; suggestedInput still shaped for that Actor.

## `includeDevDependencies` (type: `boolean`):

For package.json / Cargo.toml / requirements extras: include devDependencies, optionalDependencies, peerDependencies, and \[dev-dependencies]. Default true.

## Actor input object example

```json
{
  "lockfileText": "brew \"wget\"\nbrew \"git\"\nbrew \"jq\"\ncask \"iterm2\"\ncask \"visual-studio-code\"\n",
  "format": "brewfile",
  "includeDevDependencies": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items ready to feed Homebrew / npm delta monitors (or PyPI/crates notes).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "lockfileText": `brew "wget"
brew "git"
brew "jq"
cask "iterm2"
cask "visual-studio-code"`
};

// Run the Actor and wait for it to finish
const run = await client.actor("collinjreynolds/lockfile-to-watchlist-transformer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "lockfileText": """brew \"wget\"
brew \"git\"
brew \"jq\"
cask \"iterm2\"
cask \"visual-studio-code\"
""" }

# Run the Actor and wait for it to finish
run = client.actor("collinjreynolds/lockfile-to-watchlist-transformer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "lockfileText": "brew \\"wget\\"\\nbrew \\"git\\"\\nbrew \\"jq\\"\\ncask \\"iterm2\\"\\ncask \\"visual-studio-code\\"\\n"
}' |
apify call collinjreynolds/lockfile-to-watchlist-transformer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,collinjreynolds/lockfile-to-watchlist-transformer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Zg5gvMW3acMQVFEeS/builds/0ZPvvlc106YBmB3Mk/openapi.json
