{"id":17002,"library":"endpoints-sdk-cli","title":"Endpoints SDK CLI","description":"The `endpoints-sdk-cli` is a command-line interface tool designed for generating SDKs for various API endpoints. Currently at version 3.1.7, the package exhibits an active release cadence, with frequent patch and minor updates primarily addressing dependency updates and bug fixes. Its core functionality revolves around consuming Git repositories to generate client-side SDKs, simplifying interaction with defined API endpoints. While specific details on the input format (e.g., OpenAPI) are not explicitly stated in the provided context, its role as an 'endpoints SDK CLI' strongly implies it processes API definitions to produce code. A key differentiator is its focus on streamlining the SDK creation process directly from remote Git repositories via CLI commands, reducing the need for manual setup or complex configuration within development environments.","status":"active","version":"3.1.7","language":"javascript","source_language":"en","source_url":"https://github.com/matsuri-tech/endpoints-sdk-cli","tags":["javascript"],"install":[{"cmd":"npm install endpoints-sdk-cli","lang":"bash","label":"npm"},{"cmd":"yarn add endpoints-sdk-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add endpoints-sdk-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for parsing command-line arguments and structuring the CLI.","package":"commander","optional":false},{"reason":"Used for resolving and dereferencing JSON schema references, likely for processing API definitions.","package":"@apidevtools/json-schema-ref-parser","optional":false}],"imports":[{"note":"The CLI's main execution point ('endpoints') is exposed via the `bin` entry in `package.json`, not as a library export. Programmatic interaction is typically via `child_process.exec`.","wrong":"import { cli } from 'endpoints-sdk-cli'; cli.run(['add', 'repo']);","symbol":"cli","correct":"This package is primarily a CLI tool and not intended for direct library-style imports. Its functionality is accessed via the 'endpoints' command in the terminal."},{"note":"Developers typically interact with this package by running `endpoints` commands in their shell, not by calling exported JavaScript functions directly.","wrong":"import { generateSdk } from 'endpoints-sdk-cli'; generateSdk({ repo: '...' });","symbol":"generateSdk","correct":"This package primarily operates via CLI commands. The SDK generation process is initiated through the `endpoints` CLI command (e.g., `endpoints add <repo_url>`), rather than a directly importable function."},{"note":"Attempting to import a class or default object for the CLI will result in undefined behavior as these are not exposed for public consumption as a library.","wrong":"import EndpointsCLI from 'endpoints-sdk-cli'; new EndpointsCLI().addRepo('...');","symbol":"EndpointsCLI","correct":"There is no exposed class or default export for programmatic instantiation of the CLI program."}],"quickstart":{"code":"npm install -g endpoints-sdk-cli\n\n# Or use npx for one-off commands\n# npx endpoints-sdk-cli <command>\n\n# Add a remote repository containing your API definition (e.g., OpenAPI spec)\n# Replace with your actual repository URL and branch\nendpoints add https://github.com/your-org/your-api-specs.git --branch main\n\n# The CLI will process the repository and generate an SDK based on its contents.\n# The generated files are typically output to the current working directory\n# or a configurable path. Consult the official documentation for output specifics.\n\n# Example: To list available commands\nendpoints --help","lang":"bash","description":"Installs the CLI globally, then demonstrates adding a remote Git repository to generate an SDK."},"warnings":[{"fix":"Instead of local paths, utilize the `--branch` flag with a remote repository URL. The CLI will clone the specified branch from the remote repository.","message":"The functionality for generating SDKs from local repositories was abolished. Directly referencing local paths like `add /Users/.../local-repository/` or `add ./local-repository` will no longer work.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use the unified `add <repository_url> --branch <branch_name>` syntax with standard HTTPS or SSH URLs as specified by the updated CLI.","message":"Repository addition methods were unified, deprecating old syntaxes for adding remote repositories. Specific formats like `add git@github.com:username/repository.git` and `add https://github.com/[username/repository].git` may no longer be directly supported in their previous forms.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to version 3.0.1 or higher to resolve the path generation bug. `npm install -g endpoints-sdk-cli@latest`","message":"Version 3.0.0 contained a bug where path generation did not work correctly, potentially leading to incorrect file paths in generated SDKs or other output issues.","severity":"gotcha","affected_versions":"3.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Upgrade the package to version 3.0.1 or any newer version (e.g., `npm install -g endpoints-sdk-cli@latest`).","cause":"Path generation bug present in version 3.0.0.","error":"このバージョンは、パスの生成が上手くできないケースが発覚しています。v3.0.1以上を利用してください。"}],"ecosystem":"npm","meta_description":null}