# Add Dependabot to an Obsidian Plugin

Yes. An agent adds dependabot.yml to your Obsidian plugin for npm and GitHub Actions, groups the lint tooling, makes the obsidian typings updatable and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-dependabot/obsidian-plugin/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

In a plugin started from obsidianmd/obsidian-sample-plugin, the agent reads `package.json` first: ten devDependencies and no runtime dependency, because Obsidian supplies the API at run time and `esbuild.config.mjs` marks `obsidian`, `electron` and the CodeMirror packages as external. `obsidian` is declared as `latest` while `package-lock.json` (lockfile version 3) resolves it to 1.12.3; `esbuild` is pinned exactly to `0.25.5`; `typescript`, `eslint`, `typescript-eslint`, `eslint-plugin-obsidianmd`, `@eslint/js`, `globals`, `jiti` and `@types/node` carry caret ranges. `.github/workflows/lint.yml` runs `npm ci`, `npm run build` and `npm run lint` on Node 20, 22 and 24 for every push and pull request, and `release.yml` runs only on a pushed tag: it builds, attests `main.js` with `actions/attest@v4` and creates a draft release with `gh release create`. Both use `actions/checkout@v6` and `actions/setup-node@v6`. There is no `.github/dependabot.yml`.

The agent writes `.github/dependabot.yml` with two `updates` entries. The `npm` entry at `directory: /` runs weekly on a day and time the pull request names, with two `groups`: `lint` matching `eslint`, `@eslint/*`, `typescript-eslint`, `eslint-plugin-obsidianmd`, `globals` and `jiti`, and `build` matching `esbuild`, `typescript` and `@types/node`, so a week of tooling releases arrives as two pull requests instead of nine. `obsidian` is left out of both groups on purpose: that package is type declarations only, and a bump that exposes new API is the moment to raise `minAppVersion` in `manifest.json`, which `version-bump.mjs` then copies into `versions.json` on the next `npm version`. The exact `esbuild` pin stays a pin; Dependabot rewrites it to the new exact version rather than widening it.

`latest` is the one line Dependabot cannot work with, since a dist-tag is not a version range it can compare, so the agent replaces it with `^1.12.3`, the version the lockfile already resolves. Nothing installed changes; the lockfile's root entry gains the same range. While reading the lockfile it also sees that `eslint-plugin-obsidianmd` 0.4.0 declares a peer dependency on `obsidian` 1.8.7 exactly, narrower than the 1.12.3 that is installed, and says so in the pull request so a reviewer knows a bump of either package may need the other. The `github-actions` entry, also at `directory: /` and weekly, groups `actions/*` into one pull request; the description points out that a bump to `actions/attest` or `actions/setup-node` in `release.yml` is only exercised by the next tag, because that workflow never runs on a pull request.

Before opening the pull request the agent checks the file against the Dependabot v2 schema from SchemaStore, then runs `npm ci`, `npm run build` (`tsc -noEmit -skipLibCheck` followed by the esbuild production build) and `npm run lint` on Node 24 to show the changed `obsidian` range installs and compiles exactly as before. It reads `AGENTS.md`, which fixes npm and esbuild as this template's tooling, and leaves `eslint.config.mts`, whose global ignores already cover `package.json` and `package-lock.json`, untouched. The description lists every group with its members and the reason for each, the schedule, the one-line change to `package.json`, and the peer-dependency note.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add Dependabot to this Obsidian plugin. Read package.json, package-lock.json, manifest.json, versions.json, version-bump.mjs, esbuild.config.mjs, AGENTS.md and every workflow under .github/workflows first. Write .github/dependabot.yml with a weekly npm entry that groups the ESLint tooling and the build tooling separately and leaves the obsidian typings ungrouped, and a weekly github-actions entry that groups all actions. If obsidian is declared as a dist-tag instead of a range, change it to a caret range on the version the lockfile already resolves, and say in the pull request why. Note any peer dependency on obsidian that is narrower than the installed version. Validate the file against the Dependabot v2 schema, run npm ci, npm run build and npm run lint, and open a pull request that explains each group and the schedule.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

The pull request adds `.github/dependabot.yml` and changes one line of `package.json` and the matching line of `package-lock.json`. Its description shows the two `updates` entries, names the members of the `lint`, `build` and `actions` groups with the reason for each, states the day and time Dependabot will run, and quotes the peer-dependency range from the lockfile.

