Skip to content

Installation ​

The ALANA SDK is distributed in a few different forms, to make the development process as seamless as possible while still protecting our developers and users. Choose the method that is right for you.

ES Module ​

If you are developing a modern web application that isn't using a front-end framework such as React or Vue, you can import the ALANA SDK directly as an ES module. In your script, add this line:

js
import Alana from "https://sdk.alana4.com/js/alana.js";

This will import a function (named Alana here) which will allow you to create an SDK instance as described in Getting Started.

This method is best for simple web apps or full-stack applications that use server-side templating to build pages.

Node Module ​

For our developers using Node-based frameworks, we offer the SDK as a package through the GitHub npm registry. To use this package, you'll need a GitHub account.

INFO

In the future, we will be making more SDK packages available in more locations.

The documentation for working with the npm registry describes the steps needed to install a package, but here is a quick summary of what you'll need to do.

  1. Create a Personal Access Token for your account.

  2. Run the following command to login to the GitHub npm registry:

bash
npm login --scope=@collectivtech --auth-type=legacy --registry=https://npm.pkg.github.com
  1. Provide your GitHub username and the token you created in step 1.

  2. In your project directory, create a file named .npmrc containing this line:

@collectivtech:registry=https://npm.pkg.github.com
  1. Install the SDK as you would any NPM package:
bash
npm install @collectivtech/alana-sdk-js

This method of installing the SDK is intended for larger web applications that use React, Vue, or another front-end framework. We do expect this to be the most common use case, so we will invest more resources into streamlining the process in the future.

Legacy Script ​

If you're expecting to support very old browsers, or can't use ES modules for some other reason, we offer a legacy version of the SDK that you can import via a script tag.

html
<script src="https://sdk.alana4.com/js/alana.web.js">

The script provides a global object Alana that serves the same purpose as the default export in the ES module, so you can use it in much the same way as the module version.

This method of using the SDK is only provided as a last-resort fallback for environments where modules aren't available or suitable. The ALANA SDK relies on features of modern browsers and modern JavaScript, so we make no guarantees that the legacy version is suitable for applications that need to support outdated or niche browsers.

ALANA™, ALANA Platform™, ALANA Guide™, and ALANA Partner™ are trademarks of Collectiv Technologies Inc.