Knotbind documentationOpen dashboard
Mend

Keep your code in step with the APIs it calls.

Mend watches the APIs your TypeScript code calls and opens draft pull requests when a change would break it. On every plan. It never writes to your default branch.

Two ways to try it

WayWhat you doWhat you see
The demoOpen www.knotbind.com/demo, enter your email (a Slack webhook is optional) and open the link Knotbind emails you. Press the Mend button.A made-up provider, Acme, removes a field. Mend shows the lines of a small sample app that used it, the fix, and a real draft pull request on a public sample repository. It stays open for 24 hours.
Your own repoOn any plan, connect GitHub, pick a repo and tick the APIs it calls. Free includes one repo, Pro up to five, Business up to twenty.When one of those APIs changes in a way that breaks your code, a draft pull request with the fix, or an issue when Mend is not sure.

Which APIs Mend watches

Mend needs an API's published description (its OpenAPI file) to know what changed. Today it watches the GitHub REST API and the OpenAI API, read every hour. An API company can also register and send its own description (see For API providers below).

Acme, used in the demo, is not a real company. It exists only so the demo has something to break.

Connect a repo

  1. Open Mend, Repos as the workspace Owner and choose Connect GitHub. GitHub asks which repos to share with the Knotbind Mend app.
  2. Pick a repo. Suggest APIs reads its package.json for official SDKs (openai, octokit) and ticks the matching APIs. Check them against what the code calls, then add the repo.
  3. Mend assumes your code matches each API's current version and acts on later changes. Free includes 1 repo, Pro up to 5 and Business up to 20.

What Mend does when an API changes

StepWhat happens
TrackMend reads each API's published description on a schedule and compares versions field by field.
DetectIt finds the files and lines in your repo that use what changed: the call, the type, every read of the field.
ExplainEach change gets a plain explanation and a severity (low, medium, high, critical) from fixed rules. A model may only write the wording and raise severity by one level.
FixA removed field the provider says was renamed is renamed in your code. Anything else is listed under Needs a person.
VerifyYour repo's own install, build and test scripts run on the patched code in a throwaway container. Install has network access with dependency scripts off. Build and tests have no network.
OpenA draft pull request on a knotbind/mend/ branch, with the diff, severity, confidence and the test result.

Pull request or issue

Every fix has a confidence from 0 to 100%. A pull request opens only when your tests pass and confidence is at least 70%. Otherwise Mend opens an issue that says why and shows the patch. Comment /mend open-pr on the issue, or use the button in the dashboard, and Mend opens it as a draft with the reason on it. You need write access to the repo.

New fields

When an API adds a response field, Mend can declare it as an optional property on the type your repo already uses for that response. It is off by default. Turn on New fields for a repo in the dashboard, or set adopt: true in .knotbind.yml. These pull requests are separate from fixes, on their own branch, and cannot break existing code.

Opt out

ToDo this
Pause a repoPause in the dashboard, or enabled: false in .knotbind.yml.
Skip one changeDismiss it in Changes, or list it under ignore in .knotbind.yml.
Dismiss a pull requestClose it. Mend will not reopen those changes.
Undo a mergeThe fix is one commit: git revert the merge commit.
Stop completelyRemove the repo, or uninstall the app on GitHub.
$
mend:
  enabled: true
  adopt: false
  ignore:
    - openai          # every change from a provider
    - openai:system   # one field
    - github:GET /repos/{owner}/{repo}   # one operation

A .knotbind.yml that cannot be read stops Mend for the repo until it is fixed.

What Mend reads and sends

  • It reads only TypeScript source files and package.json. It does not parse or read environment files.
  • Access to your repo uses a short-lived token that GitHub issues to the app for the repos you chose. Nothing is stored.
  • No file name, path or code is sent to a language model. Only the provider's side of a change is.
  • Every detection, patch, test run, pull request and issue is written to your Audit Record.

Providers

Mend tracks the GitHub REST API and the OpenAI API. Calls are matched by URL (fetch, axios-style, { url }) and by the official SDK's method names (openai, octokit, @octokit/rest), in files that import the SDK. Other languages and Git hosts are not supported yet.

For API providers

A provider can register with Knotbind and push its API description and migration notes when it ships a version, so its customers get fix pull requests the same day. Contact us to register. You get a key; it is shown once.

$
curl -X POST https://www.knotbind.com/mend/provider/versions \
  -H "authorization: Bearer $KNOTBIND_PROVIDER_KEY" \
  -H "content-type: application/json" \
  -d '{"version":"2.0.0","openapi":{...},"notes":[{"field":"phone","replacedBy":"phone_number","message":"Use phone_number."}]}'

openapi is an OpenAPI 3 object, or JSON or YAML text. A note names a removed response field and optionally the field that replaces it. The replacement counts only if it exists in the new description with the same type. Up to 30 versions an hour.

$
curl https://www.knotbind.com/mend/provider/adoption \
  -H "authorization: Bearer $KNOTBIND_PROVIDER_KEY"

Adoption is counts only: repos tracking your API and pull requests opened, merged and closed per version. A number is shown only when at least 5 repos stand behind it. You never see a workspace, a repo name, a file or any code.

See Mend Open Mend