NexusConnect 0.3.0-alpha

This is a prerelease version of NexusConnect.
dotnet add package NexusConnect --version 0.3.0-alpha
                    
NuGet\Install-Package NexusConnect -Version 0.3.0-alpha
                    
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="NexusConnect" Version="0.3.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NexusConnect" Version="0.3.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="NexusConnect" />
                    
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 NexusConnect --version 0.3.0-alpha
                    
#r "nuget: NexusConnect, 0.3.0-alpha"
                    
#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 NexusConnect@0.3.0-alpha
                    
#: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=NexusConnect&version=0.3.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=NexusConnect&version=0.3.0-alpha&prerelease
                    
Install as a Cake Tool

NexusConnect: The Fluent API Orchestrator

NuGet version License: MIT

NexusConnect is a .NET orchestration library that unifies multiple service APIs (like GitHub, Twitter, etc.) under a single, fluent, and intuitive syntax. It is designed to maximize the developer experience (DX).

"Stop juggling SDKs. Start writing logic."

What Problem Does It Solve?

Developing a modern application often requires integration with dozens of third-party services. Each service (GitHub, Dropbox, Slack, Twitter...) has its own SDK, its own authentication logic, and its own design philosophy. This leads to:

  • A steep learning curve for each new integration.
  • Inconsistency across the codebase.
  • Dozens of lines of boilerplate code for even simple operations.

NexusConnect solves these problems by abstractacting all these different APIs behind a single, consistent, and fluent interface.

Core Usage (Quick Start)

With NexusConnect, complex API interactions become self-documenting, readable, chained method calls:

// Creating a GitHub issue and getting its details has never been easier.
var newIssue = await Connect.To<GitHubProvider>()
                            .WithToken("YOUR_PERSONAL_ACCESS_TOKEN")
                            .As<IGitHubActions>()
                            .CreateIssue("New Idea: An Awesome Feature", "We should definitely implement this feature.");

Console.WriteLine($"Successfully created issue #{newIssue.Number}! URL: {newIssue.Url}");

Getting Started

1. Installation

Add the NexusConnect library to your project using the NuGet Package Manager:

dotnet add package NexusConnect

2. Configuration

At your application's entry point (e.g., Program.cs), register the providers you intend to use. This teaches the library how each provider should be constructed.

using NexusConnect.Core;
using NexusConnect.Core.Providers;

public static void Main(string[] args)
{
    // Register your providers
    NexusConnector.Configure(config =>
    {
        config.RegisterProvider<GitHubProvider>(() => 
            new GitHubProvider("YOUR_USERNAME", "YOUR_REPO_NAME")
        );
    });

    // (Optional) Set a default token for the entire application lifecycle
    NexusConnector.SetDefaultToken("YOUR_SECRET_TOKEN_HERE");

    // ... rest of your application
}

Features & Examples

GitHub Provider (GitHubProvider)

The GitHubProvider allows you to interact with the GitHub API.

Using the Default Token

If you have set a default token during configuration, you can use the .WithDefaultToken() method to avoid passing the token on every call.

// Assumes NexusConnector.SetDefaultToken() has been called at startup.
var issues = await Connect.To<GitHubProvider>()
                          .WithDefaultToken()
                          .As<IGitHubActions>()
                          .GetIssues();
Creating an Issue
var issue = await Connect.To<GitHubProvider>()
                         .WithToken(githubToken)
                         .As<IGitHubActions>()
                         .CreateIssue("Critical Bug", "The application crashes on the main page.");
Listing Issues

By default, GetIssues fetches open issues.

var openIssues = await Connect.To<GitHubProvider>()
                              .WithToken(githubToken)
                              .As<IGitHubActions>()
                              .GetIssues();

You can use the IssueState enum to list closed or all issues:

var closedIssues = await Connect.To<GitHubProvider>()
                                .WithToken(githubToken)
                                .As<IGitHubActions>()
                                .GetIssues(IssueState.Closed);
Getting a Single Issue
int issueNumber = 42;
var issue = await Connect.To<GitHubProvider>()
                         .WithToken(githubToken)
                         .As<IGitHubActions>()
                         .GetIssueByNumber(issueNumber);
Updating an Issue

You only need to specify the fields you want to change.

// Change the title of issue #42 and close it.
var updatedIssue = await Connect.To<GitHubProvider>()
                                .WithToken(githubToken)
                                .As<IGitHubActions>()
                                .UpdateIssue(42, title: "UPDATED - Critical Bug Fixed", state: IssueState.Closed);
Creating a Comment on an Issue

You can easily add a new comment to any existing issue using its number.

// Adds a new comment to issue #42
var createdComment = await Connect.To<GitHubProvider>()
                                  .WithToken(githubToken)
                                  .As<IGitHubActions>()
                                  .CreateComment(42, "I've investigated this bug and I have a potential fix.");

Console.WriteLine($"Successfully posted a new comment! URL: {createdComment.Url}");

Contributing

This project welcomes community contributions. Bug reports, feature requests, and pull requests are highly appreciated.

License

This project is licensed under the MIT License.

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.
  • net8.0

    • No dependencies.

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
0.3.0-alpha 90 8/8/2025
0.2.0-alpha 168 8/7/2025
0.1.0-alpha 165 8/6/2025

Initial alpha release of the core framework and the fully-featured GitHub provider.