https://github.com/nttcom/fic
Command Line Interface for Flexible InterConnect
https://github.com/nttcom/fic
cli fic go
Last synced: about 2 months ago
JSON representation
Command Line Interface for Flexible InterConnect
- Host: GitHub
- URL: https://github.com/nttcom/fic
- Owner: nttcom
- License: apache-2.0
- Created: 2020-05-28T01:35:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-23T02:06:19.000Z (almost 6 years ago)
- Last Synced: 2025-04-06T08:35:36.126Z (12 months ago)
- Topics: cli, fic, go
- Language: Go
- Homepage:
- Size: 126 KB
- Stars: 3
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fic
Command Line Interface for Flexible InterConnect
## Installation
```Bash
go get -u github.com/nttcom/fic
```
Make sure that `PATH` includes `$GOPATH/bin`.
```Bash
export PATH=$PATH:$GOPATH/bin
```
## Configuration
There are two ways to set your configurations.
* Export environment variables:
```Bash
export FIC_USERNAME=****
export FIC_PASSWORD=****
export FIC_TENANT_ID=****
```
* Create config file:
```Bash
touch ~/.fic.yaml
echo "username: ****" >> ~/.fic.yaml
echo "password: ****" >> ~/.fic.yaml
echo "tenant_id: ****" >> ~/.fic.yaml
```
## Execution
```Bash
fic areas list
```
## Command reference
See [fic.md](https://github.com/nttcom/fic/blob/master/doc/fic.md).
## Auto completion
### Bash
The completion script for Bash can be generated with the command `fic completion bash`.
It depends on [bash-completion](https://github.com/scop/bash-completion), which means that you have to install this software first.
If you use the completion script on macOS, it requires **bash-completion v2** and **Bash 4.1+**.
[Kubectl docs](https://kubernetes.io/docs/tasks/tools/install-kubectl/#enabling-shell-autocompletion) show how to install bash-completion and bash in details.
There are two ways to enable auto completion.
* Source the completion script in your `~/.bashrc` file:
```Bash
echo 'source <(fic completion bash)' >>~/.bashrc
```
* Add the completion script to the `bash_completion.d` directory:
```Bash
# On Linux
fic completion bash >/etc/bash_completion.d/fic
# On macOS
fic completion bash >/usr/local/etc/bash_completion.d/fic
```
### Zsh
The completion script for Zsh can be generated with the command `fic completion zsh`.
You need to put the generated script somewhere in your *fpath* named *_fic* like this.
```Zsh
fic completion zsh > ${fpath[1]}/_fic
```
## License
Fic is released under the Apache 2.0 license. See [LICENSE](https://github.com/nttcom/fic/blob/master/LICENSE).