← Back to Skills Marketplace
urbantech

Ainative Sdk Quickstart

by Toby Morning · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
153
Downloads
0
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install ainative-sdk-quickstart
Description
Get started with AINative SDKs in under 5 minutes. Use when (1) Setting up AINative for the first time, (2) Choosing between React/Next.js/Svelte/Vue SDKs, (...
README (SKILL.md)

AINative SDK Quick Start

1. Get an API Key (30 seconds)

# Auto-creates a project + API key, configures your IDE's MCP server
npx zerodb init

This outputs:

API Key: ak_...
Project ID: proj_...
MCP config written to .claude/mcp.json (or cursor/mcp.json)

Or create manually at https://app.ainative.studio → Settings → API Keys.

2. Choose Your SDK

Framework Package Hook/API
React @ainative/react-sdk useChat, useCredits
Next.js @ainative/next-sdk Server client + middleware
Svelte @ainative/svelte-sdk Svelte stores
Vue @ainative/vue-sdk Composables
Raw API requests / fetch REST directly

3. React

npm install @ainative/react-sdk
import { AINativeProvider, useChat } from '@ainative/react-sdk';

function App() {
  return (
    \x3CAINativeProvider config={{ apiKey: 'ak_your_key' }}>
      \x3CChat />
    \x3C/AINativeProvider>
  );
}

function Chat() {
  const { messages, sendMessage, isLoading } = useChat({
    model: 'claude-3-5-sonnet-20241022',
  });

  return (
    \x3Cdiv>
      {messages.map((m, i) => \x3Cdiv key={i}>{m.role}: {m.content}\x3C/div>)}
      \x3Cbutton onClick={() => sendMessage([...messages, { role: 'user', content: 'Hello' }])}
              disabled={isLoading}>
        Send
      \x3C/button>
    \x3C/div>
  );
}

4. Next.js

npm install @ainative/next-sdk
// app/api/chat/route.ts
import { createServerClient } from '@ainative/next-sdk/server';

export async function POST(request: Request) {
  const { messages } = await request.json();
  const client = createServerClient({ apiKey: process.env.AINATIVE_API_KEY! });

  const result = await client.chat.completions.create({
    model: 'claude-3-5-sonnet-20241022',
    messages,
    stream: true,
  });

  return new Response(result.body, {
    headers: { 'Content-Type': 'text/event-stream' },
  });
}

5. Svelte

npm install @ainative/svelte-sdk
\x3Cscript>
  import { createChatStore, setAINativeConfig } from '@ainative/svelte-sdk';

  setAINativeConfig({ apiKey: 'ak_your_key' });
  const chat = createChatStore({ model: 'claude-3-5-sonnet-20241022' });
\x3C/script>

{#each $chat.messages as msg}
  \x3Cp>\x3Cb>{msg.role}:\x3C/b> {msg.content}\x3C/p>
{/each}
\x3Cbutton on:click={() => chat.sendMessage([...$chat.messages, { role: 'user', content: 'Hi' }])}>
  Send
\x3C/button>

6. Vue

npm install @ainative/vue-sdk
\x3Cscript setup>
import { useChat } from '@ainative/vue-sdk';
import { provideAINative } from '@ainative/vue-sdk';

provideAINative({ apiKey: 'ak_your_key' });
const { messages, sendMessage, isLoading } = useChat({ model: 'claude-3-5-sonnet-20241022' });
\x3C/script>

\x3Ctemplate>
  \x3Cdiv v-for="(msg, i) in messages" :key="i">{{ msg.role }}: {{ msg.content }}\x3C/div>
  \x3Cbutton @click="sendMessage([...messages, { role: 'user', content: 'Hi' }])" :disabled="isLoading">
    Send
  \x3C/button>
\x3C/template>

7. Environment Variables

# .env
AINATIVE_API_KEY=ak_your_key
NEXT_PUBLIC_AINATIVE_API_KEY=ak_your_key  # Next.js client-side

References

  • packages/sdks/react/ — React SDK source
  • packages/sdks/nextjs/ — Next.js SDK source
  • packages/sdks/svelte/ — Svelte SDK source
  • packages/sdks/vue/ — Vue SDK source
  • packages/zerodb-cli/ — zerodb init source
Usage Guidance
This skill is a standard quickstart: it shows npm installs, an npx command that auto-creates API keys and writes a local config, and uses environment variables. Before running anything (especially npx zerodb init): 1) Verify the zerodb-cli/ainative npm packages and their repository/homepage to ensure they are the official project; 2) Prefer creating API keys manually via the web console if you don't trust an automated CLI; 3) Do not put sensitive server keys in client-exposed env vars (NEXT_PUBLIC_*) unless the key is explicitly designed to be public/limited; and 4) Inspect any files written to your filesystem (e.g., .claude/mcp.json) to understand what credentials are stored and where.
Capability Assessment
Purpose & Capability
Name/description (AINative SDK quickstart) matches the SKILL.md: it shows how to get an API key, install SDK packages, and make a first API call for React/Next/Svelte/Vue. It does not request unrelated credentials or unusual system access.
Instruction Scope
The instructions stay within SDK setup scope (npm install, npx zerodb init, env vars, and example code). They do mention the zerodb init command writing an MCP config to .claude/mcp.json (or cursor/mcp.json) and show using AINATIVE_API_KEY and NEXT_PUBLIC_AINATIVE_API_KEY — which is expected for a quickstart but worth noting because NEXT_PUBLIC_* keys are client-exposed.
Install Mechanism
No formal install spec in the skill bundle (instruction-only). The doc instructs running npm install and npx zerodb init; this is normal for a quickstart but running npx executes remote package code from npm, so users should verify the zerodb-cli package/repo before running.
Credentials
The skill declares no required env vars (reasonable), but examples reference AINATIVE_API_KEY and NEXT_PUBLIC_AINATIVE_API_KEY. These are proportionate to the task, though exposing a secret via NEXT_PUBLIC_* will make it public to clients and may be inappropriate depending on key capabilities.
Persistence & Privilege
always is false and there is no install or code that requests persistent privileges or modifies other skills or system-wide settings. The skill is instruction-only and does not ask to be always-enabled.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ainative-sdk-quickstart
  3. After installation, invoke the skill by name or use /ainative-sdk-quickstart
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Quickstart guide for AINative SDKs. - Covers setup and first API call for React, Next.js, Svelte, and Vue SDKs. - Includes instructions to obtain an API key and project ID. - Provides example code snippets for each framework. - Documents zerodb-cli init for fast project setup. - Lists relevant environment variables and source locations.
Metadata
Slug ainative-sdk-quickstart
Version 1.0.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Ainative Sdk Quickstart?

Get started with AINative SDKs in under 5 minutes. Use when (1) Setting up AINative for the first time, (2) Choosing between React/Next.js/Svelte/Vue SDKs, (... It is an AI Agent Skill for Claude Code / OpenClaw, with 153 downloads so far.

How do I install Ainative Sdk Quickstart?

Run "/install ainative-sdk-quickstart" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Ainative Sdk Quickstart free?

Yes, Ainative Sdk Quickstart is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Ainative Sdk Quickstart support?

Ainative Sdk Quickstart is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Ainative Sdk Quickstart?

It is built and maintained by Toby Morning (@urbantech); the current version is v1.0.0.

💬 Comments