Install an SDK

How to install each Lucida SDK today: npm packages from npm, every other language from its public GitHub repo until the registry release.

Embed
Preview of the card
<a href="https://lucidace.com/help/install-sdks"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/becbaeef-7970-444e-8060-8c1aeb54017a/social-card.svg?v=3e7ae33eec8b" alt="Install an SDK" width="600" height="315"></a>

These install from their registries: the browser and Node packages (@lucida-analytics/*) from npm, Go from the module proxy, Python from PyPI (lucida-analytics), Rust from crates.io (lucida-analytics, lucida-openfeature), Dart and Flutter from pub.dev, and Swift through Swift Package Manager. SDK install status lists what is on a registry today and what is not. The other languages are not on their registries yet unless that page says so. The commands you may remember from a registry (gem install lucida, composer require lucida/lucida without a repository entry, dotnet add package Lucida without a local source) do not work today. Use the commands below, which pull from the public repo github.com/lucidaanalytics/lucida-<lang> at its v0.1.0 release. They are GitHub installs until the registry release; the code is the same, and the commands change to the registry ones when it ships.

PyPI lucida is someone else's package. Never pip install lucida. Our distribution name is lucida-analytics (the import name is lucida), and it is on PyPI at 0.1.0. Check the author and repository of anything you install by name.

The commands pin the v0.1.0 tag. To track the repo's default branch instead, use main where the tag is.

Language

Install from GitHub (release v0.1.0)

Python

pip install lucida-analytics (imported as lucida)

Django

lucida-django: pip install "git+https://github.com/lucidaanalytics/lucida-django.git@v0.1.0" (pulls lucida-analytics from PyPI)

Go

go get github.com/lucidaanalytics/lucida-go

Rust

cargo add lucida-analytics (the library is imported as lucida)

Ruby

lucida-ruby: in the Gemfile: gem "lucida", git: "https://github.com/lucidaanalytics/lucida-ruby.git", tag: "v0.1.0", then bundle install (gem install cannot take a git URL)

Rails

lucida-rails: the Gemfile line above plus gem "lucida-rails", git: "https://github.com/lucidaanalytics/lucida-rails.git", tag: "v0.1.0", then bin/rails g lucida:install

PHP

lucida-php: composer config repositories.lucida vcs https://github.com/lucidaanalytics/lucida-php && composer require "lucida/lucida:^0.1" (or "repositories": [{"type": "vcs", "url": "https://github.com/lucidaanalytics/lucida-php"}] in composer.json)

Laravel

lucida-laravel: add both repositories, then require both: composer config repositories.lucida vcs https://github.com/lucidaanalytics/lucida-php && composer config repositories.lucida-laravel vcs https://github.com/lucidaanalytics/lucida-laravel && composer require "lucida/lucida:^0.1" "lucida/lucida-laravel:^0.1"

.NET

lucida-dotnet: download the .nupkg assets of the release into lucida-nupkgs (gh release download v0.1.0 -R lucidaanalytics/lucida-dotnet -p '*.nupkg' -D lucida-nupkgs), then dotnet nuget add source "$PWD/lucida-nupkgs" -n lucida && dotnet add package Lucida --version 0.1.0 (Lucida.AspNetCore and Lucida.OpenFeature are in the same release)

Elixir

lucida-elixir: in mix.exs deps: {:lucida, github: "lucidaanalytics/lucida-elixir", tag: "v0.1.0"}, then mix deps.get

Java

lucida-java through JitPack: repositories { maven("https://jitpack.io") } and implementation("com.github.lucidaanalytics:lucida-java:v0.1.2"). lucida-java-openfeature and lucida-java-servlet use the same pattern (com.github.lucidaanalytics:lucida-java-openfeature:v0.1.2, ...:lucida-java-servlet:v0.1.2) next to the core, with exclude(group = "io.github.lucidaanalytics", module = "lucida") on the module (see their repos)

Android

lucida-android through JitPack: maven("https://jitpack.io") and implementation("com.github.lucidaanalytics.lucida-android:lucida-android:v0.1.0") (modules lucida-core, lucida-compose, lucida-openfeature the same way)

Kotlin Multiplatform

lucida-kmp through JitPack: maven("https://jitpack.io") and implementation("com.github.lucidaanalytics:lucida-kmp:v0.1.0") (JVM and Android targets)

Swift

Swift Package Manager: .package(url: "https://github.com/lucidaanalytics/lucida-ios.git", from: "0.1.0"), product Lucida

Unity

lucida-unity: Package Manager, add by git URL: https://github.com/lucidaanalytics/lucida-unity.git#v0.1.0

Unreal

lucida-unreal: download lucida-unreal-v0.1.0.zip from the release, unzip into Plugins/Lucida/

Godot

lucida-godot: download lucida-godot-v0.1.0.zip from the release, copy addons/lucida into your project

Roblox

lucida-roblox: download lucida-roblox-v0.1.0.zip from the release, then rojo build -o Lucida.rbxm

C and C++

lucida-cpp: download lucida-cpp-v0.1.0.zip from the release and add its include/ to your include path

Google Tag Manager

lucida-gtm: download lucida-gtm-v0.1.0.zip from the release and import template.tpl

GitHub Action

lucida-release-gate: uses: lucidaanalytics/lucida-release-gate@v0.1.0

Flutter installs from pub.dev: flutter pub add lucida_flutter (pure Dart: dart pub add lucida_core).

JitPack builds the tag from GitHub on the first request, so the first resolve of a JVM coordinate can take a few minutes. Each repo's Releases page also carries the built files (gems, .nupkg, jars, aars, zips).

The OpenFeature providers depend on their core SDK. The Go provider (lucida-go/openfeature) and the Rust one (lucida-rust-openfeature) reach it by a local path in the repo, so clone them together with the core and build from the clone. The Ruby, PHP and Java providers need their core package installed next to them, as in the rows above; for PHP add the lucida-php and lucida-php-openfeature repositories and composer require "lucida/lucida:^0.1" "lucida/openfeature:^0.1".

JavaScript, from npm: npm install @lucida-analytics/node (servers) or @lucida-analytics/browser (pages). The framework wrappers (react, next, vue, nuxt, svelte, remix, astro, and others) are npm packages with the same prefix.

Each SDK's README has its configuration and API. The wire format they all speak is in Send events over HTTP.

Updated