BYTEBULL SDKOPENAI + TYPESCRIPTGITHUBDATABASEAPISOLANAGAMEREPOSITORY ANALYSIS / SCHEMA + API / SOLANA / GAME CONTENT

BYTEBULL SDK

Open-source AI developer platform.

TypeScript SDK for GitHub analysis, repository discovery, database and API generation, Solana development, and game content creation.

01

Overview

BYTEBULL SDK gives developers a typed client for AI-assisted development workflows. It can inspect repositories, discover useful open-source references, generate schemas and API plans, explain Solana programs and transactions, and create game content or systems from natural language.

GitHub repository analysisAI repository discoveryDatabase schema generationREST API generationSolana program analysisTransaction and wallet explanationAnchor scaffold generationNPC, dialogue, quest, lore, inventory, skill tree, and metadata generation

02

Install

Install from npm, then configure your API keys.

npm install bytebull-sdk
# Required
OPENAI_API_KEY=sk-...

# Optional
OPENAI_MODEL=gpt-4o-mini
GITHUB_TOKEN=ghp_...
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
BYTEBULL_TIMEOUT_MS=30000
BYTEBULL_MAX_RETRIES=3

03

Quick Start

Use ByteBull.fromEnv() when your environment variables are already loaded, or pass credentials explicitly.

import { ByteBull } from "bytebull-sdk";

const bytebull = ByteBull.fromEnv();

const result = await bytebull.github.analyzeRepository({
  repository: "BYTEBULLDEV/bytebull-sdk",
  includeFiles: true,
  includeDependencies: true,
  includeArchitecture: true
});

console.log(result.summary);
console.log(result.frameworks);
console.log(result.security);
import { ByteBull } from "bytebull-sdk";

const bytebull = new ByteBull({
  openaiApiKey: process.env.OPENAI_API_KEY!,
  githubToken: process.env.GITHUB_TOKEN,
  solanaRpcUrl: process.env.SOLANA_RPC_URL
});

04

GitHub Tools

Analyze repositories for architecture, dependencies, security signals, framework usage, and recommendations. Repository discovery turns plain-language intent into curated GitHub matches.

const analysis = await bytebull.github.analyzeRepository({
  repository: "solana-labs/solana",
  includeFiles: true,
  includeDependencies: true,
  includeArchitecture: true
});

const repositories = await bytebull.github.findRepositories({
  query: "open-source Solana game inventory SDK",
  limit: 10,
  minimumStars: 20,
  languages: ["TypeScript", "Rust"]
});

repositories.forEach((repo) => {
  console.log(`${repo.name}: ${repo.relevanceScore}%`);
});

05

Database + API

Generate database schemas for PostgreSQL, MySQL, or SQLite with Prisma, Drizzle, or raw SQL targets. API generation can produce route plans, validation, pagination, error handling, and OpenAPI specifications.

const schema = await bytebull.database.generateSchema({
  prompt: "Create a multiplayer game database with users, wallets, inventories, items, quests, and leaderboards.",
  dialect: "postgresql",
  orm: "drizzle"
});

const api = await bytebull.api.generate({
  prompt: "Create an inventory API with authentication, pagination, validation, and item trading.",
  framework: "express",
  language: "typescript",
  database: "postgresql"
});

console.log(schema.schema);
console.log(schema.entities);
console.log(api.routes);
console.log(api.openApiSpec);

06

Solana Tools

Analyze Solana programs, explain transactions, inspect wallet activity and token holdings, or scaffold Anchor programs with optional clients and tests.

const program = await bytebull.solana.analyzeProgram({
  programId: "TokenkegQfeZyiNwAJsyFbPVwwQQfg5mNB7WorqCknBb"
});

const tx = await bytebull.solana.explainTransaction({
  signature: "abc123..."
});

const wallet = await bytebull.solana.inspectWallet({
  address: "So11111111111111111111111111111111111111112"
});

const scaffold = await bytebull.solana.generateScaffold({
  prompt: "Create an Anchor program for an on-chain game inventory.",
  framework: "anchor",
  includeClient: true,
  includeTests: true
});

07

Game Tools

Generate NPC personas, dialogue trees, quests, world lore, gameplay systems, inventories, skill trees, and asset metadata for game-engine workflows.

const npc = await bytebull.game.generatePersona({
  name: "Kael",
  role: "Blacksmith",
  genre: "dark fantasy",
  engine: "godot"
});

const dialogue = await bytebull.game.generateDialogue({
  context: "A merchant negotiating with a player in a fantasy tavern",
  npcName: "Merchant",
  theme: "commerce and deals"
});

const quest = await bytebull.game.generateQuest({
  worldContext: "A medieval fantasy world with dragons, magic, and ancient ruins",
  type: "main",
  theme: "dragon hunting"
});

const system = await bytebull.game.generateGameplaySystem({
  systemType: "crafting",
  description: "Create a crafting system with recipes, materials, and skill levels",
  engine: "godot"
});

08

Export Utilities

Export generation results to JSON, Markdown, or full file sets that can be written into a local output directory.

const jsonFile = bytebull.export.toJson(schema, "schema.json");

const mdFile = bytebull.export.toMarkdown(
  "# Database Schema\n\nDesigned for multiplayer inventory systems.",
  "schema.md"
);

await bytebull.export.files(api.files, "./output");

09

Error Handling

BYTEBULL SDK exposes typed error classes for validation, configuration, OpenAI, GitHub, Solana RPC, generation, and rate limit failures.

import {
  ByteBullError,
  ConfigurationError,
  ValidationError,
  OpenAIRequestError,
  GitHubRequestError,
  SolanaRpcError,
  GenerationError,
  RateLimitError
} from "bytebull-sdk";

try {
  await bytebull.github.analyzeRepository({ repository: "invalid" });
} catch (error) {
  if (error instanceof ValidationError) {
    console.error("Input validation failed:", error.message);
  } else if (error instanceof GitHubRequestError) {
    console.error("GitHub API error:", error.message);
  } else if (error instanceof RateLimitError) {
    console.error("Rate limited. Retry after:", error.retryAfter);
  }
}

10

Security Notes

  • Never hardcode API keys. Use environment variables or secret managers.
  • Review AI-generated code before production use.
  • Generated files are sanitized to protect against path traversal.
  • Generated code is never automatically executed.
  • Solana transactions are never automatically signed.
  • Sensitive credentials should never be stored or logged.

11

Development

The SDK is TypeScript-first and organized into focused modules for client setup, providers, domain generators, schemas, exports, and shared types.

bytebull-sdk/
src/
  client/      # Main ByteBull client
  ai/          # OpenAI provider and prompt templates
  github/      # GitHub analysis modules
  database/    # Database schema generation
  api/         # API generation
  solana/      # Solana development tools
  game/        # Game content generators
  export/      # Export utilities
  schemas/     # Zod validation schemas
  types/       # TypeScript type definitions
  utils/       # Utility functions
  index.ts     # Main entry point
examples/
tests/
README.md
git clone https://github.com/BYTEBULLDEV/bytebull-sdk.git
cd bytebull-sdk
pnpm install
pnpm build
pnpm test
pnpm lint
pnpm typecheck