Creating Extensions and Using the TeamSQL CLI

In this article, we will cover how you can create, manage, and submit your extensions using the TeamSQL CLI.

Installing the TeamSQL CLI

If you don't already have the TeamSQL CLI installed, you will need to do so. Run the following to install the TeamSQL CLI:

> npm install @teamsqlio/teamsql-cli -g

Because we update the TeamSQL CLI from time to time, please run the follow to see if the supported commands have changed:

> teamsql-cli --help

Navigate to your extension folder, where you can begin using the TeamSQL CLI.

Using the TeamSQL CLI to Create and Manage Your Extension

The following section will show you how to begin working on your extension, install your extension for testing, and submit your extension to TeamSQL for review.

Step 1: Login

To use TeamSQL CLI, you must first log in with your TeamSQL Credentials.

> teamsql-cli login

Step 2: Create the Extension

The create command allows you to create and start working on the extension. The wizard that creates that extension will ask you to choose a template. It will then clone the selected template from the appropriate TeamSQL public GitHub repo.

> teamsql-cli create

Step 3: Test Your Extension

Before you submit your extension to us, we ask that you test it thoroughly.

To test your extension, you can install it locally and run it using your TeamSQL installation. You can install your extension by running the following in the root of your extension:

> teamsql-cli submit --install

This installs the extension to your TeamSQL user folder. It does *not* submit the extension.

If you already have TeamSQL running, you may need to refresh or restart TeamSQL.

Note that all of the provided templates are working extensions, so once one has been cloned for you, you can install it locally and test it throughout the development process.

Step 4: Submit Your Extension

To submit your extension, run this command in your the root folder of your extension.

> teamsql-cli submit

We will review all submissions as soon as possible.

Useful CLI Commands

The following is a list of supported CLI commands you may find useful as you develop your extension.

Uninstall

The Uninstall command removes your extension from the local TeamSQL instance. Run the following in the root of your extension's folder:

> teamsql-cli uninstall

Logout

The Logout command logs you out of your TeamSQL account in the CLI; it does not log you out of the TeamSQL application.

> teamsql-cli logout

Package

Before you submit your extension, you may want to check that the package you're submitted contains all of the necessary files. To do so, you can add package to your submit command, which packages and compresses your extension folder. The package command returns the full path of the packaged extension, which you can then use to navigate to that location and check the contents.

> teamsql-cli submit --package

This command does *not* submit your extension.

results matching ""

    No results matching ""