Features · Install · Usage · Migrating · Platform
The single source of truth for the things every Smoo AI client —
smooblue, observability-studio, thethCLI — reimplements otherwise. This repo absorbs and supersedes the standalone@smooai/uicrate:uiis now one module among siblings (auth,llm, future) inside a singlesmooai-client-sharedRust crate, with matching@smooai/client-sharednpm / NuGet / PyPI packages planned.
A Smoo AI Rust client (smooblue, observability-studio, th, th admin, …)
typically needs the same three things:
- Design tokens + monogram — so the UI looks like Smoo AI.
- Auth — Supabase user OAuth (browser login) AND M2M
client_credentialsgrant (service accounts), with one shared on-diskCredentialsStore. - LLM access — exchanges a user session JWT for an org-scoped
llm.smoo.aiLLM bearer so every user's spend attributes to their org's TPM budget.
Each of these has been re-implemented in every consumer at least once. This crate makes them one dependency.
smooai-client-shared = { version = "0.1", features = ["ui", "auth"] }The ui feature is the default and inherits the same dependency tree as the
old smooai-ui crate — zero runtime deps, no_std-compatible. Smooblue and
observability-studio can swap smooai-ui for smooai-client-shared without
pulling any new transitive dependencies.
| Feature | Adds | Pulls |
|---|---|---|
ui (default) |
STYLES, MONOGRAM_SVG, tokens::* |
nothing |
auth |
Supabase OAuth, M2M, CredentialsStore |
tokio, reqwest, axum, serde |
llm |
JWT → llm.smoo.ai org-session exchange |
(implies auth) |
~/dev/smooai/client-shared/
├── shared/ # cross-language source of truth
│ ├── styles.css # OKLCH tokens + base component CSS
│ ├── monogram.svg # smoo monogram
│ └── tokens.json # tokens as plain JSON
├── rust/ # smooai-client-shared (crates.io)
│ ├── Cargo.toml
│ └── src/
│ ├── lib.rs
│ ├── ui/ # lifted from smooai-ui
│ ├── auth/ # Supabase OAuth + M2M + storage (feature = "auth")
│ └── llm/ # JWT → LLM session exchange (feature = "llm")
├── src/ # @smooai/client-shared (npm) — future
├── dotnet/ # SmooAI.ClientShared (NuGet) — future
├── python/ # smooai-client-shared (PyPI) — future
└── LICENSE README.md
Replace
smooai-ui = "0.1"with
smooai-client-shared = "0.1" # default features include "ui" — same surfaceand swap imports:
// before
use smooai_ui::{STYLES, MONOGRAM_SVG, tokens};
// after
use smooai_client_shared::ui::{STYLES, MONOGRAM_SVG, tokens};The ui module is API-compatible with smooai-ui 0.1 — every const and
sub-module lives at the same relative path under ui::.
For one release cycle, the legacy smooai-ui crate continues to publish as a
thin re-export shim (pub use smooai_client_shared::ui::*) with a deprecation
warning. Yanks after the cycle.
@smooai/ui— the original design-system-only crate. Will become a deprecation shim then retire.@smooai/smooth— thethCLI; consumesclient-shared::{auth, llm}for login + LLM session.smooblue,observability-studio— Dioxus desktop apps; consumeclient-shared::ui.
@smooai/client-shared is built and open-sourced by Smoo AI — the AI-powered business platform with AI built into every product: CRM, customer support, campaigns, field service, observability, and developer tools.
- 🧰 More open source from Smoo AI — smoo.ai/open-source
- 🧩 Sibling repos — smooblue + observability-studio (consumers), @smooai/smooth (the
thCLI), @smooai/config, @smooai/logger
MIT — see LICENSE.
Built by Smoo AI — AI built into every product.
