LoginSignup
3
0

More than 5 years have passed since last update.

Bluemix CLI

Posted at

Bluemix CLIが便利すぎる件

これまではCF CLIをインストールしてからBluemix Pluginをインストールしていましたが、Bluemix Pluginに変わるBluemix CLIがリリースされているみたいです。Bluemix CLI公式ページ
H.Tokidaさんの記事「Bluemix-cli」によると2016年3月くらいにはリリースされているみたいですね。

こんなの知らなかった…



主な特徴
・管理系のコマンドが増えている
・入力補完機能 ← 神ってる
・cf login => bx loginとなる、cfコマンドがbxに置き換わる

Bluemix CLIのインストール

(筆者の環境はCentOS6.4です)
①CFをインストールする
CF CLIのGitページから適切なやつを選らんで下さい
※cfコマンド6.11以上を導入しておく必要があるそうです。

# rpm -ivh cf-cli-installer_6.22.2_x86-64.rpm
警告: cf-cli-installer_6.22.2_x86-64.rpm: ヘッダ V4 RSA/SHA1 Signature, key ID 50c212b6: NOKEY
準備中...                ########################################### [100%]
   1:cf-cli                 ########################################### [100%]

# cf -v
cf version 6.22.2+a95e24c-2016-10-27



②BluemixCLIをインストールする
BluemixCLIの公式ページ

# tar -xvf Bluemix_CLI.tar.gz
Bluemix_CLI/
Bluemix_CLI/update_global_config
Bluemix_CLI/install_bluemix_cli
Bluemix_CLI/bx/
Bluemix_CLI/bx/bash_autocomplete
Bluemix_CLI/bx/zsh_autocomplete
Bluemix_CLI/bin/
Bluemix_CLI/bin/bluemix

# cd Bluemix_CLI
# ./install_bluemix_cli
The Cloud Foundry CLI version 6.22 is already installed.
Copying files ...
The Bluemix Command Line Interface (Bluemix CLI) is installed successfully.
To get started, open a new Linux terminal and enter "bluemix help", or enter "bx help" as short name.

With Bluemix CLI 0.4.0 or later, the CLI can automatically collect diagnostic and usage information and send it to Bluemix for analysis.
This information will help us better understand current client usage and plan for future use. No personally identifiable data is collected.

To stop collecting information, you can run the following command:
        'bluemix config --usage-stats-collect false'


入力補完が有効になるようにPATHの設定を行う
ルートのホームディレクトリにある.bash_profileにPATH=$PATH:/usr/local/Bluemix/binとsource /usr/local/Bluemix/bx/bash_autocompleteを追加する。
※PATHは環境によって違うのでご確認下さい。

# cd
~# vi .bash_profile

以下.bash_profileの内容
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
PATH=$PATH:/usr/local/Bluemix/bin
export PATH

source /usr/local/Bluemix/bx/bash_autocomplete

最後に設定を読み込む
# source .bash_profile

tabを押すと入力候補がでてくるようなる
# bx log
login   logout









・入力補完機能 ← 神ってる

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0