PSBluesky
A set of PowerShell 7 commands packaged as a module that use the BlueSky API. You can skeet and upload images from a PowerShell prompt as well as view your feed and timeline.
Install / Use
/learn @jdhitsolutions/PSBlueskyREADME
PSBluesky

This module is a set of PowerShell functions designed to let you interact with the Bluesky API from a PowerShell 7.x session. Technically, the module commands are wrappers around the AT protocol. The commands in this module are written for PowerShell 7, although it might work as written in Windows PowerShell with minimal changes if you wish to fork the GitHub repository. Commands have not been thoroughly tested for cross-platform compatibility, so please post an Issue if you encounter a problem.
The commands in this module are not intended to provide complete coverage of the Bluesky API or user experience. Instead, the module focuses on the most common tasks you might want to do with Bluesky from a PowerShell prompt or for situations where you want to automate some tasks.
For best results, you should run this module in a PowerShell console that supports emojis and ANSI formatting like Windows Terminal.
Installation
You can install the module from the PowerShell Gallery.
Install-Module -Name PSBluesky
Or using Install-PSResource from the Microsoft.PowerShell.PSResourceGet module.
Install-PSResource -Name PSBluesky -Repository PSGallery -TrustRepository
You might want to also install the following or related modules to securely store your Bluesky credentials:
Module Information
After installing this module, you should end up with these PSBluesky commands:
| Name | Alias | Synopsis | |------|-------|----------| | Add-BskyImage | | Upload an image to Bluesky. | | Block-BskyUser | | Block a Bluesky user account. | | Disable-BskyLogging | | Disable BlueSky API logging. | | Enable-BskyLogging | | Enable BlueSky API logging. | | Export-BskyPreference | | Export PSBlueSky preference settings. | | Find-BskyPost | bsf | Find Bluesky posts. | | Find-BskyUser | bsu | Search for Bluesky user accounts. | | Format-SpectreConsole | Format-Bsky,fsc | Format PSBluesky output for SpectreConsole. | | Get-BskyAccountDID | | Resolve a Bluesky account name to its DID. | | Get-BskyBlockedList | bsblocklist | Get your subscribed blocked lists. | | Get-BskyBlockedUser | bsblock | Get your blocked accounts. | | Get-BskyFeed | bsfeed | Get your Bluesky feed. | | Get-BskyFollowers | bsfollower | Get your Bluesky followers. | | Get-BskyFollowing | bsfollow | Get Bluesky accounts you follow. | | Get-BskyKnownFollowers | | Get known Bluesky followers | | Get-BskyLiked | bsliked | Get your liked Bluesky posts. | | Get-BskyLogging | | Getting PSBlueSky logging settings. | | Get-BskyModuleInfo | | Get a summary of the PSBlueSky module. | | Get-BskyNotification | bsn | Get Bluesky notifications. | | Get-BskyPreference | | Get PSBlueSky formatting preferences. | | Get-BskyProfile | bsp | Get a Bluesky profile. | | Get-BskySession | bss | Show your current Bluesky session. | | Get-BskyStarterPack | | Get Bluesky starter packs. | | Get-BskyStarterPackList | | Get a Bluesky starter pack list. | | Get-BskyTimeline | bst | Get your Bluesky timeline. | | New-BskyFollow | Follow-BskyUser | Follow a Bluesky user. | | New-BskyPost | skeet | Create a Bluesky post. | | Open-BskyHelp | bshelp | Open the PSBluesky help document. | | Publish-BskyPost | Repost-BskyPost | Repost or quote a Bluesky post. | | Remove-BskyFollow | Unfollow-BskyUser | Unfollow a Bluesky user. | | Remove-BskyLogging | | Remove the PSBlueSky API log file. | | Remove-BskyPreferenceFile | | Delete a PSBlueSky preference file. | | Set-BskyLogging | | Configure PSBlueSky API logging. | | Set-BskyPreference | | Set a PSBlueSky formatting preference. | | Start-BSkySession | | Start a new Bluesky session. | | Unblock-BskyUser | | Unblock a Bluesky user account. | | Update-BskySession | Refresh-BskySession | Refresh the Bluesky session token. |
Open-BskyHelp
After importing the module you can run Open-BskyHelp which will open a PDF version of this document in the default application associated with PDF files. Note that not all emojis will render properly in the PDF. Or you can use the -AsMarkdown parameter to read this file using markdown formatting. Not all Markdown features may properly render in the console.
Get-BskyModuleInfo
You can use Get-BskyModuleInfo to get a summary of the module. The default output includes clickable links to online command help and the module's GitHub repository.
PS C:\> Get-BskyModuleInfo
Module: PSBlueSky [v2.8.0]
Name Alias Synopsis
---- ----- --------
Add-BskyImage Upload an image to Bluesky.
Block-BskyUser Block a Bluesky user account.
Disable-BskyLogging Disable BlueSky API logging.
Enable-BskyLogging Enable BlueSky API logging.
Export-BskyPreference Export PSBlueSky preference settings.
Find-BskyPost bsf,Search-BskyPost Find Bluesky posts.
Find-BskyUser bsu Search for Bluesky user accounts.
Format-SpectreConsole Format-Bsky,fsc Format PSBluesky output for SpectreConsole.
Get-BskyAccountDID Resolve a Bluesky account name to its DID.
Get-BskyBlockedList bsblocklist Get your subscribed blocked lists.
Get-BskyBlockedUser bsblock Get your blocked accounts.
Get-BskyFeed bsfeed Get your Bluesky feed.
Get-BskyFollowers bsfollower Get your Bluesky followers.
Get-BskyFollowing bsfollow Get Bluesky accounts you follow.
Get-BskyKnownFollowers Get known Bluesky followers
Get-BskyLiked bsliked Get your liked Bluesky posts.
Get-BskyLogging Get PSBlueSky logging settings.
Get-BskyModuleInfo Get a summary of the PSBlueSky module.
Get-BskyNotification bsn Get Bluesky notifications.
Get-BskyPreference Get PSBlueSky formatting preferences.
Get-BskyProfile bsp Get a Bluesky profile.
Get-BskySession bss Show your current Bluesky session.
Get-BskyStarterPack bssp Get Bluesky starter packs.
Get-BskyStarterPackList bssplist Get a Bluesky starter pack list.
Get-BskyTimeline bst Get your Bluesky timeline.
New-BskyFollow Follow-BskyUser Follow a Bluesky user.
New-BskyPost skeet Create a Bluesky post.
Open-BskyHelp bshelp Open the PSBluesky help document.
Publish-BskyPost Repost-BskyPost Repost or quote a Bluesky post.
Remove-BskyFollow Unfollow-BskyUser Unfollow a Bluesky user.
Remove-BskyLogging Remove the PSBlueSky API log file.
Remove-BskyPreferenceFile Delete a PSBlueSky preference file.
Set-BskyLogging Configure PSBlueSky API logging.
Set-BskyPreference Set a PSBlueSky formatting preference.
Start-BSkySession Start a new Bluesky session.
Unblock-BskyUser Unblock a Bluesky user account.
Update-BskySession Refresh-BskySession Refresh the Bluesky session token.
The output will include clickable links to the online help for each command.
Authentication
Session and Tokens
:coin: In order to send data, you must authenticate. Version 2.0.0 of this module introduced a new session model. After you import the module, you must run Start-BskySession to initialize the module and setup module-scoped variables.
Start-BskySession -credential $cred
The credential must be a PSCredential object representing your Bluesky username (handle) and password. (See below)
This command will create a hidden session object that will be called from other


