OblienSandbox 1.0.0

dotnet add package OblienSandbox --version 1.0.0
                    
NuGet\Install-Package OblienSandbox -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OblienSandbox" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OblienSandbox" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OblienSandbox" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OblienSandbox --version 1.0.0
                    
#r "nuget: OblienSandbox, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OblienSandbox@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OblienSandbox&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OblienSandbox&version=1.0.0
                    
Install as a Cake Tool

OblienSandbox

A clean, modern .NET client library for Oblien Sandbox APIs.

Features

  • Database Management - SQLite database operations (create, delete, list)
  • Table Management - Create, drop, rename tables with full schema control
  • Data Operations - Insert, update, delete, query with pagination
  • Advanced Queries - Execute SQL, parameterized queries, transactions
  • Import/Export - JSON, CSV, and SQL export/import
  • AI Agent Workspaces - Git, file operations, terminal execution, snapshots
  • Authentication - Two-tier authentication (Account + Sandbox level)

Installation

dotnet add package OblienSandbox

Quick Start

Sandbox-Level Authentication

using OblienSandbox;
using OblienSandbox.Models;

var client = new OblienSandboxClient("YOUR_SANDBOX_TOKEN");

// List databases
var databases = await client.Databases.ListDatabasesAsync();

// Create database
var db = await client.Databases.CreateDatabaseAsync("mydb");

// Create table
var columns = new List<ColumnDefinition>
{
    new("id", "INTEGER", PrimaryKey: true, AutoIncrement: true),
    new("name", "TEXT", NotNull: true),
    new("email", "TEXT", Unique: true)
};
await client.Databases.CreateTableAsync("mydb.db", "users", columns);

// Insert data
await client.Databases.InsertDataAsync("mydb.db", "users", new Dictionary<string, object>
{
    ["name"] = "John Doe",
    ["email"] = "john@example.com"
});

// Query data
var result = await client.Databases.QueryDataAsync("mydb.db", "users");

Account-Level Authentication

var accountClient = OblienSandboxClient.CreateWithAccountAuth(
    clientId: "YOUR_CLIENT_ID",
    clientSecret: "YOUR_CLIENT_SECRET"
);

// Create sandbox
var sandbox = await accountClient.Auth!.CreateSandboxAsync("my-sandbox");
Console.WriteLine($"Token: {sandbox.Sandbox.Token}");

// List sandboxes
var sandboxes = await accountClient.Auth!.ListSandboxesAsync();

// Delete sandbox
await accountClient.Auth!.DeleteSandboxAsync(sandbox.Sandbox.Id);

Database Operations

// Execute custom SQL
var result = await client.Databases.ExecuteQueryAsync(
    "mydb.db",
    "SELECT * FROM users WHERE age > ?",
    new List<object> { 30 }
);

// Transactions
var transaction = new List<TransactionQuery>
{
    new("UPDATE accounts SET balance = balance - ? WHERE id = ?", new List<object> { 100, 1 }),
    new("UPDATE accounts SET balance = balance + ? WHERE id = ?", new List<object> { 100, 2 })
};
await client.Databases.ExecuteTransactionAsync("mydb.db", transaction);

// Export to JSON
var export = await client.Databases.ExportToJsonAsync("mydb.db", "users");

// Import from JSON
await client.Databases.ImportFromJsonAsync("mydb.db", "users", jsonData);

Workspace Operations

// Git operations
await client.Workspace.GitCloneAsync("https://github.com/user/repo.git", "/opt/app/repo");
await client.Workspace.GitCommitAsync("/opt/app/repo", "Initial commit");

// File operations
var content = await client.Workspace.GetFileAsync("/opt/app/file.txt");
await client.Workspace.EditFileAsync("/opt/app/file.txt", "new content");

// Terminal
var output = await client.Workspace.ExecuteCommandAsync("ls -la", "/opt/app");

// Snapshots
var snapshot = await client.Workspace.CreateSnapshotAsync("backup-1", "Pre-deploy backup");
await client.Workspace.RestoreSnapshotAsync(snapshot.Snapshot.Id);

Environment Variables

Store credentials securely:

export OBLIEN_CLIENT_ID="your_client_id"
export OBLIEN_CLIENT_SECRET="your_client_secret"
export OBLIEN_SANDBOX_TOKEN="your_sandbox_token"
var clientId = Environment.GetEnvironmentVariable("OBLIEN_CLIENT_ID");
var clientSecret = Environment.GetEnvironmentVariable("OBLIEN_CLIENT_SECRET");

Documentation

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 262 10/28/2025