Look for
@experimental in TypeScript, an Experimental badge or callout in the docs, and (experimental) in CLI help. The first time a CLI run uses an experimental API, it emits a notice on stderr in text mode or an experimental event on the JSONL event stream.
Stable in 2.0
- Workflow APIs:
step,fail,StepError,WorkflowFailure,WorkflowContextand parameters,forEachFileand its reducer,astGrep(fromcodemod/ast-grep),approvaland question IDs,shell, and nestedcodemod(). - Target file access:
codemod/files(read,exists,list, andcreate) in workflow callbacks and JSSG transforms. - JSSG:
codemod/ast-grepparsing,SgRootandSgNode(apart from the semantic APIs), andcodemod/runtimehelpers. - CLI:
run,workflow run/resume/status/list/cancel/validate/upgrade,resume --approve/--rerun-step/--skip-step,jssg run/test,publish,search,login/logout/whoami,telemetry on/off/status, andinit --no-interactivefor workflow packages. - Automation:
--control stdio, thecodemod/protocolv1 JSONL protocol,statusandlistwith--format json, and exit codes0,1,2, and3, includingfail({ exitCode }). - Compatibility: YAML
shardbehavior,install-skillsteps inworkflow.yaml(workflow.ts has no equivalent), and on-the-fly upgrades when running 1.x packages. The TypeScript emitted by the translator is not a stable API.
Experimental in 2.0
- Workflow APIs:
http(),sleep,waitForEvent, and the TypeScriptshard(...)signature. - Semantic APIs:
definition()andreferences(). - Package APIs:
codemod/ai(agent, andaskwith its question builders),codemod/llm,codemod/deps,codemod/git,codemod/testing,codemod/host,codemod/vite, andcodemod/register. - CLI:
workflow attach,inspect(including its JSON output),send,ai,mcp, package skills,--managed-git, and the launcher.
1.x compatibility
These APIs exist so code written for codemod 1.x keeps running. They are not part of the 2.0 API: don’t use them in new code. They keep working in 2.x for the code they were made for, and get no new features.codemod/compat(jssgFileandjssgWouldChange), whichcodemod workflow upgradewrites for transforms a plain callback cannot call.jssgTransform, inside a 1.x jssg transform only: undercodemod jssg run, in aworkflow.yamljs-ast-grepstep, or in a transform called withjssgFile. Elsewhere in a workflow it throws. Its type is declared bycodemod/compat.
Internal
Translation helpers (apart fromcodemod/compat) and the layout of run-store files are internal. Codemod can read its run store across releases in the same major version; use the CLI and its JSON output rather than reading the files directly.