cfctl - Command Line Interface for SpaceONE
cfctl is a powerful command-line interface tool designed to interact with SpaceONE services. It provides a seamless way to manage and control your SpaceONE resources through the command line.
Features
- Dynamic Service Discovery: Automatically discovers and interacts with available SpaceONE services
- Multi-Environment Support: Manages multiple environments (user/app) with easy switching
- Secure Authentication: Supports both user and application token-based authentication
- Rich Output Formats: Supports various output formats including table, yaml, json, and csv
- Alias: Configurable resource aliases for faster command execution
01. Installation
Using Homebrew (Recommended)
brew tap cloudforet-io/tap
brew install cfctl
Manual Installation
macOS
For Intel Mac
wget -LO "https://github.com/cloudforet-io/cfctl/releases/latest/download/cfctl_Darwin_x86_64.tar.gz"
tar xvf cfctl_Darwin_x86_64.tar.gz
chmod +x cfctl
sudo mv cfctl /usr/local/bin/
For Apple Silicon Mac
wget -LO "https://github.com/cloudforet-io/cfctl/releases/latest/download/cfctl_Darwin_arm64.tar.gz"
tar xvf cfctl_Darwin_arm64.tar.gz
chmod +x cfctl
sudo mv cfctl /usr/local/bin/
Linux
For x86_64
wget -LO "https://github.com/cloudforet-io/cfctl/releases/latest/download/cfctl_Linux_x86_64.tar.gz"
tar xvf cfctl_Linux_x86_64.tar.gz
chmod +x cfctl
sudo mv cfctl /usr/local/bin/
For ARM64
wget -LO "https://github.com/cloudforet-io/cfctl/releases/latest/download/cfctl_Linux_arm64.tar.gz"
tar xvf cfctl_Linux_arm64.tar.gz
chmod +x cfctl
sudo mv cfctl /usr/local/bin/
Docker
Pull the latest image
docker pull cloudforet/cfctl:latest
Create an alias for easier use
bash
echo 'alias cfctl="docker run --rm -it -v $HOME/.cfctl:/root/.cfctl cloudforet/cfctl:latest"' >> ~/.bashrc
source ~/.bashrc
zsh
echo 'alias cfctl="docker run --rm -it -v $HOME/.cfctl:/root/.cfctl cloudforet/cfctl:latest"' >> ~/.zshrc
source ~/.zshrc
fish
echo 'alias cfctl="docker run --rm -it -v $HOME/.cfctl:/root/.cfctl cloudforet/cfctl:latest"' >> ~/.config/fish/config.fish
source ~/.config/fish/config.fish
Windows
- Download the latest Windows release from our releases page
- Extract the
cfctl_Windows_x86_64.zip
file
- Add the extracted directory to your system's PATH environment variable
- Open PowerShell or Command Prompt and verify the installation:
cfctl
02. Quick Start
2.1. Initialize cfctl
configuration
cfctl setting init