Quick Start
tsp-client allows you to develop your TypeSpec project locally before pushing changes upstream. These instructions can be used when you want to generate a client library from a local TypeSpec project that has the changes you wish to use.
Prerequisites
- Install
tsp-client:
npm install -g @azure-tools/typespec-client-generator-cli- Have a local Git repository with your TypeSpec project. We’ll use the
azure-rest-api-specsrepository in examples. - Have a clone of an
azure-sdk-for-<language>repository. We’ll useazure-sdk-for-pythonin examples.
Generate a client library from local changes
- Go to local
azure-rest-api-specsclone. - Create/Modify the TypeSpec project.
- Switch to the language repository clone you want to generate a client library in. Example:
cd <path to>/azure-sdk-for-python- From the root of the repository run the following command:
azure-sdk-for-python> tsp-client init -c <path to local typespec project at tspconfig.yaml level>Example:
azure-sdk-for-python> tsp-client init -c ../azure-rest-api-specs/specification/contosowidgetmanager/Contoso.WidgetManager/To get familiar with tsp-client and supported commands, see tsp-client usage.