Thank you for your interest in contributing to apiops-cli! There are many ways to contribute:
- Report bugs — open an issue with a clear reproduction case.
- Request features — open an issue describing the use case.
- Submit pull requests — bug fixes, improvements, or new features are all welcome.
- Improve documentation — corrections and clarifications in README or inline docs.
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Open the repository in VS Code and click Reopen in Container when prompted (requires the Dev Containers extension). This starts a pre-configured environment with Node.js 22, Azure CLI, and GitHub CLI — no local tool installation needed.
Click Code → Codespaces → Create codespace on <branch> in the GitHub UI. The environment starts pre-configured — no local setup required.
- Node.js 22.x LTS or later
- npm (comes with Node.js)
git clone https://github.com/Azure/apiops-cli.git
cd apiops-cli
npm installAll commands assume you are in the repository root.
npm run buildnpm testRun tests in watch mode while developing:
npm run test:watchnpm run lintnpm run lint && npm run build && npm testFor verbose logging at the command line, either run via npm start:
npm start -- extract --resource-group my-rg --service-name my-apim --log-level debugOr use npm link to run the command as a user would:
npm link
apiops extract --resource-group my-rg --service-name my-apim --log-level debugsrc/
cli/ # CLI entry point and command definitions
clients/ # Azure API Management client wrappers
services/ # Business logic (extract, publish, etc.)
models/ # TypeScript types and interfaces
lib/ # Shared utilities
tests/
unit/ # Unit tests
integration/ # Integration tests
contract/ # Contract tests
specs/ # Feature specifications and design documents
dist/ # Compiled output (git-ignored)
Dependencies and dev tools are listed in package.json. The project uses TypeScript (strict mode), Vitest for testing, and ESLint for linting.
apiops: command not found — run npm link from the repository root after building (see Manual setup above).
All source files MUST include the following copyright header at the very top of the file:
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.This applies to all files in src/ and tests/ directories. The header must appear before any other code or comments.
Example:
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import { Command } from 'commander';
export class ExtractCommand {
// ...
}-
Write tests for new functionality or bug fixes.
-
Ensure all checks pass locally:
npm run lint && npm run build && npm test
-
Commit with a clear message. Include
Closes #NorFixes #Nwhen the change resolves a GitHub issue — this auto-closes the issue on merge:feat: add support for policy extraction Closes #42 -
Open a pull request against
main. CI automatically runs lint, build, and the full test suite. All checks must pass before merge. -
Address review feedback promptly.
Open an issue in the GitHub issue tracker with a clear description of your question or problem.