Getting started
Find code affected by supported API and SDK changes, then review a suggested fix.
Requirements
Section titled “Requirements”- Node.js 20 or later.
- A TypeScript or JavaScript repository.
- A supported manifest such as
package.json. - For exact version placement, a supported lockfile.
Emendant supports declared monorepo workspaces. Run it once from the repository root; each workspace is detected and reported separately.
Run your first scan
Section titled “Run your first scan”From the repository root:
npx emendant scanThe scan reports affected code without editing your files or running your project. It makes no network request unless you enable automatic feed updates.
Questions Emendant asks
Section titled “Questions Emendant asks”The first scan at a terminal asks one question: whether to download newer coverage automatically before a scan. The default is no. The report follows straight after.
emendant fix asks two more, each the first time it matters, and remembers your answers:
- Optional AI help: when a finding first needs a model, select a provider or press Return for none. Assisted fixes send a code excerpt to that provider. Local Codex and Claude Code options use your existing CLI login; API options can incur usage charges.
- Failed-patch contributions: when a patch first fails its checks, send package versions, error codes, and names from the SDK’s type declarations to help improve coverage. No source code or file paths are included. The default is yes when prompted; type
nto decline.
You can inspect contributions in .emendant/contribution.json and stop sending them with emendant feed contribute --disable. See the privacy notice for the full details.
CI, piped commands, and --json skip these questions. A machine that has not been asked uses none of these optional services.
For Azure, authentication, and saved settings, see the configuration reference.
Read the result
Section titled “Read the result”A finding looks broadly like this:
openai declared 4.104.0 → 5.0.0 1 change affects this repository ────────────────────────────────────────────────────────────────
× breaking fileFromPath helper removed filefrompath-removed assisted fix src/upload.ts:2:10 2 │ import { fileFromPath } from 'openai/uploads'; │ ^
src/upload.ts:4:59 4 │ export const attach = (path: string): Promise<unknown> => fileFromPath(path); │ ^
1 finding · 2 call sites in 1 file→ emendant explain openai-npm-5.0.0-filefrompath-removed the sources and the migration guidanceEach finding shows the affected file and line, the SDK release, and whether a fix is automatic or needs a model. Use explain to read the migration guidance and sources:
npx emendant explain openai-npm-5.0.0-filefrompath-removedExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
The scan completed with no findings. |
1 |
The scan completed and found affected code. |
2 |
Emendant could not complete the scan. |
Exit code 1 is a result, not a crash. This distinction matters when you run Emendant in CI.