AD
Boost Your Brand on BlueSky—Exclusive banner space to amplify your reach within the BlueSky community.
BSkyInfo LogoBskyInfo
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryArticlesGuidesGlossaryBluesky SDKsSponsor
Submit
All ToolsCategoriesCollectionsFeed DirectoryLabeler DirectoryGuidesGlossaryArticlesBluesky SDKsSponsorSubmit
  1. SDKs
  2. /C#
  3. /X.Bluesky
a-gubskiy

X.Bluesky

A C# SDK for Bluesky and AT Protocol by a-gubskiy

Client for Bluesky

GitHub Stats

46stars
2forks
4contributors
2open issues

Dates

Created:February 4, 2024
Last updated:May 4, 2025

README

The following content is from X.Bluesky's GitHub repository. All rights reserved by the original author.

X.Bluesky

NuGet Version Twitter URL

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
  • Add URLs to posts with automatic preview card generation
  • Specify post language settings
  • Authenticate with Bluesky using an identifier and password
  • Support for session management and reuse
  • 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 SDK (compatible with the version used by the project)
  • An account on Bluesky with an identifier and password

Installation

To use the X.Bluesky library in your project, include it as a dependency in your project's file (e.g., csproj).

See the NuGet package page for the latest version.

Usage

Basic Usage
var identifier = "your.bluesky.identifier";
var password = "your-password-here";

IBlueskyClient client = new BlueskyClient(identifier, password);
// Simple text post
await client.Post("Hello from X.Bluesky!");

// Post with hashtags
await client.Post("Read this post from #devdigest: https://yourlink.com/post/123");

// Post with URL (generates preview card)
await client.Post("Read this post!", new Uri("https://yourlink.com/post/123"));
// Create a client
var client = new BlueskyClient(
identifier,
password,
reuseSession: true,
baseUri: new Uri("https://bsky.social"));
// Create a fully customized post
var post = new Post
{
    Text = "Check out this image with my thoughts on #AI development!",
    Images = new[]
    {
        new Image
        {
            Content = File.ReadAllBytes("path/to/image.jpg"),
            MimeType = "image/jpeg",
            Alt = "A diagram showing AI architecture"
        }
    },
    Url = new Uri("https://yourblog.com/ai-article"),
    Languages = new[] { "en" },
    GenerateCardForUrl = true  // Generate a rich preview card for the URL
};
// Post to Bluesky
await client.Post(post);

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:

// Create a client
var client = new BlueskyClient(
identifier,
password,
reuseSession: true,
baseUri: new Uri("https://bsky.social"));

// Create a fully customized post
var post = new Post
{
    Text = "Check out this image with my thoughts on #AI development!",
    Images = new[]
    {
        new Image
        {
            Content = File.ReadAllBytes("path/to/image.jpg"),
            MimeType = "image/jpeg",
            Alt = "A diagram showing AI architecture"
        }
    },
    Url = new Uri("https://yourblog.com/ai-article"),
    Languages = new[] { "en" },
    GenerateCardForUrl = true  // Generate a rich preview card for the URL
};

// Post to Bluesky
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.

Topics

blueskybluesky-apibluesky-clientbskybsky-clientcsharpdotnetmvpbuzzsocial-network

Related SDKs

drasticactionsFishyFlip

Fishyflip - a .NET ATProtocol/Bluesky Library

101•C#
electricduckbooski

Bluesky cross-poster for inferior services (and a .NET library for ATProto and Bluesky)

4•C#
blowdartidunno.Bluesky

A .NET class library for the Bluesky social network.

70•C#
PassiveModdingatompds

An atproto PDS implementation in .NET (C#)

25•C#
alnkesqAppViewLite

A Bluesky appview focused on low resource consumption

131•C#
shinolabsPinkSea

An oekaki BBS board running on top of the AT Protocol.

77•C#

Resources

GitHub RepositoryProject Website

License

MIT

Author

a-gubskiy
a-gubskiy

Activity

Last commit: May 4, 2025
Commit frequency: Unknown

Our Sponsors

Your Brand Here!

50K+ engaged viewers every month

Limited spots available!

📧 Contact us via email🦋 Contact us on Bluesky
BSkyInfo LogoBskyInfo

The Most Comprehensive Bluesky Tools Directory

Stay updated with the latest Bluesky tools and ecosystem news 🦋

Bluesky butterfly logo
Quick LinksSubmit a ToolSponsorAboutLegal Information
ToolsFeed DirectoryLabeler DirectorySchedulingAnalyticsAll ToolsCategoriesCollectionsTags
ResourcesArticlesBluesky GuidesBluesky GlossaryBluesky SDKsBluesky ResourcesSkyRaffleMeida Coverage
Our ProductsRaffleBlueAiTeach ToolsLaiewAI affiliate listFirsto

This website may contain affiliate links

© 2025 BskyInfo. All rights reserved.