sdks
Introducing the Jaina CLI and SDKs
TypeScript, C#, and Python clients plus a CLI for sync, push, pull, and codegen.
Jaina Team
What shipped
Today we shipped four packages alongside the platform:
| Package | Registry | Purpose |
|---|---|---|
jaina-cli | npm | One CLI for auth, sync, codegen, and export |
@jaina/sdk | npm | TypeScript / JavaScript client |
Jaina.Client | NuGet | C# / .NET client (Unity-friendly) |
jaina-sdk | PyPI | Python client with sync and async support |
All four are open source, MIT licensed.
The CLI
npm install -g jaina-cli
jaina login # OAuth in your browser
jaina projects list # what's in your account
jaina projects create my-game # new project
# Sync workflow
jaina pull my-game/level-1 # download package to ./level-1/
# ... edit model.json or files locally ...
jaina push ./level-1 # upload your changes
# Code generation
jaina codegen my-game --lang csharp --output ./Models/
jaina codegen my-game --lang typescript --output ./types/
TypeScript example
import { JainaClient } from '@jaina/sdk';
const jaina = new JainaClient({
apiKey: process.env.JAINA_API_KEY!,
});
const enemies = await jaina.records.list<Enemy>('my-game', 'enemy', {
filter: { 'data.hp': { gte: 50 } },
});
await jaina.records.create('my-game', 'enemy', {
name: 'Goblin',
hp: 20,
attack: 3,
});
C# example (Unity-friendly)
using Jaina.Client;
var client = new JainaClient(apiKey: System.Environment.GetEnvironmentVariable("JAINA_API_KEY"));
var enemies = await client.Records.ListAsync<Enemy>("my-game", "enemy");
foreach (var e in enemies.Items)
{
UnityEngine.Debug.Log($"{e.Name} (HP {e.Hp})");
}
Python example
from jaina import JainaClient
with JainaClient(api_key=os.environ["JAINA_API_KEY"]) as jaina:
enemies = jaina.records.list("my-game", "enemy", model=Enemy)
for e in enemies.items:
print(f"{e.name} (HP {e.hp})")
What's next
The CLI and SDKs are at v0.2 with 249 tests passing across the three language clients. We're focused on coverage and ergonomics, not surface area, for the next few months. If something is awkward, open an issue — that's the fastest path to a fix.
