Skip to main content

Migrate from liblab CLI to Postman CLI

This guide walks you through migrating your SDK generation workflow from the liblab CLI to the Postman CLI. The SDK generation capabilities you relied on in liblab are now built into the Postman platform — the core config format, supported languages, and customization options remain the same.

Table of Contents

  1. Installation
  2. Authentication
  3. Configuration Migration
  4. Command Migration
  5. CI/CD Pipeline Migration
  6. What Has Changed

Installation

Uninstall the liblab CLI and install the Postman CLI in its place.

# Remove liblab
npm uninstall -g liblab

# Install Postman CLI
npm install -g postman-cli

Verify the installation:

postman --version

Authentication

Interactive login

liblab CLIPostman CLI
liblab loginpostman login
liblab logoutpostman logout

The liblab CLI used an Auth0 device-flow browser login. The Postman CLI authenticates using your Postman API key. Run postman login and follow the prompts, or set the POSTMAN_API_KEY environment variable directly.

Long-lived tokens for CI/CD

In liblab, you created dedicated CI tokens with liblab token create. In Postman, you use a Postman API key generated from your Postman account settings.

liblab CLIPostman CLI
export LIBLAB_TOKEN=<token>export POSTMAN_API_KEY=<key>
liblab token create <name>Generate a key in Postman account settings
liblab token listView keys in Postman account settings
liblab token revoke <name>Revoke keys in Postman account settings

Configuration Migration

File location

The biggest structural change is where the SDK configuration lives.

liblab CLIPostman CLI
Fileliblab.config.json (repo root).postman/config.json
Config locationTop-level objectUnder the sdk key

The postman sdk init command scaffolds the new file for you:

postman sdk init

This creates .postman/config.json with a skeleton sdk key that you can populate from your existing liblab.config.json.

Backward compatibility

The Postman CLI will silently fall back to liblab.config.json in the current directory if .postman/config.json is absent. This means your existing repos will continue to work during the migration window without any changes. However, we recommend migrating to .postman/config.json before July 31.

Config key mapping

Most config fields migrate directly — you move them from the root of liblab.config.json into the sdk key of .postman/config.json. The table below covers all fields.

Root-level fields

liblab.config.json field.postman/config.json sdk keyNotes
sdkNamesdkNameIdentical
sdkVersionsdkVersionIdentical
apiNameapiNameIdentical
apiVersionapiVersionIdentical
baseUrlbaseUrlIdentical
languageslanguagesIdentical. Supported values: java, python, typescript, csharp, go, terraform, swift, php, mcp
authauthIdentical. Values: apikey, basic, bearer, custom, oauth
createDocscreateDocsIdentical
docsdocsIdentical. Values: api, snippets, enhancedApiSpec
customizationscustomizationsIdentical (see sub-fields below)
languageOptionslanguageOptionsIdentical (see sub-fields below)
workflowsworkflowsIdentical
analyticsanalyticsIdentical
specFilePath(removed — becomes CLI argument)See Command Migration
liblabVersion(removed)Stripped automatically; no action needed
publishing(removed)Use --pr flag and integration settings instead
validationsToIgnore(not supported)Remove from config
mcp.generate(removed)Add "mcp" to the languages array instead
integrations(not supported)Remove from config
liblabConfigVersion(removed)Remove from config

customizations sub-fields

All customizations sub-fields are supported with the same names and structure:

FieldSupported
authentication (apiKey, basic, bearer, custom, oauth)Yes
documentationYes
devContainerYes
generateEnvYes
environmentsYes
licenseYes
retryYes
responseHeadersYes
endpointCustomizationsYes
hookDependenciesYes
deprecatedOperationsYes
multipleResponsesYes
buildAllModelsYes
readmeYes
includeOptionalSnippetParametersYes
refreshTokenYes
environmentVariablesYes

languageOptions sub-fields

All language-specific options are supported with the same names:

LanguageSupported
pythonYes
typescriptYes
goYes
javaNot yet
csharpNot yet
phpNot yet
terraformNot yet
mcpNot yet

The liblabVersion key inside language options (e.g. languageOptions.python.liblabVersion) is stripped automatically.

Before and after example

Before — liblab.config.json (repo root):

{
"sdkName": "petstore-sdk",
"apiVersion": "1.0.0",
"apiName": "Petstore API",
"sdkVersion": "1.0.0",
"specFilePath": "https://petstore.swagger.io/v2/swagger.json",
"liblabVersion": "2",
"languages": ["typescript", "python", "go"],
"auth": ["bearer"],
"createDocs": false,
"customizations": {
"devContainer": true,
"generateEnv": true,
"license": { "type": "MIT" },
"retry": {
"enabled": true,
"maxAttempts": 3,
"retryDelay": 150
},
"authentication": {
"access": { "prefix": "Bearer" }
}
},
"languageOptions": {
"python": {
"pypiPackageName": "petstore-sdk",
"githubRepoName": "petstore-python-sdk",
"sdkVersion": "1.0.0",
"liblabVersion": "2"
},
"typescript": {
"npmName": "petstore-sdk",
"npmOrg": "@my-org",
"bundle": true,
"githubRepoName": "petstore-typescript-sdk",
"sdkVersion": "1.0.0",
"liblabVersion": "2"
},
"go": {
"goModuleName": "github.com/my-org/petstore-go-sdk",
"githubRepoName": "petstore-go-sdk",
"sdkVersion": "1.0.0",
"liblabVersion": "2"
}
},
"publishing": {
"githubOrg": "my-org"
}
}

After — .postman/config.json:

