This document explains how to install and update after installation.
By downloading and running one file in the GitHub repository, the following installation-related processes will be performed.
install.sh
) in the release archivecurl https://raw.githubusercontent.com/bills-appworks/bsky-sh-cli/main/download-install.sh -O
For super user:
sudo -s sh download-install.sh
For general users:
sh download-install.sh
[!WARNING] Direct execution like below is not recommended.
curl https://raw.githubusercontent.com/bills-appworks/bsky-sh-cli/main/download-install.sh | sh
Input waiting within the installer is disabled. As a result, the installation method cannot be selected, and the final confirmation waiting process loops endlessly, making installation impossible.
sudo sh <(https://raw.githubusercontent.com/bills-appworks/bsky-sh-cli/main/download-install.sh)
If you run the downloaded file as a super user using standard input, execution may fail depending on the environment for security reasons.
When executed, the processing described in the overview above will be performed. For information on executing the installer in the release archive, please refer to next section. When the installation is complete, the files extracted to the temporary directory will be deleted. If you cancel it, it will remain so please delete it manually. The temporary directory can be confirmed by the “Install temporary directory:” line displayed during installation.
If you specify an option parameter, it will be passed as is as an option parameter to the installer in the release archive.
You can install this tool in your environment by running the simple installer: install.sh
included in the latest release archive.
The following describes what to do. If it does not meet your needs, please refer to Manual installation.
If necessary, you will be asked to confirm execution or input during installation (confirmation or input may not be required depending on the install.sh command option specification).
If you create or modify (add) a login script that sets the environment variable PATH
during the installation process, the environment variable PATH
will not be set immediately after the installation is completed. To execute the bsky
command without specifying a path, log in to the shell again.
For super user:
sudo -s ./install.sh
For general users:
./install.sh
install.sh
doesbin
and lib
. It is assumed that the directory and file structure is the same as provided.curl
jq
sed
: Requires GNU sed. Check for errors when specifying the -z
option. For Mac, please install it with brew install gnu-sed
etc.convert
(imagemagick): If it does not exist, display a warning that some image posting and link card functions cannot be used and continue the installation.file
(libmagic): If it does not exist, display a warning that image posting and link cards cannot be used and continue the installation.bin
and lib
and the files under them to the specified installation directory.
/opt/bsky_sh_cli
$HOME/.local/bsky_sh_cli
PATH
to the bin
subdirectory under the installation directory, and if it is not set, we will suggest creating or modifying (adding) a login script. If the proposal is not what you want, you can change it.
$SHELL
is /bin/zsh
/etc/zprofile
$SHELL
is not /bin/zsh
/etc/profile.d/bsky_sh_cli.sh
$SHELL
is /bin/bash
$HOME/.bashrc
$HOME/.bash_profile
$HOME/.bash_login
$SHELL
is /bin/zsh
$HOME/.zshrc
$HOME/.zlogin
$SHELL
is /bin/zsh
$HOME/.zprofile
$SHELL
is not /bin/zsh
$HOME/.profile
PATH=$PATH:<specified installation directory>/bin
export PATH
$HOME/.bsky_sh_cli_rc
.bsky_sh_cli_rc.sample
without overwriting it.install.sh
command optionsYou can change the behavior by specifying the following options when running install.sh
.
--install-dir <directory path>
<directory path>
as the installation destination directory.--config-path-file <login script file path>
PATH
.--skip-config-path
PATH
.--config-path-file
option is ignored.--skip-rcfile-copy
--config-langs '<language code>[,...]'
--skip-config-path
option is specified or if the installation of the Run Commands file is skipped during the confirmation during installation.--skip-confirm
PATH
:
bin
of the installation directory is already set in the environment variable PATH
:
bin
of the installation directory is not set in the environment variable PATH
:
--skip-config-path
option:
--skip-config-path
option is not specified:
--config-path-file
option:
--config-path-file
option.--config-path-file
option is not specified:
install.sh
does.$HOME/.bsky_sh_cli_rc
):
--skip-rcfile-copy
option:
--skip-rcfile-copy
option is not specified:
--config-langs
option:
--config-langs
option (only if the Run Commands file is installed).--config-langs
option is not specified:
If this installer does not cover your preferred installation method (or you do not trust it), you can install by manually locating directories and files.
Please copy the following directories and files included in the provided files to the corresponding location.
bin
directory and lib
directory
lib
directory path with an environment variable has been implemented, but its operation has not been confirmed..bsky_sh_cli_rc.sample
file
.bsky_sh_cli_rc
with the extension .sample
removed.BSKYSHCLI_POST_DEFAULT_LANGUAGES=<language code>[,...]
<language code>
, see install.sh
command options, see the description of the --config-langs
option.To run the bsky
command without specifying a path, edit the login script according to your environment and add the full path of the bin
directory to the environment variable PATH
.
If you are self-hosting the AT server (PDS), you can easily point the program at your server through the use of an exported environment variable.
If you are self-hosting the AT server (PDS), then add this line, replacing sky.example.com
with the url to your AT server, to either your .profile
or .bashrc
as applicable:
export BSKYSHCLI_SELFHOSTED_DOMAIN=sky.example.com
The script will then query your AT server (PDS) instead of bsky.social.
If it has already been installed, you can update the tool itself to the latest version using the installed bsky command (bsky update
).
If you installed as a super user:
sudo -i bsky update
If you installed as a general user:
bsky update
See the command line reference for details.