Starrysky 1.0.4

dotnet tool install --global Starrysky --version 1.0.4                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Starrysky --version 1.0.4                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Starrysky&version=1.0.4                
nuke :add-package Starrysky --version 1.0.4                

Starrysky

Logo

License: MIT Nuget Release Please Open in VS Code

Starrysky is a .NET tool that posts a random GitHub star to Bluesky. It helps you share interesting repositories you have starred on GitHub with your Bluesky followers.

Installation

To install Starrysky as a global .NET tool, run the following command:

dotnet tool install --global Starrysky

Usage

To use Starrysky, run the following command:

starrysky [OPTIONS]

Synopsis

starrysky [-h|--help]
    [-t|--token <TOKEN>]
    [--handle <HANDLE>]
    [-p|--password <PASSWORD>]
    [-d|--dry-run {true|false}]
    [-c|--caching {true|false}]
    [-f|--footer {true|false}]
    [--header <HEADER>]

Options

  • -h|--help Prints help information.

  • -t|--token (default: null)

    Token for access to the GitHub API. This can also be set in the Starrysky__GitHubToken environment variable.

  • --handle (default: null)

    Handle of the Bluesky account. This can also be set in the Starrysky__BlueskyHandle environment variable.

  • -p|--password (default: null)

    Password for the Bluesky account. This can also be set in the Starrysky__BlueskyPassword environment variable.

  • -d|--dry-run (default: false)

    Prints the post to the console without posting to Bluesky or saving history.

  • -c|--caching (default: false)

    Enables caching of the starred GitHub repositories retrieved from the GitHub API. This is useful during development and testing if you have a large number of starred repositories. The cached API results are stored in a repos.json file in the working directory.

  • --footer (default: true)

    Include a footer in the post with a link to this project. This is intended to allow others to discover the project and hopefully use it themselves.

  • --header (default: null)

    A custom header to use for the post instead of the standard header text.

GitHub Action

You can run the Starrysky command line tool in a GitHub Action. This is a convenient way of automating your posts without incurring any hosting costs. Here is an example of a workflow that posts a random GitHub star to Bluesky daily:

name: Daily Bluesky Post

on:
  schedule:
    - cron: '0 0 * * *'
  workflow_dispatch:
    inputs:
      dryRun:
        required: false
        default: false
        description: "Execute a dry-run that does not post to Bluesky"
        type: boolean

jobs:
  post:
    name: Post to Bluesky
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4.2.2
        with:
          fetch-depth: 0
          filter: tree:0

      - name: Setup .NET SDK
        uses: actions/setup-dotnet@v4.2.0
        with:
          dotnet-version: '9.0.x'

      - name: Install global tool
        run: dotnet tool install --global Starrysky

      - name: Execute global tool
        run: >-
          starrysky
          --token ${{ secrets.GH_TOKEN }}
          --handle ${{ secrets.BLUESKY_HANDLE }}
          --password ${{ secrets.BLUESKY_PASSWORD }}
          --dry-run ${{ inputs.dryRun || false }}

To use this workflow ensure that you have added secrets to your repository for the GH_TOKEN, BLUESKY_HANDLE, and BLUESKY_PASSWORD.

For the GH_TOKEN secret use a fine-grained token and ensure its access is restricted to the repository containing the GitHub workflow.

Repository permissions:

  • Read access to metadata
  • Read and Write access to code

User permissions:

  • Read access to starring

These are permissions are required to query the GitHub API for your starred repositories and to commit the history.json file containing a list of repositories that have been posted to Bluesky.

You can generate a Bluesky App Password for the BLUESKY_PASSWORD secret.

Update the cron expression to a time (UTC) that works best for your target audience.

The workflow includes the workflow_dispatch event to allow for manual triggering from the GitHub frontend. When triggering a manual run of the workflow an input is provided to optionally perform a dry-run.

Credits

Starrysky uses the following libraries (be sure to check them out):

Icon made by meaicon from www.flaticon.com

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.4 34 2/6/2025
1.0.3 71 2/4/2025
1.0.2 51 2/4/2025