{
"schemaVersion": "1",
"workspace": {},
"entities": {},
"sdk": {
"sdkName": "petstore-sdk",
"apiVersion": "1.0.0",
"apiName": "Petstore API",
"sdkVersion": "1.0.0",
"languages": ["typescript", "python", "go"],
"auth": ["bearer"],
"createDocs": false,
"customizations": {
"devContainer": true,
"generateEnv": true,
"license": { "type": "MIT" },
"retry": {
"enabled": true,
"maxAttempts": 3,
"retryDelay": 150
},
"authentication": {
"access": { "prefix": "Bearer" }
}
},
"languageOptions": {
"python": {
"pypiPackageName": "petstore-sdk",
"githubRepoName": "petstore-python-sdk",
"sdkVersion": "1.0.0"
},
"typescript": {
"npmName": "petstore-sdk",
"npmOrg": "@my-org",
"bundle": true,
"githubRepoName": "petstore-typescript-sdk",
"sdkVersion": "1.0.0"
},
"go": {
"goModuleName": "github.com/my-org/petstore-go-sdk",
"githubRepoName": "petstore-go-sdk",
"sdkVersion": "1.0.0"
}
}
}
}

Key changes from the before/after:

  • The entire config is nested under "sdk": { ... } inside .postman/config.json.
  • specFilePath is removed — the spec or collection is now passed as an argument to postman sdk generate.
  • liblabVersion fields (root and inside languageOptions) are removed.
  • publishing is removed — configure PR targets via --pr flag and Postman integrations.

Command Migration

Build / Generate

The core SDK generation command changes as follows:

liblab CLIPostman CLI
liblab buildpostman sdk generate <idOrPath>

The <idOrPath> argument replaces specFilePath from the config file. It accepts:

  • A Postman Collection ID or Specification ID (UUID format) — builds are tracked in Postman Cloud.
  • A local file path to a collection (.json) or specification (.json, .yaml, .yml) — one-off build, not tracked in Postman Cloud.
  • A URL to a publicly accessible collection or specification — one-off build, not tracked in Postman Cloud.
# liblab (spec path was in config)
liblab build

# Postman — using a Postman Specification ID
postman sdk generate 12345-abcde-67890

# Postman — using a local OpenAPI file (one-off, equivalent to specFilePath)
postman sdk generate ./openapi.yaml

# Postman — using a URL (equivalent to a URL specFilePath)
postman sdk generate https://petstore.swagger.io/v2/swagger.json

Flag mapping

liblab build flagpostman sdk generate flag
-l <language>-l, --language <languages...>
(no equivalent)--all (generate all supported languages)
--liblab-config <path>--config <path>
-y, --yes-y, --yes
--skip-validation(not needed — validation is handled server-side)
--pr--pr
-o, --org(configure via Postman integrations)
-p, --platform(configure via Postman integrations)
(no equivalent)-o, --output-dir <path> (default: ./sdks)
(no equivalent)--name <name>
(no equivalent)--sdk-version <version>
(no equivalent)--verbose
(no equivalent)--log-level <warn|info>

Init

# liblab
liblab init

# Postman
postman sdk init

postman sdk init creates or updates .postman/config.json with a skeleton sdk block. Use --yes to overwrite an existing sdk key.

Validate

The liblab CLI had a standalone liblab validate command. In the Postman CLI, spec validation happens automatically during SDK generation server-side. There is no separate validate command.

Pull Requests

# liblab — create PRs after build
liblab build --pr

# Postman — create PRs after generation
postman sdk generate <idOrPath> --pr

Configure the target repositories through Postman integrations rather than via publishing.githubOrg in the config.

Hooks

liblab hooks add / liblab hooks remove have no direct equivalent in the Postman CLI. Hook dependencies can still be declared in customizations.hookDependencies in the config.


CI/CD Pipeline Migration

Environment variable

# Before
export LIBLAB_TOKEN=<your-liblab-token>

# After
export POSTMAN_API_KEY=<your-postman-api-key>

GitHub Actions example

Before:

- name: Generate SDKs
run: liblab build -y
env:
LIBLAB_TOKEN: ${{ secrets.LIBLAB_TOKEN }}

After:

- name: Generate SDKs
run: postman sdk generate ./openapi.yaml -y
env:
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }}

If you were passing a specFilePath via config, move that path to the CLI argument as shown above (or use a Postman Specification ID if you have your spec hosted in Postman).


What Has Changed

Removed features

liblab featureStatus in Postman CLI
liblab validate (standalone)Not available — validation runs server-side during generation
liblab token create/list/revokeReplaced by Postman API keys in account settings
liblab change-passwordManaged via Postman account settings
liblab inviteManaged via Postman team settings
liblab bundle / liblab mergeNot available
liblab publishNot available — publishing is handled via SDK repository integrations
publishing config keyNot supported — configure via Postman integrations
validationsToIgnore config keyNot supported — remove from config
mcp.generate config keyUse "mcp" in the languages array instead
integrations config keyNot supported — remove from config
liblabVersion config keyStripped automatically — safe to remove
LIBLAB_TOKEN env varReplaced by POSTMAN_API_KEY
LIBLAB_ENVIRONMENT env varNot applicable

Output directory

The liblab CLI wrote generated SDKs to .liblab/ by default. The Postman CLI writes to ./sdks by default. Override with --output-dir:

postman sdk generate ./openapi.yaml -l typescript --output-dir .liblab/

Config file auto-discovery order

The Postman CLI looks for config in this order:

  1. Explicit --config <path> flag
  2. .postman/config.json in the current directory (uses the sdk key)
  3. liblab.config.json in the current directory (treated as a legacy standalone SDK config — this fallback will be removed in a future release)

Need help?

If you have questions about migrating, check the Postman SDK Generator documentation or reach out through your usual Postman support channels.