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 | shInput 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.curljqsed : Requires GNU sed. Check for errors when specifying the -z option. For Mac, please install it with brew install gnu-sed etc. For FreeBSD, please install it with pkg install gsed etc. If you need to specify the path to run GNU sed, use the --config-gsed-path option.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_cliPATH 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.
/etc/profile.d/bsky_sh_cli.sh (for bash, etc. *1)/etc/profile.d/bsky_sh_cli.csh (for csh/tcsh *1)/etc/csh.cshrc (for csh/tcsh)/etc/zprofile (for zsh)*1: Only if the /etc/profile.d directory exists
$SHELL is /bin/bash
$HOME/.bashrc$HOME/.bash_profile$HOME/.bash_login$SHELL is /bin/zsh
$HOME/.zshrc$HOME/.zlogin$SHELL is /bin/csh or /bin/tcsh
$HOME/.cshrc$HOME/.login$SHELL is /bin/zsh
$HOME/.zprofile$SHELL is /bin/csh or /bin/tcsh
$HOME/.login$SHELL is anything other than the above
$HOME/.profile.csh, .cshrc, or .login
PATH=$PATH:<specified installation directory>/bin
export PATH
.csh, .cshrc, or .login
set path = ($path <specified installation directory>/bin)
$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.--config-gsed-path <path to GNU sed executable file>
PATH and you need to execute it by specifying the full path, specify the path to GNU sed. The specified path includes the GNU sed executable file name. The specified path will be set to the environment variable BSKYSHCLI_GNU_SED_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.BSKYSHCLI_GNU_SED_PATH:
--skip-config-path option:
--skip-config-path option is not specified:
--config-gsed-path option:
--config-gsed-path option is specified and the value of the environment variable BSKYSHCLI_GNU_SED_PATH is the same:
--config-gsed-path option is specified and the value of the environment variable BSKYSHCLI_GNU_SED_PATH is different:
--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 GNU sed does not exist in the directory specified by the environment variable PATH and you need to execute it by specifying the full path, set the full path of the GNU sed executable file to the environment variable BSKYSHCLI_GNU_SED_PATH. The specified path includes the GNU sed executable file name.
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.