Skip to content

Command Line Reference

bills-appworks edited this page Mar 30, 2025 · 62 revisions

Compatible version: v0.16.0

Format of this document

The part enclosed in <> means to specify the corresponding string. For example, <password> is intended to be used to enter a password string in its place.

Parts enclosed in [] mean they can be omitted. For example, [--password <password>] is intended to mean that the --password option and entering the password string are optional.

... means that the part before it can be specified multiple times.

General format

bsky [<global options>] <command> [<parameters>]

<global options> are options that control the general behavior of the bsky command. See Global options for details.

<command> specifies the function that the bsky command performs. See the Reference by command for details. Currently, most commands require a session to be established using the login command.

<parameters> are options that controls the behavior of <command>. For details, see Reference by command.

Global options

Specifying the profile (-P, --profile)

Specify the profile targeted by the bsky command (= the name that identifies the account for which the command is executed). It can be used even if it is not specified. If you specify a profile, the account that logged in with that profile specified will be targeted.

Tip

bsky login --handle A
bsky --profile B login --handle B
bsky --profile C login --handle C
bsky timeline  # <- Display the timeline of account (handle) A
bsky --profile B timeline  # <- Display the timeline of account (handle) B
bsky --profile C timeline  # <- Display the timeline of account (handle) C

The format of the option part is as follows:

-P <profile name>

or

--profile <profile name>

<profile name> specifies any character string that meets the following conditions. Can be the same as or different from the handle name.

  • The first character is alphanumeric character.
  • The second and subsequent characters are alphanumeric characters, . (period), _ (underscore), - (hyphen).

Force session refresh (--session-refresh)

In order to manage the session (login status) with the Bluesky server, information identifying the session is exchanged with the Bluesky server. This information is updated periodically for security reasons. Therefore, if you use the bsky command to connect to the Bluesky server using expired session identification information, an expired error will occur. The bsky command detects expiration errors and automatically updates session identification information.

If you are unable to connect to the Bluesky server for some reason due to session information, specifying this option will force an update, which may resolve the issue. However, please use it only when a problem occurs and do not specify it unnecessarily.

The format of the option part is as follows:

--session-refresh

Version information display

Displays version information of the bsky command. If this option is specified, other options and commands are ignored.

The format of the option part is as follows:

--version

Command

Below is a list of commands as of the time this document was created/updated. Please note that there may be differences from the actual situation due to maintenance reasons.

You can display help for each command by specifying help next to each command as shown below.

bsky <command> help

Command name Overview Reference by command
login Establishes a session with the specified account (handle). Login (login)
logout Discards the current session. Logout (logout)
timeline Displays your own account's timeline. Timeline display (timeline)
feed Displays a custom feed (feed generator). Custom feed display (feed)
author-feed Displays the specified user's feed (posts). Specified user feed display (author-feed)
post Posts a post (currently text only). Post (post)
posts Make multiple posts (thread posts, etc.). Multiple posts (posts)
reply Reply to the specified post. Reply (reply)
repost Repost (share to followers) the specified post. Repost (repost)
quote Quoting the specified post and posting it (currently text only). Quote post (quote)
like Like the specified post. Like (like)
thread Displays the thread (reply relationship) regarding the specified post. Displaying threads (reply-related posts) (thread)
profile Displays the specified user's profile. Profile display (profile)
social Displays the specified user's social information (follows/followers). Social display (social)
info Displays information related to the bsky command. Displaying bsky command related information (info)
size Displays the number of characters in the specified text. Size display (size)
update Update the tool. Tool update (update)
help Display help information for a list of commands. Command list help display (help)
version Displays version information for the bsky command. bsky command version number display (version)

Reference by command

Details for each command outlined in Command are provided below.

Login (login)

Performs authentication and establishes a session (login state) with the specified account.

bsky login [--handle <handle name>] [--password <password>]

  • For , specify the username of the Bluesky account you are using. The at sign at the beginning of the username is not required. Login using email address is not possible at this time. For the Bluesky default account, the domain name (.bsky.social) is optional. You can also specify a domain that you have set up yourself.
  • For , specify the password corresponding to the handle (user name). It is recommended to use an app password.

If you omit either or both of --handle and --password, a prompt will appear on the screen allowing you to enter the omitted item.

