PSA is:
- A PowerShell Module For Making Announcements
- A Beautiful BlueSky Client for the CLI
- An (Almost) Perfect PowerShell Wrapper for the At Protocol
- A GitHub Action to Automate Announcements
To connect to AtProtocol / BlueSky with PSA, simply use Connect-BlueSky:
$myCredential = Get-Credential # Provide your handle or email and an app-password
Connect-BlueSky -Authentication $myCredentialOnce you're connected, you can talk to every part of the At Protocol.
In the At Protocol, users are called "Actors", so, to get a profile, we'd use:
Get-BskyActorProfile -Actor mrpowershell.bsky.socialYou'll see a nice snapshot of a profile:
While this might look nice, it's actually a full object.
You can explore what that object can do by piping it to the PowerShell command, Get-Member
Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache | Get-MemberFor instance, this would show the profile's first 50 posts.
(Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache).PostsAnd this would show the first 50 liked posts.
(Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache).LikesThis shows us the first 50 followers
(Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache).FollowersThis shows us the first 50 follows
(Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache).FollowsTo get more of any of these results, simply get the .More property
# Get the profile
$BlueSkyProfile = (Get-BskyActorProfile -Actor mrpowershell.bsky.social -Cache)
# Get the first 50 posts
$BlueSkyProfile.Posts
# Get the next 50 posts
$BlueSkyProfile.Posts.MorePSA is primarily built automatically.
It uses PipeScript to generate PowerShell commands automatically for every lexicon in the At Protocol.
EZOut is used to add formatting, so that posts and profiles look nice and can be clicked.
PSA can be used as a GitHub Action! Just add these few lines to any job:
- name: Run PSA
uses: StartAutomating/PSA@main
id: PSAThis will import PSA and look thru the workspace for any *.PSA.ps1 files and run them.
Check out PSA's PSA Script for a useful example.
PSA exports 535 commands (118 functions and 417 aliases)
| Name | Synopsis |
|---|---|
| Add-AtProtoModerationReport | com.atproto.moderation.createReport |
| Add-AtProtoRepoRecord | com.atproto.repo.createRecord |
| Add-AtProtoServerAccount | com.atproto.server.createAccount |
| Add-AtProtoServerAppPassword | com.atproto.server.createAppPassword |
| Add-AtProtoServerInviteCode | com.atproto.server.createInviteCode |
| Add-AtProtoServerInviteCodes | com.atproto.server.createInviteCodes |
| Add-AtProtoServerSession | com.atproto.server.createSession |
| Block-BskyGraphActor | app.bsky.graph.muteActor |
| Block-BskyGraphActorList | app.bsky.graph.muteActorList |
| Connect-AtProto | Connects to the AtProtocol |
| Disable-AtProtoAdminAccountInvites | com.atproto.admin.disableAccountInvites |
| Disable-AtProtoAdminInviteCodes | com.atproto.admin.disableInviteCodes |
| Enable-AtProtoAdminAccountInvites | com.atproto.admin.enableAccountInvites |
| Get-AtProtoAdminDefinition | |
| Get-AtProtoAdminInviteCodes | com.atproto.admin.getInviteCodes |
| Get-AtProtoAdminModerationAction | com.atproto.admin.getModerationAction |
| Get-AtProtoAdminModerationActions | com.atproto.admin.getModerationActions |
| Get-AtProtoAdminModerationReport | com.atproto.admin.getModerationReport |
| Get-AtProtoAdminModerationReports | com.atproto.admin.getModerationReports |
| Get-AtProtoAdminRecord | com.atproto.admin.getRecord |
| Get-AtProtoAdminRepo | com.atproto.admin.getRepo |
| Get-AtProtoLabelDefinition | |
| Get-AtProtoModerationDefinition | |
| Get-AtProtoRepo | com.atproto.repo.describeRepo |
| Get-AtProtoRepoRecord | com.atproto.repo.getRecord |
| Get-AtProtoRepoRecords | com.atproto.repo.listRecords |
| Get-AtProtoServer | com.atproto.server.describeServer |
| Get-AtProtoServerAccountInviteCodes | com.atproto.server.getAccountInviteCodes |
| Get-AtProtoServerAppPasswords | com.atproto.server.listAppPasswords |
| Get-AtProtoServerDefinition | |
| Get-AtProtoServerSession | com.atproto.server.getSession |
| Get-AtProtoSyncBlob | com.atproto.sync.getBlob |
| Get-AtProtoSyncBlobs | com.atproto.sync.listBlobs |
| Get-AtProtoSyncBlocks | com.atproto.sync.getBlocks |
| Get-AtProtoSyncCheckout | com.atproto.sync.getCheckout |
| Get-AtProtoSyncHead | com.atproto.sync.getHead |
| Get-AtProtoSyncLatestCommit | com.atproto.sync.getLatestCommit |
| Get-AtProtoSyncRecord | com.atproto.sync.getRecord |
| Get-AtProtoSyncRepo | com.atproto.sync.getRepo |
| Get-AtProtoSyncRepos | com.atproto.sync.listRepos |
| Get-BskyActorDefinition | |
| Get-BskyActorPreferences | app.bsky.actor.getPreferences |
| Get-BskyActorProfile | app.bsky.actor.getProfile |
| Get-BskyActorProfiles | app.bsky.actor.getProfiles |
| Get-BskyActorSuggestions | app.bsky.actor.getSuggestions |
| Get-BskyFeed | app.bsky.feed.getFeed |
| Get-BskyFeedActorFeeds | app.bsky.feed.getActorFeeds |
| Get-BskyFeedActorLikes | app.bsky.feed.getActorLikes |
| Get-BskyFeedAuthorFeed | app.bsky.feed.getAuthorFeed |
| Get-BskyFeedDefinition | |
| Get-BskyFeedGenerator | app.bsky.feed.getFeedGenerator |
| Get-BskyFeedGenerators | app.bsky.feed.getFeedGenerators |
| Get-BskyFeedLikes | app.bsky.feed.getLikes |
| Get-BskyFeedListFeed | app.bsky.feed.getListFeed |
| Get-BskyFeedPosts | app.bsky.feed.getPosts |
| Get-BskyFeedPostThread | app.bsky.feed.getPostThread |
| Get-BskyFeedRepostedBy | app.bsky.feed.getRepostedBy |
| Get-BskyFeedSkeleton | app.bsky.feed.getFeedSkeleton |
| Get-BskyFeedSuggestedFeeds | app.bsky.feed.getSuggestedFeeds |
| Get-BskyFeedTimeline | app.bsky.feed.getTimeline |
| Get-BskyGraphBlocks | app.bsky.graph.getBlocks |
| Get-BskyGraphDefinition | |
| Get-BskyGraphFollowers | app.bsky.graph.getFollowers |
| Get-BskyGraphFollows | app.bsky.graph.getFollows |
| Get-BskyGraphList | app.bsky.graph.getList |
| Get-BskyGraphListBlocks | app.bsky.graph.getListBlocks |
| Get-BskyGraphListMutes | app.bsky.graph.getListMutes |
| Get-BskyGraphLists | app.bsky.graph.getLists |
| Get-BskyGraphMutes | app.bsky.graph.getMutes |
| Get-BskyGraphSuggestedFollowsByActor | app.bsky.graph.getSuggestedFollowsByActor |
| Get-BskyNotifications | app.bsky.notification.listNotifications |
| Get-BskyNotificationUnreadCount | app.bsky.notification.getUnreadCount |
| Get-BskyUnspeccedDefinition | |
| Get-BskyUnspeccedPopular | app.bsky.unspecced.getPopular |
| Get-BskyUnspeccedPopularFeedGenerators | app.bsky.unspecced.getPopularFeedGenerators |
| Get-BskyUnspeccedTimelineSkeleton | app.bsky.unspecced.getTimelineSkeleton |
| Invoke-AtProto | Invokes the AT Protocol |
| Invoke-AtProtoAdminModerationAction | com.atproto.admin.takeModerationAction |
| Register-BskyNotificationPush | app.bsky.notification.registerPush |
| Remove-AtProtoRepoRecord | com.atproto.repo.deleteRecord |
| Remove-AtProtoServerAccount | com.atproto.server.deleteAccount |
| Remove-AtProtoServerSession | com.atproto.server.deleteSession |
| Request-AtProtoServerAccountDelete | com.atproto.server.requestAccountDelete |
| Request-AtProtoServerEmailConfirmation | com.atproto.server.requestEmailConfirmation |
| Request-AtProtoServerEmailUpdate | com.atproto.server.requestEmailUpdate |
| Request-AtProtoServerPasswordReset | com.atproto.server.requestPasswordReset |
| Request-AtProtoSyncCrawl | com.atproto.sync.requestCrawl |
| Reset-AtProtoServerPassword | com.atproto.server.resetPassword |
| Resolve-AtProtoAdminModerationReports | com.atproto.admin.resolveModerationReports |
| Resolve-AtProtoIdentityHandle | com.atproto.identity.resolveHandle |
| Revoke-AtProtoServerAppPassword | com.atproto.server.revokeAppPassword |
| Search-AtProtoAdminRepos | com.atproto.admin.searchRepos |
| Search-AtProtoLabels | com.atproto.label.queryLabels |
| Search-BskyActors | app.bsky.actor.searchActors |
| Search-BskyActorsTypeahead | app.bsky.actor.searchActorsTypeahead |
| Search-BskyFeedPosts | app.bsky.feed.searchPosts |
| Search-BskyUnspeccedActorsSkeleton | app.bsky.unspecced.searchActorsSkeleton |
| Search-BskyUnspeccedPostsSkeleton | app.bsky.unspecced.searchPostsSkeleton |
| Send-AtProto | Sends to the At Protocol |
| Send-AtProtoAdminEmail | com.atproto.admin.sendEmail |
| Set-AtProtoRepoBlob | com.atproto.repo.uploadBlob |
| Set-AtProtoRepoRecord | com.atproto.repo.putRecord |
| Set-AtProtoRepoWrites | com.atproto.repo.applyWrites |
| Set-BskyActorPreferences | app.bsky.actor.putPreferences |
| Set-BskyUnspeccedLabels | app.bsky.unspecced.applyLabels |
| Sync-AtProtoServerSession | com.atproto.server.refreshSession |
| Unblock-BskyGraphActor | app.bsky.graph.unmuteActor |
| Unblock-BskyGraphActorList | app.bsky.graph.unmuteActorList |
| Undo-AtProtoAdminModerationAction | com.atproto.admin.reverseModerationAction |
| Update-AtProtoAdminAccountEmail | com.atproto.admin.updateAccountEmail |
| Update-AtProtoAdminAccountHandle | com.atproto.admin.updateAccountHandle |
| Update-AtProtoIdentityHandle | com.atproto.identity.updateHandle |
| Update-AtProtoServerEmail | com.atproto.server.updateEmail |
| Update-AtProtoTempRepoVersion | com.atproto.temp.upgradeRepoVersion |
| Update-BskyNotificationSeen | app.bsky.notification.updateSeen |
| Watch-AtProtoLabels | com.atproto.label.subscribeLabels |
| Watch-AtProtoSyncRepos | com.atproto.sync.subscribeRepos |
| Watch-AtProtoSyncUpdate | com.atproto.sync.notifyOfUpdate |


