npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@harveyrandall/bsky-cli

v1.6.1

Published

A CLI client for Bluesky

Downloads

723

Readme

bsky-cli

CI npm version license downloads

A command-line client for Bluesky, built with TypeScript.

Install

npm / yarn / pnpm / bun

Requires Node.js >= 22.

npm install -g @harveyrandall/bsky-cli
# or
yarn global add @harveyrandall/bsky-cli
# or
pnpm add -g @harveyrandall/bsky-cli
# or
bun add -g @harveyrandall/bsky-cli

Homebrew (macOS / Linux)

brew install harveyrandall/bsky-cli/bsky-cli

Download a binary

Standalone binaries for macOS, Linux, and Windows are attached to every GitHub Release.

git clone https://github.com/harveyrandall/bsky-cli.git
cd bsky-cli
corepack enable
yarn install
yarn build
yarn link:global   # registers `bsky` globally

To uninstall:

yarn unlink:global

Authentication

Interactive login

bsky login alice.bsky.social            # prompts for password (hidden input)
bsky login alice.bsky.social mypassword  # or pass directly

Environment variables

All configuration can be set via environment variables, useful for CI and scripts:

| Variable | Description | |----------|-------------| | BSKY_HANDLE | Bluesky handle | | BSKY_PASSWORD | App password | | BSKY_HOST | PDS host URL (default: https://bsky.social) | | BSKY_BGS | BGS host URL (default: https://bsky.network) | | BSKY_PROFILE | Profile name (same as --profile) |

Precedence: CLI args > environment variables > saved session.

# No login needed - authenticate directly from env
BSKY_HANDLE=alice.bsky.social BSKY_PASSWORD=secret bsky tl

Piped input

echo "$APP_PASSWORD" | bsky login alice.bsky.social

Multiple accounts

Use --profile / -p to manage separate accounts:

bsky login alice.bsky.social -p personal
bsky login bob.bsky.social -p work

bsky tl -p personal
bsky tl -p work
bsky -p ? tl              # list all profiles

Data storage

bsky-cli stores session tokens (never passwords) in platform-appropriate locations:

| Platform | Default path | Override | |----------|-------------|----------| | macOS | ~/Library/Application Support/bsky-cli/ | $XDG_CONFIG_HOME/bsky-cli/ | | Linux | ~/.config/bsky-cli/ | $XDG_CONFIG_HOME/bsky-cli/ | | Windows | %APPDATA%\bsky-cli\ | $XDG_CONFIG_HOME/bsky-cli/ |

Files stored:

  • session.json — session tokens (did, handle, accessJwt, refreshJwt) with 0o600 permissions
  • session-{profile}.json — per-profile sessions
  • drafts/ — locally saved drafts

Where available, session tokens are also stored in the OS keychain (macOS Keychain, GNOME Keyring/libsecret, Windows Credential Manager) with filesystem as fallback.

Passwords are never saved to disk. They are used only during bsky login to obtain session tokens, then discarded from memory.

Commands

Feed

bsky timeline|tl [-H handle] [-n count]
bsky stream [--cursor] [-H handle] [--pattern regex] [--pattern-flags flags]
bsky thread <uri> [-n depth]

Posting

bsky post <text> [--stdin] [-i image...] [--image-alt alt...] [--video path] [--video-alt alt]
bsky reply <uri> <text>
bsky quote <uri> <text>
bsky delete <uri...>

Threads

bsky create-thread <text> [--stdin] [--thread-label] [--draft] [--no-preview]
                          [--split-on <marker>] [--skip-validation]

Splits long text into a thread. Uses /// as the default manual split marker:

bsky create-thread "First post /// Second post /// Third post"
bsky create-thread "Part A --- Part B" --split-on "---"
bsky create-thread --stdin < essay.txt --thread-label

Drafts

bsky drafts list
bsky drafts show <id>
bsky drafts send <id>
bsky drafts delete <id>

Engagement

bsky like <uri...>
bsky unlike <uri...>
bsky likes <uri>
bsky repost <uri...>
bsky remove-repost|unrepost <uri...>
bsky reposts <uri>

Bookmarks

bsky bookmarks create <uri...>
bsky bookmarks delete <uri...>
bsky bookmarks get [-n count]

Social

bsky follow <handle...>
bsky unfollow <handle...>
bsky follows [-H handle]
bsky followers [-H handle]
bsky block <handle...>
bsky unblock <handle...>
bsky blocks
bsky mute <handle...>

Discovery

bsky search <terms...> [-n count]
bsky search-users <terms...> [-n count]

Account

bsky profile [-H handle]
bsky profile-update [displayname] [description] [--avatar file] [--banner file]
bsky session
bsky notifs|notification [-a]
bsky invite-codes [--used]
bsky app-password list|add|revoke
bsky report <handle> [--comment text]
bsky mod-list <handles...> [--name] [--desc]

Utilities

bsky completions bash|zsh|fish

Global flags

| Flag | Description | |------|-------------| | --json | Output as JSON | | -p, --profile <name> | Use a named profile | | -v, --verbose | Verbose output | | --version | Show version |

Shell completions

# Bash
bsky completions bash >> ~/.bashrc

# Zsh
bsky completions zsh >> ~/.zshrc

# Fish
bsky completions fish > ~/.config/fish/completions/bsky.fish

Development

yarn dev             # run via tsx (no build needed)
yarn build           # build to dist/
yarn typecheck       # tsc --noEmit
yarn test:run        # run tests once
yarn test:coverage   # run tests with coverage
yarn link:global     # build + register globally
yarn unlink:global   # remove global symlink

See CONTRIBUTING.md for the full contributor guide.

Roadmap

  • [x] Threads with automatic and manual splitting
  • [x] Drafts with offline sync and partial failure recovery
  • [x] Secure credential storage (OS keychain + session tokens, no plaintext passwords)
  • [ ] List creation and management
  • [ ] Starter packs
  • [ ] Moderation lists
  • [ ] Post labels
  • [ ] Auto alt-text for images and videos
  • [ ] OAuth login support
  • [ ] Docker BuildKit for standalone binary builds

License

MIT