Authentication also supports 2FA (two-factor authentication). If 2FA is enabled, you will be asked to enter the sign in code. An email with a sign in code will be sent to the email address registered in your account. Enter the sign in code in the email to complete the authentication.

Logout (logout)

Discards the session (login state).

bsky logout

Timeline display (timeline)

Displays the timeline of the account you are logged in to (posts by yourself and users you follow, etc.).

bsky timeline [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

  • --limit <maximum number of posts> indicates the maximum number of posts to display. The specified number of posts may not always be displayed, such as deleted posts, etc., which are not displayed even if they are counted. You can specify a value from 1 to 100 (default is 50 if the --limit option is omitted).
  • --next instructs to display the continuation of the number of items displayed with the previous timeline command.
  • --output-langs instructs to display tha language information specified at the time of posting.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-via instructs to display the name of the client (app) used for the post, if the information exists in the post data (unofficial field via).
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getTimeline. The --output-langs, --output-id and --output-via options are ignored.

Custom feed display (feed)

Displays posts from the specified custom feed (feed generator).

bsky feed --actor <handle or DID> --record-key <record key> [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky feed --handle <handle> --record-key <record key> [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky feed --did <DID> --record-key <record key> [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky [--url] <bsky.app feed URL> [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

  • --actor, --handle, --did specify the user who created the custom feed (feed generator). The only difference between them is the type of handle and DID (internal ID that indicates the user) that can be specified.
  • --record-key <record key> is an identification string for the user creating the custom feed (feed generator). For example, a typical record key for bsky.app users is whats-hot (the one suggested as "Discover" when creating an account).
  • [--url] <bsky.app feed URL> specifies the URL to display the custom feed (feed generator) in the Bluesky official client. Generally, the format is as follows.
    • https://bsky.app/profile/<handle or DID>/feed/<record key>
    • For example, the feed URL for bsky.app user's whats-hot record key is as follows:
    • https://bsky.app/profile/bsky.app/feed/whats-hot
  • --limit <maximum number of posts> indicates the maximum number of posts to display. The specified number of posts may not always be displayed, such as deleted posts, etc., which are not displayed even if they are counted. You can specify a value from 1 to 100 (default is 50 if the --limit option is omitted).
  • --next instructs to display the continuation of the number of items displayed with the previous feed command.
  • --output-langs instructs to display tha language information specified at the time of posting.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-via instructs to display the name of the client (app) used for the post, if the information exists in the post data (unofficial field via).
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getFeed. The --output-langs, --output-id and --output-via options are ignored.

Specified user feed display (author-feed)

Displays the feed (posts) of the specified user.

bsky author-feed --actor <handle or DID> [--filter <filter>] [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky author-feed --handle <handle> [--filter <filter>] [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky author-feed --did <DID> [--filter <filter>] [--limit <maximum display count>] [--next] [--output-langs] [--output-id] [--output-via] [--output-json]

  • --actor, --handle, --did specify the user who created the custom feed (feed generator). The only difference between them is the type of handle and DID (internal ID that indicates the user) that can be specified.
  • --filter <filter> indicates the type of posts to display. The following can be specified.
String specified in <filter> Filter summary
posts-with-replies Displays posts with replies. This is the default if the --filter option is not specified.
posts-no-replies Displays posts that do not contain replies.
posts-with-media Displays posts that have attached (embedded) media such as images.
posts-and-author-threads Displays posts without replies and threads of only the specified user.
  • --limit <maximum number of posts> indicates the maximum number of posts to display. The specified number of posts may not always be displayed, such as deleted posts, etc., which are not displayed even if they are counted. You can specify a value from 1 to 100 (default is 50 if the --limit option is omitted).
  • --next instructs to display the continuation of the number of items displayed with the previous author-feed command.
  • --output-langs instructs to display tha language information specified at the time of posting.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-via instructs to display the name of the client (app) used for the post, if the information exists in the post data (unofficial field via).
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getAuthorFeed. The --output-langs, --output-id and --output-via options are ignored.

Post (post)

Make a post.

bsky post [--text '<text>'] [--text-file '<path to text file>'] [--linkcard-index <link index>] [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

bsky post [--text '<text>'] [--text-file '<path to text file>'] [--image<N> <path to image file> [--alt<N> '<alt text>']]... [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

bsky post [--text '<text>'] [--text-file '<path to text file>'] [--video <path to video file> [--alt '<alt text>']]... [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

  • --text '<text>' specifies the text to post. It is recommended to use single quotes to prevent spaces, newlines, and escaped characters from being interpreted by the shell.
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --text-file '<path to text file>' specifies the path of the file containing the text to be posted. Only a single file can be specified.
    • Example: --text-file '/path/to/a.txt'
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --linkcard-index <link index> specifies the link URL to display in the link card when the text contains a link URL. If this option is omitted, it is assumed that <link index> is set to 1 (targeting the first link URL).
    • <link index> specifies a number. Specify the appearance order number of multiple link URLs that exist in the text to generate a link card. If you specify 0, no link card will be generated.
  • --image<N> <path to image file> specifies the image to be attached to the post. Up to 4 can be specified.
    • <N> specifies a number from 1 to 4. If omitted, it is the same as specifying 1. Specify it after --image without any spaces.
  • --alt<N> '<alt text>' specifies the ALT (alternative) text for the image/video. This is the description of the image provided for visually impaired and low vision people.
    • (image only) <N> specifies a number from 1 to 4 that corresponds to the image specified in --image<N>. If omitted, it is the same as specifying 1. Specify it after --alt without any spaces.
  • --video <path to video file> specifies the video to be attached to the post. Only one can be specified.
  • --url <display mode> specifies how the URL contained in the post text is displayed. The following can be specified.
String specified for <display mode> URL display method
omit-tail If the URL is longer than a certain length, it will be shortened by omitting the last part. This is the default if the --url option is not specified.
omit-middle If the URL is longer than a certain length, it will be shortened by omitting the middle part.
full Makes the URL as specified without shortening it. However, depending on the display client, it may be abbreviated.
  • --langs '<language code>[,...]' specifies the language code (en, ja, pt, etc.) included in the post. For multiple language codes, specify them as a comma-separated list.
  • --preview does not actually post, but only displays (previews) the content of the post for confirmation.
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getPosts.

The post will be displayed as the execution result.

For information on valid formatting within the text (such as links and hashtags), see Post text format.

Only one of the --text option and the --text-file option can be specified.

Text can be specified from standard input (pipe/redirect/interactive). If none of the --text option, --text-file option, and standard input (pipe/redirect) are specified, input will be interactive.

If you specify an image/video, a link card will not be generated even if a link URL exists in the text.

Newlines at the end of text are ignored.

Multiple posts (posts)

Make multiple posts. You can select thread posts, etc. Currently only text can be specified.

bsky posts [--mode <multiple post mode>] [--text '<text>'] [--text-files '<file path>[:...]'] [--url <display mode>] [--langs '<language code>[,...]'] [--separator-prefix '<delimiter string>'] [--preview] [--output-json]

  • --mode <multiple post mode> specifies the relationship between multiple posts. The following can be specified.
String specified for <multiple post mode> Posting operation overview
thread Posts other than the first are replies to the previous post. This is the default if the --mode option is not specified.
sibling Posts other than the first post are replies to the first post.
independence All posts are independent posts and are not related to replies.
  • --text '<text>' specifies the text to post. It is recommended to use single quotes to prevent spaces, newlines, and escaped characters from being interpreted by the shell.
  • --text-files '<file path>[:...]' specifies the path of the file containing the text to be posted. Specify multiple file paths by separating them with colons.
    • Example: --text-files '/path/to/a.txt:/path/to/b.txt'
  • --url <display mode> specifies how the URL contained in the post text is displayed. The following can be specified.
String specified for <display mode> URL display method
omit-tail If the URL is longer than a certain length, it will be shortened by omitting the last part. This is the default if the --url option is not specified.
omit-middle If the URL is longer than a certain length, it will be shortened by omitting the middle part.
full Makes the URL as specified without shortening it. However, depending on the display client, it may be abbreviated.
  • --langs '<language code>[,...]' specifies the language code (en, ja, pt, etc.) included in the post. For multiple language codes, specify them as a comma-separated list.
  • --separator-prefix '<separator string>' splits posts within a single specified text (--text option, a file specified by the --text-files option, or standard input) at lines starting with the specified <separator string>.
    • The delimiter line itself is excluded from the post.
    • In the delimiter line, everything from <separator string> to the end of the line (line break) is ignored (treated as a comment).
    • If the content of the separated unit is just a line break, that part will be excluded from the post.
  • --preview does not actually post, but only displays (previews) the content of the post for confirmation.
  • --output-json outputs in JSON format. The content will change depending on the --mode option.
String specified for <multiple post mode> in the --mode option JSON output content
thread This is the response content for the API app.bsky.feed.getPostThread, which specifies the first post.
sibling This is the response content for the API app.bsky.feed.getPostThread, which specifies the first post.
independence This is the response content for the API app.bsky.feed.getPosts, which specifies all posts.

The post will be displayed as the execution result.

For information on valid formatting within the text (such as links and hashtags), see Post text format.

Text can be specified from standard input (pipe/redirect/interactive). If none of the --text option, --text-files option, and standard input (pipe/redirect) are specified, input will be interactive.

Standard input (pipe/redirect), --text option, and --text-files option can be specified at the same time. The order of multiple submissions will be text specified in standard input -> text specified in --text -> files specified in --text-files.

The total maximum number of posts will be 10.

Images and link index are not currently supported.

Newlines at the end of text are ignored.

  • If the separator string (delimiter line) is enabled by specifying the --separator-prefix option, you can use the "delimited section option directive" function. You can specify some command line options by writing % as the character immediately after the separator string in the delimiter line.
    • This allows you to specify options by writing them in text (file) without having to specify them on the command line (or even if you forget to specify them).
    • You can also change options for each section. For example, posts in the first section can specify langs in English, posts in the second section can specify langs in Japanese, and posts in the third section can specify langs in Portuguese. -The specification by the delimited section option directive is carried over to subsequent posts within the command (separate section, separate file, separate parameter).
    • Valid options for the delimited section option directive are: If you specify anything other than the following, an error will occur.
      • --url <display mode>
      • --langs '<language code>[,...]'
    • The following is an example of specifying the delimited section option directive (the separator string is '########').
      ########% --langs 'en'
      ######## This post language is English.
      Hello!
      ########% --langs 'ja'
      ######## This post language is Japanese.
      こんにちは!
      ########% --langs 'pt'
      ######## This post language is Portuguese.
      Olá!
      

Reply (reply)

Reply to the specified post.

bsky reply --index <index> [--text '<text>'] [--text-file '<path to text file>'] [--image<N> <path to image file> [--alt<N> '<alt text>']]... [--linkcard-index <link index>] [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

bsky reply --uri <AT-URI> --cid <CID> [--text '<text>'] [--text-file '<path to text file>'] [--image<N> <path to image file> [--alt<N> '<alt text>']]... [--linkcard-index <link index>] [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

  • --index <index> specifies the value of [ViewIndex:<index>] that is displayed at the beginning of posts displayed using timeline or feed commands, etc. This will indicate the post to which you are replying.
  • --uri <AT-URI> and --cid <CID> specify the value that will be displayed ([uri:<AT-URI>], [cid:<CID>]) when the --output-id option is specified with the timeline or feed command. This will indicate the post to which you are replying.
  • --text '<text>' specifies the text to post. It is recommended to use single quotes to prevent spaces, newlines, and escaped characters from being interpreted by the shell.
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --text-file '<path to text file>' specifies the path of the file containing the text to be posted. Only a single file can be specified.
    • Example: --text-file '/path/to/a.txt'
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --image<N> <path to image file> specifies the image to be attached to the post. Up to 4 can be specified.
    • <N> specifies a number from 1 to 4. If omitted, it is the same as specifying 1. Specify it after --image without any spaces.
  • --alt<N> '<alt text>' specifies the ALT (alternative) text for the image. This is the description of the image provided for visually impaired and low vision people.
    • <N> specifies a number from 1 to 4 that corresponds to the image specified in --image<N>. If omitted, it is the same as specifying 1. Specify it after --alt without any spaces.
  • --linkcard-index <link index> specifies the link URL to display in the link card when the text contains a link URL. If this option is omitted, it is assumed that <link index> is set to 1 (targeting the first link URL).
    • <link index> specifies a number. Specify the appearance order number of multiple link URLs that exist in the text to generate a link card. If you specify 0, no link card will be generated.
  • --url <display mode> specifies how the URL contained in the post text is displayed. The following can be specified.
String specified for <display mode> URL display method
omit-tail If the URL is longer than a certain length, it will be shortened by omitting the last part. This is the default if the --url option is not specified.
omit-middle If the URL is longer than a certain length, it will be shortened by omitting the middle part.
full Makes the URL as specified without shortening it. However, depending on the display client, it may be abbreviated.
  • --langs '<language code>[,...]' specifies the language code (en, ja, pt, etc.) included in the post. For multiple language codes, specify them as a comma-separated list.
  • --preview does not actually post, but only displays (previews) the content of the post for confirmation.
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getPosts.

The post will be displayed as the execution result.

For information on valid formatting within the text (such as links and hashtags), see Post text format.

Only one of the --text option and the --text-file option can be specified.

Text can be specified from standard input (pipe/redirect/interactive). If none of the --text option, --text-file option, and standard input (pipe/redirect) are specified, input will be interactive.

If you specify an image, a link card will not be generated even if a link URL exists in the text.

Newlines at the end of text are ignored.

Repost (repost)

Repost (share to your followers) the specified post.

bsky repost --index <index> [--output-json]

bsky repost --uri <AT-URI> --cid <CID> [--output-json]

  • --index <index> specifies the value of [ViewIndex:<index>] that is displayed at the beginning of posts displayed using timeline or feed commands, etc. This will indicate the post to be reposted.
  • --uri <AT-URI> and --cid <CID> specify the value that will be displayed ([uri:<AT-URI>], [cid:<CID>]) when the --output-id option is specified with the timeline or feed command. This will indicate the post to be reposted.
  • --output-json outputs in JSON format. The content is as follows. The --output-id option is ignored.
{
  "repost":<Response content of API com.atproto.repo.createRecord>,
  "original":<Response content of API app.bsky.feed.getPosts>
}

As the execution result, the post to be reposted and the repost uri (AT-URI) will be displayed.

Quote post (quote)

Quoting and posting the specified post.

bsky quote --index <index> [--text '<text>'] [--text-file '<path to text file>'] [--linkcard-index <link index>] [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

bsky quote --uri <AT-URI> --cid <CID> [--text '<text>'] [--text-file '<path to text file>'] [--image<N> <path to image file> [--alt<N> '<alt text>']]... [--linkcard-index <link index>] [--url <display mode>] [--langs '<language code>[,...]'] [--preview] [--output-json]

  • --index <index> specifies the value of [ViewIndex:<index>] that is displayed at the beginning of posts displayed using timeline or feed commands, etc. This indicates the post to quote.
  • --uri <AT-URI> and --cid <CID> specify the value that will be displayed ([uri:<AT-URI>], [cid:<CID>]) when the --output-id option is specified with the timeline or feed command. This indicates the post to quote.
  • --text '<text>' specifies the text to post. It is recommended to use single quotes to prevent spaces, newlines, and escaped characters from being interpreted by the shell.
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --text-file '<path to text file>' specifies the path of the file containing the text to be posted. Only a single file can be specified.
    • Example: --text-file '/path/to/a.txt'
    • If standard input (pipe/redirect) is specified, this option is ignored.
  • --image<N> <path to image file> specifies the image to be attached to the post. Up to 4 can be specified.
    • <N> specifies a number from 1 to 4. If omitted, it is the same as specifying 1. Specify it after --image without any spaces.
  • --alt<N> '<alt text>' specifies the ALT (alternative) text for the image. This is the description of the image provided for visually impaired and low vision people.
    • <N> specifies a number from 1 to 4 that corresponds to the image specified in --image<N>. If omitted, it is the same as specifying 1. Specify it after --alt without any spaces.
  • --linkcard-index <link index> specifies the link URL to display in the link card when the text contains a link URL. If this option is omitted, it is assumed that <link index> is set to 1 (targeting the first link URL).
    • <link index> specifies a number. Specify the appearance order number of multiple link URLs that exist in the text to generate a link card. If you specify 0, no link card will be generated.
  • --url <display mode> specifies how the URL contained in the post text is displayed. The following can be specified.
String specified for <display mode> URL display method
omit-tail If the URL is longer than a certain length, it will be shortened by omitting the last part. This is the default if the --url option is not specified.
omit-middle If the URL is longer than a certain length, it will be shortened by omitting the middle part.
full Makes the URL as specified without shortening it. However, depending on the display client, it may be abbreviated.
  • --langs '<language code>[,...]' specifies the language code (en, ja, pt, etc.) included in the post. For multiple language codes, specify them as a comma-separated list.
  • --preview does not actually post, but only displays (previews) the content of the post for confirmation.
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getPosts.

The post will be displayed as the execution result.

For information on valid formatting within the text (such as links and hashtags), see Post text format.

Only one of the --text option and the --text-file option can be specified.

Text can be specified from standard input (pipe/redirect/interactive). If none of the --text option, --text-file option, and standard input (pipe/redirect) are specified, input will be interactive.

If you specify an image, a link card will not be generated even if a link URL exists in the text.

Newlines at the end of text are ignored.

Like (like)

Like the specified post.

bsky like --index <index> [--output-json]

bsky like --uri <AT-URI> --cid <CID> [--output-json]

  • --index <index> specifies the value of [ViewIndex:<index>] that is displayed at the beginning of posts displayed using timeline or feed commands, etc. This indicates the post to be liked.
  • --uri <AT-URI> and --cid <CID> specify the value that will be displayed ([uri:<AT-URI>], [cid:<CID>]) when the --output-id option is specified with the timeline or feed command. This indicates the post to be liked.
  • --output-json outputs in JSON format. The content is as follows.
{
  "like":<Response content of API com.atproto.repo.createRecord>,
  "original":<Response content of API app.bsky.feed.getPosts>
}

As a result of the execution, the post to be liked and the like uri (AT-URI) will be displayed.

Displaying threads (reply-related posts) (thread)

Displays the thread (reply destination of the post, chain of replies to the post) related to the specified post.

bsky --index <index> [--depth <maximum number of levels to display replies to specified post>] [--parent-height <maximum number of levels to display replies to from specified post>] [--output-langs] [--output-id] [--output-via] [--output-json]

bsky --uri <AT-URI> [--depth <maximum number of levels to display replies to specified post>] [--parent-height <maximum number of levels to display replies to from specified post>] [--output-langs] [--output-id] [--output-via] [--output-json]

  • --index <index> specifies the value of [ViewIndex:<index>] that is displayed at the beginning of posts displayed using timeline or feed commands, etc. This will indicate which posts will be displayed in the thread.
  • --uri <AT-URI> and --cid <CID> specify the value that will be displayed ([uri:<AT-URI>], [cid:<CID>]) when the --output-id option is specified with the timeline or feed command. This will indicate which posts will be displayed in the thread.
  • --depth <maximum number of levels to display replies to specified post> specifies the maximum number of layers to display in the chain (layers) of replies to replies... to the specified post. You can specify a value from 0 to 1000 (default is 6 if the --depth option is omitted).
  • --parent-height <maximum number of levels to display replies to from specified post> specifies the maximum number of levels to display the chain (layer) of reply destination from the specified post. You can specify a value from 0 to 1000 (default is 80 if the --parent-height option is omitted).
  • --output-langs instructs to display tha language information specified at the time of posting.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-via instructs to display the name of the client (app) used for the post, if the information exists in the post data (unofficial field via).
  • --output-json outputs in JSON format. This is the response content of the API app.bsky.feed.getPostThread. The --output-langs, --output-id and --output-via options are ignored.

As a result, reply-related threads centered on the specified post will be displayed. The index of the specified post is 0, the reply direction is an index starting with a negative number, and the reply to the post is an index starting with a positive number. Since there may be multiple replies to a post, a tree structure will be created that shows the number of replies at each level, separated by hyphens.

Profile display (profile)

Displays the specified user's profile.

bsky profile --actor <handle or DID> [--output-id] [--output-json]

bsky profile --handle <handle> [--output-id] [--output-json]

bsky profile --did <DID> [--output-id] [--output-json]

bsky profile [--output-id] [--output-json]

  • --actor, --handle, --did specify the user. The only difference between them is the type of handle and DID (internal ID that indicates the user) that can be specified.
    • If both are omitted, the logged in user's own profile information will be displayed.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-json outputs in JSON format. This will be the response content of the API app.bsky.actor.getProfile. The --output-id option is ignored.

Social display (social)

Displays the specified user's social information (follows/followers).

bsky social --actor <handle or DID> [--follows] [--followers] [--known-followers] [--limit <maximum display count>] [--next] [--output-id] [--output-json]

bsky social --handle <handle> [--follows] [--followers] [--known-followers] [--limit <maximum display count>] [--next] [--output-id] [--output-json]

bsky social --did <DID> [--follows] [--followers] [--known-followers] [--limit <maximum display count>] [--next] [--output-id] [--output-json]

bsky social [--follows] [--followers] [--known-followers] [--limit <maximum display count>] [--next] [--output-id] [--output-json]

  • --actor, --handle, --did specify the user. The only difference between them is the type of handle and DID (internal ID that indicates the user) that can be specified.
    • If both are omitted, the logged in user's own profile information will be displayed.
  • --follows displays users followed by the user specified int actor/handle/did.
  • --followers displays users that are following the user specified in actor/handle/did.
  • --known-followers displays users that are following the user specified in actor/handle/did (users followed by the logged-in user).
  • --limit <maximum number> indicates the maximum number to display. The specified number may not always be displayed, which are not displayed even if they are counted. You can specify a value from 1 to 100 (default is 50 if the --limit option is omitted). This applies to --follows/--followers, but not to --known-followers.
  • --next instructs to display the continuation of the number of items displayed with the previous social command. This applies to --follows/--followers, but not to --known-followers.
  • --output-id instructs to display internal identification information such as (AT-)URI and CID.
  • --output-json outputs in JSON format. This will be the response content of the API app.bsky.graph.getFollows/app.bsky.graph.getFollowers/app.bsky.graph.getKnownFollowers. The --output-id option is ignored.

Displaying bsky command related information (info)

Displays information related to the bsky command.

bsky info <subcommand>

The following values can be specified for <subcommand>.

<subcommand> Display content
session Information about the session
Login status, handle, display index, etc.
meta bsky command meta information.
such as path and customization configurations.

session subcommand

bsky info session [<display target option>]

By specifying the following display target options, you can display only the specified targets. If omitted, all targets will be displayed.

<display target option> Display content
--all Show all targets.
--which Displays the session information storage file path.
--status Display login status.
--login Display login date and time.
--refresh Displays the latest session identification information update date and time.
--handle Displays the handle of the logged in user.
--did Displays the DID of the logged in user.
--index Displays display index information (index number) for timeline/feed/thread commands, etc. If the --output-id option is also specified, internal identification information such as AT-URI and cid corresponding to the index number will also be displayed.
--cursor Displays cursor information when paging by specifying the --next option with the timeline/feed command, etc.
--output-id Also display internal identification information for some displays.
--output-json Output in JSON format. Other options are ignored.

meta subcommand

bsky info meta [<display target option>]

y only the specified targets. If omitted, all targets will be displayed.

<display target option> Display content
--all Show all targets.
--path Display path information for related directories and files.
--config Display customization information.
--profile Displays the profile name of the active (not logged out) session. (default) is the session when no profile option is specified as a global option.
--output-json Output in JSON format. Other options are ignored.

Size display (size)

Displays the number of characters in the specified text.

bsky size [--text '<text>'] [--text-files '<text file path>[:...]'] [--separator-prefix '<separator string>'] [--count-only] [--url <display mode>] [--output-json]

  • --text '<text>' specifies the text of the post candidate whose character count is to be displayed. It is recommended to use single quotes to prevent spaces, newlines, and escaped characters from being interpreted by the shell.
  • --text-files '<text file path>[:...]' specifies the path of the file containing the text of the post candidate whose character count is to be displayed. For multiple files, specify them by separating them with colons.
  • --separator-prefix '<separator string>' splits posts within a single specified text (--text option, a file specified by the --text-files option, or standard input) at lines starting with the specified <separator string>.
    • The delimiter line itself is excluded from the post.
    • In the delimiter line, everything from <separator string> to the end of the line (line break) is ignored (treated as a comment).
    • If the content of the separated unit is just a line break, that part will be excluded from the post.
  • --count-only displays only the number of characters if specified.
  • --url <display mode> specifies how the URL contained in the post text is displayed. The following can be specified.
String specified for <display mode> URL display method
omit-tail If the URL is longer than a certain length, it will be shortened by omitting the last part. This is the default if the --url option is not specified.
omit-middle If the URL is longer than a certain length, it will be shortened by omitting the middle part.
full Makes the URL as specified without shortening it. However, depending on the display client, it may be abbreviated.
  • --output-json outputs in JSON format. The --count-only option is ignored.

Text can be specified from standard input (pipe/redirect/interactive). If none of the --text option, --text-files option, and standard input (pipe/redirect) are specified, input will be interactive.

Standard input (pipe/redirect), --text option, and --text-files option can be specified at the same time.

Newlines at the end of text are ignored.

If --count-only is not specified, whether the post limit of 300 characters is exceeded or not and the text file path will also be displayed.

Tool update (update)

Update the tool itself to the latest version.

bsky update [--skip-confirm] [--leave-updater] [--preview]

  • --skip-confirm will skip waiting for the final confirmation input to run the update.
  • --leave-updater leaves the downloaded update file without deleting it after the update is complete.
  • --preview only displays the update process without executing the update.

When you run the command, it will download the latest version of the release package from the GitHub repository ( https://github.com/bills-appworks/bsky-sh-cli ) and run the installer to self-update.

The update target (installation destination) is the bin directory where the executed bsky command exists and the adjacent lib directory.

If you installed as a super user using the sudo command during the previous installation, you will need the same privileges for the installation destination, so please execute bsky update using the sudo command as well. If you use the sudo command, you will need to set the PATH environment variable for the bsky command, so be sure to specify the -i option to set the environment variable when logging in.

If you installed as a super user:

sudo -i bsky update

If you installed as a general user:

bsky update

It is assumed that the installation has already been carried out and the environment has been prepared, so run the latest version of the installer by specifying the option to skip some processes (see INSTALL for details) as shown below. I will do it.

install.sh --install-dir <Upper directory of the bin directory where the bsky command that executed the update exists> --skip-config-path --skip-rcfile-copy --skip-confirm

If you are using a local repository cloned from GitHub instead of the bsky command installed with the installer, please note that running the bsky update command will cause version control confusion, such as replacing files in the local repository.

Command list help display (help)

Display a list of commands.

bsky help

bsky command version number display (version)

Displays the version number of the bsky command.

This is the same as specifying --version as a global option.

bsky version

Supplementary information

Post text format

Basically, the specified text is posted literally, but the following strings in the text are treated specially.

URL

Strings beginning with http:// or https:// are recognized as URLs and become hyperlinks to the web page they point to. The URL is checked for validity, so if it is determined to be invalid, it may not be used as a hyperlink.

URLs longer than a certain length will be abbreviated. For details, see the explanation of the --url option for each command.

By default, a link card for the web page is generated. For control over the generation of link cards, see the explanation of the --linkcard-index option for each command.

If there are other strings before and after the URL, they must be separated from the other strings by a space.

  • Example of description (https://example.com/ is replaced with a hyperlink):

    This URL https://example.com/ is an example domain.
    
  • Display example (The bsky command extracts hyperlinks and displays them at the end of the post)

    This URL https://example.com/ is an example domain.

Hashtag

A string beginning with # is recognized as a hashtag and becomes a hyperlink that references posts with the same hashtag.

If there are other strings before and after the hashtag, they must be separated from the other strings by a space.

  • Example of description (#Bluesky is replaced with a hashtag):

    Hello #Bluesky users
    

    (The bsky command extracts hashtags and displays them at the end of the post)

Text link

A string written in the format [text](URL) is recognized as a text link. The URL part is a valid URL string starting with https://, etc., as mentioned above. For text links, only the text written between [ and ] is displayed on the post, and that part becomes a hyperlink to the URL written between ( and ).

If you don't want the [text](URL) string to be recognized as a text link and leave it as is, add a backslash character \ just before it, like this: \[text](URL).

There is no need to separate the text link with a space before or after it.

  1. Example of text link

    • Example of description (Bluesky is replaced with a hyperlink):

      Let's all use [Bluesky](https://bsky.app)
      
    • Display example (The bsky command extracts hyperlinks and displays them at the end of the post):

      Let's all use Bluesky

  2. Example of disabling text link

    • Example of description (If you write a backslash character just before the text link format, it will not be recognized as a text link and everything other than the backslash will be displayed as is):
      Let's all use `[Bluesky](https://bsky.app)
      
    • Display example:
      Let's all use [Bluesky](https://bsky.app)
      
Clone this wiki locally