Repository navigation
2.0.0 (2026-10-26)
In 2.0 the CLI builds documentation portals on your machine, configures a project from a single src/apimatic.json, adds SDK and Context Plugin pages and code samples to a portal, and generates SDKs with the v4 generator.
Note
npm install -g @apimatic/cli now installs 2.0. A 1.x project needs the changes below before 2.0 can build it. To stay on 1.x for now, install @apimatic/cli@1, and in CI run npx @apimatic/cli@1: a pipeline that runs npx @apimatic/cli without a version gets 2.0 from now on.
Breaking changes
To move a 1.x project over, work through this list.
- Node.js 24 or newer is required. On an older Node the CLI stops at startup and names the version it found. (#347)
- Portals are built on your machine from
src/. OpenAPI documents go insrc/spec/, Markdown pages insrc/content/, and images and other files insrc/static/. Preview the portal withapimatic portal serveand build it withapimatic portal generate. (#343)src/apimatic.jsonconfigures the portal.APIMATIC-BUILD.jsonno longer does. A minimal file:{ "$schema": "https://cdn.jsdelivr.net/npm/@apimatic/cli@2/apimatic.schema.json", "schemaVersion": 1, "portal": { "site": { "name": "Acme API" } }, "languages": { "typescript": {} } }sitealso takesurlanddescription, and theportalblock takesbrand(logo, favicon, colours and colour mode),navigation(header links) andai(page actions). The$schemaline lets your editor complete and check the file. To see every key with its default, runapimatic quickstartin an empty directory. (#348, #355)languagesnames at least one SDK language:csharp,pythonortypescript.- Every page needs front matter with a
title, which names it in the sidebar. The CLI lists the pages that lack one before it builds.--- title: Getting started ---
- HTML and components work only in
.mdxpages. In a.mdpage, HTML tags such as<img>,<br>,<div>or<details>, and components such as 1.x's<CardGroup>or<AccordionGroup>, are left out of the built page, with no warning. Text on the same lines as a dropped tag goes with it; text separated from it by blank lines stays. Rename such a page to.mdx, close empty tags (<br />,<img … />), and use 2.0's components, for example<Cards>with<Card href="…">, and<Accordions>with<Accordion>. nav.jsonreplacestoc.yml. Anav.jsonbeside your pages lists them in order by file name, and itstitlenames their folder. Insrc/content/nav.json,tabsnames the tabs after Home, in order: a folder directly undersrc/content/, or a section the CLI makes (apimatic:api,apimatic:sdks,apimatic:plugin). Withouttabsthe portal has no tab bar. (#346, #371, #408){ "tabs": ["guides", "apimatic:sdks", "apimatic:api"], "pages": ["index", "..."] }- OAuth sign-in in the API playground returns to
/oauth/callbackon the portal's address. Register that redirect URI with your OAuth provider, for examplehttps://docs.example.com/oauth/callback. (#424) - Versioned portals are not supported. A project that builds several API versions from
versioned_docs/(generateVersionedPortalinAPIMATIC-BUILD.json) can't be built with 2.0, so keep it on@apimatic/cli@1. (#343)
src/apimatic.jsonreplacesplugin-config.json. Itspluginblock holds the plugin's identity.plugin-config.jsonis no longer read, so runplugin generateandsdk publishagain after upgrading, then delete it. (#348)- Some portal commands are removed.
portal toc new,portal recipe newandportal copilotare gone, andportal serveno longer takes--destinationor--no-reload. Runapimatic autocomplete --refresh-cacheto drop them from shell completion. (#343) - SDKs are generated with v4 only. (#359)
--codegen-versiononsdk generateandsdk publishaccepts onlyv4, which is now the default.- C#, Python and TypeScript can be generated today. Java, Ruby, PHP and Go come back as v4 supports them.
apimatic sdk save-changesis removed, along with--track-changesand--skip-changesonsdk generate.sdk publishno longer takes--update-plugin-config. Every publish records itself insrc/apimatic.json.
apimatic quickstartalways builds a portal. It no longer offers an SDK instead. Useapimatic sdk generatefor an SDK on its own. (#363)
Upgrading from a 2.0 beta
- Install with
npm install -g @apimatic/clifrom now on.@betainstalls the next 2.x prerelease once one is out. - Point
$schemainsrc/apimatic.jsonathttps://cdn.jsdelivr.net/npm/@apimatic/cli@2/apimatic.schema.json. The@betaaddress keeps following the newest prerelease. (#450) .apimatic-build/folders that earlier betas left besidesrc/are no longer used and can be deleted. (#440)- From beta.1 or beta.2, also follow the upgrade notes of 2.0.0-beta.3 and 2.0.0-beta.5. From beta.3 or beta.4, those of 2.0.0-beta.5.
Features
- api: flagless
api validateandquickstartavoids mutating adopted projects (#405) (abed462) - code samples support (#352) (7b82568)
- config: replace portal.json and plugin-config.json with apimatic.json (#348) (506f67f)
- local plugin generation (#358) (5ba70de)
- portal: a tabs key in the root nav.json (#408) (9fcf772)
- portal: build a portal from the spec folders APIMATIC-META.json merges (#435) (0faa568)
- portal: build the documentation portal locally with Fumadocs (#343) (073d09a)
- portal: build the SDK and Context Plugin pages from real templates and the portal artifacts (#369) (0efd7b3)
- portal: fetch the artifacts from /portal-artifacts (#361) (0e823f3)
- portal: generate the SDK and context plugin pages (#360) (338b14a)
- portal: give the portal block its v2 shape, with branding and tabs (#355) (d0fb189)
- portal: host a portal under the path of site.url (#411) (767671b)
- portal: lead each SDK card with its install command (#376) (119e9d6)
- portal: let content pages use Fumadocs' Tabs, Steps, Accordions and other components (#439) (633b81d)
- portal: let the root nav.json decide the tabs, and fix the nav.json QA findings (#371) (ecf7666)
- portal: one OAuth redirect URI for every endpoint page (#424) (876e66c)
- portal: order the sidebar from nav.json (#346) (306e4f9)
- portal: point to api transform when src/spec has no OpenAPI 3.x document (#364) (eefc917)
- portal: the SDK Overview design, on the SDKs, language and plugin pages (#391) (fd3fe34)
- quickstart: suggest validating with an AI agent when a spec fails (#385) (36fd2bb)
Fixes since 1.5.0
- Validation errors the server reports during
plugin generateprint as plain text rather than raw HTML. (#375) - The interactive
sdk publishasks "Do you want to proceed?" with No selected, so pressing Enter no longer starts a publish. (#375) api validateandapi transformgiven a--filethat does not exist or cannot be read say so, instead of ending with anENOENTerror. (#405)- When
sdk generateorplugin generatecannot unzip what it downloaded, orsdk generate --zipcannot write its zip, the command stops with a message and the reason, instead of an uncaught error. (#415) - The sign-in hint after a 401 gives the whole command,
apimatic auth login --auth-key={api-key}. (#425)