X.Bluesky 3.0.1

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

X.Bluesky

NuGet Version NuGet Downloads Sponsor on GitHub Subscribe on X

The X.Bluesky is a .NET library designed to make it easy for developers to post messages to Bluesky, a decentralized social network.

By leveraging the Bluesky API, this project allows for straightforward integration into .NET applications, enabling posts to be made programmatically.

Features

  • Post text messages directly to Bluesky
  • Attach images to posts with support for alt text and aspect ratio
  • Add URLs to posts with automatic preview card generation
  • Specify post language settings
  • Authenticate with Bluesky using an identifier and password
  • Session reuse between posts
  • Automatically generate tags, mentions and URL cards
  • Customizable base URI for different Bluesky instances
  • Embed external content with rich preview cards

Getting Started

Prerequisites

  • .NET 10 or .NET 11
  • A Bluesky account identifier (handle or email) and password (an app password is recommended)

Installation

dotnet add package X.Bluesky

Targets net10.0 and net11.0.

Usage

Basic Usage
using X.Bluesky;

var identifier = "your.bluesky.identifier";
var password = "your-app-password";

IBlueskyClient client = new BlueskyClient(identifier, password);

// Simple text post
await client.Post("Hello from X.Bluesky!");

// Post with hashtags and a link (a preview card is generated for the link)
await client.Post("Read this post from #devdigest: https://yourlink.com/post/123");

// Post with an explicit URL (generates preview card)
await client.Post("Read this post!", new Uri("https://yourlink.com/post/123"));

The client can also be created with a custom base URL, IHttpClientFactory and ILogger<BlueskyClient> (all optional):

var client = new BlueskyClient(
    identifier,
    password,
    baseUrl: new Uri("https://bsky.social"),
    httpClientFactory: httpClientFactory,
    logger: logger);
Advanced Usage with Post Object

The core method of the library is Post(Models.Post post), which gives you full control over your post content:

using X.Bluesky;
using X.Bluesky.Models;

IBlueskyClient client = new BlueskyClient(identifier, password);

var post = new Post
{
    Text = "Check out this image with my thoughts on #AI development!",
    Images =
    [
        new Image
        {
            Content = await File.ReadAllBytesAsync("path/to/image.jpg"),
            MimeType = "image/jpeg",
            Alt = "A diagram showing AI architecture",
            Width = 1200,  // Optional: with Height, provides an aspect ratio hint
            Height = 800
        }
    ],
    Url = new Uri("https://yourblog.com/ai-article"),
    Languages = ["en"],
    GenerateCardForUrl = true  // Generate a rich preview card for the URL (ignored when images are attached)
};

await client.Post(post);

The Post object allows you to combine multiple elements like text, images, URLs, and metadata in a single post. This is especially useful for more complex posts that require fine-grained control over the content and presentation.

License

This project is licensed under the MIT License. See LICENSE.md for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
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
3.0.1 99 11/17/2026
3.0.0 91 11/17/2026
2.0.7 6,125 8/21/2025
2.0.5 276 8/18/2025
2.0.4 1,653 3/23/2025
2.0.3 340 3/22/2025
2.0.1-beta 212 3/22/2025
2.0.0-beta 204 3/21/2025
1.3.0 4,213 12/12/2024
1.2.1-pre 225 11/27/2024
1.1.7 1,330 11/19/2024
1.1.5-beta 720 11/17/2024
1.1.4-beta 238 11/16/2024
1.1.3-beta 275 11/14/2024
1.1.0 471 9/12/2024
1.0.3 426 7/9/2024
1.0.1 658 2/6/2024