The `Node.js build` workflow runs on the pull request on Node 20, 22 and 24, so a reviewer sees that `npm ci` accepts the new `obsidian` range and that the build and lint pass. The run's record keeps the schema check and the three command outputs.

Before merging, a reviewer decides whether Dependabot may touch `obsidian` at all, since some authors keep the typings at the version their `minAppVersion` matches, and adjusts the schedule, the labels or `open-pull-requests-limit`. `manifest.json`, `versions.json` and the release workflow are unchanged.

## Run it on every plugin repository without Dependabot

An author with several plugins, or a team that forked the sample plugin more than once, sends this body to `POST /o/{org}/sessions` once per repository, each with its own repository in `resources` and a `request_id` that is a UUID v5 of the repository's full name, so a retried call returns the run already started rather than opening a second pull request. Each run reads its own `package.json`: a plugin that already pins `obsidian` to a range keeps it, one that bundles a runtime dependency gets a `dependencies` group of its own, and one with no `release.yml` gets no note about tag-only workflows.

Once the file is merged Dependabot does the weekly work and no further run is needed for it. For the pull requests it opens, an automation on the Project with a `schedule` trigger set to the morning after Dependabot's day and the prompt "for each open pull request from Dependabot, check out its branch, run npm ci, npm run build and npm run lint, and comment on it with the result" turns the week's updates into a short list of what is safe to merge. The key's `webhook_url` reports the runs the key starts; an automation run has its own `max_runs_per_hour` cap.

## Why run it on Rush?

A Dependabot file is thirty lines, but the choices in it come from the repository: which packages belong together, which one must stay separate because a bump has consequences in `manifest.json`, which declaration Dependabot cannot update, and which workflow never runs on a pull request. The agent reads all of that in its own sandbox and shows the build and lint passing with the one change it had to make.

The schema check, the lockfile reading and the three command outputs stay with the run and are quoted in the pull request. An author with a handful of plugins gets one pull request per repository, each fitted to that repository's files.

## Frequently asked questions

### Why change obsidian from latest to a caret range?

Because Dependabot compares versions, and `latest` is a dist-tag, not a version. With `^1.12.3` in `package.json` and the same version in the lockfile, nothing changes on install, and Dependabot can open a pull request when 1.13 is published. The pull request says so, and a reviewer who prefers to track the typings by hand can drop that hunk.

### Why is obsidian not in a group?

The `obsidian` package is type declarations for the app's API. A bump by itself changes no behaviour, but code written against new declarations needs a matching `minAppVersion`, which `version-bump.mjs` writes into `versions.json`. Keeping that bump in its own pull request keeps the question visible instead of buried among ESLint updates.

### Will Dependabot's pull requests run the build?

Yes. `lint.yml` runs on every pull request on three Node versions, so each Dependabot pull request shows `npm ci`, `npm run build` and `npm run lint` passing or failing. The release workflow is the exception: it runs on tags only, so an update to `actions/attest` is first exercised by the next release.

### What about the peer dependency on obsidian 1.8.7?

The lockfile records that `eslint-plugin-obsidianmd` 0.4.0 wants `obsidian` 1.8.7 exactly while 1.12.3 is installed. The agent changes nothing about it, because the lockfile already installs that way, but the pull request quotes it so a reviewer is not surprised when a Dependabot pull request for one of the two packages needs the other bumped as well.

## More Obsidian plugin jobs

- [Add a CodeMirror Editor Extension to an Obsidian Plugin](https://getrush.ai/run/add-editor-extension/obsidian-plugin/)
- [Add Autocomplete Suggestions to an Obsidian Plugin](https://getrush.ai/run/add-editor-suggest/obsidian-plugin/)
- [Add i18n to an Obsidian Plugin](https://getrush.ai/run/add-i18n/obsidian-plugin/)

## The same job on other stacks

- [Add Dependabot to a Poetry Project](https://getrush.ai/run/add-dependabot/poetry/)
- [Add Dependabot to a Reflex App](https://getrush.ai/run/add-dependabot/reflex/)
- [Add Dependabot to a Rust CLI](https://getrush.ai/run/add-dependabot/rust-cli/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
