https://github.com/reubenmiller/go-c8y-cli-addons
Addons such as views and templates to support the go-c8y-cli tool
https://github.com/reubenmiller/go-c8y-cli-addons
Last synced: about 1 month ago
JSON representation
Addons such as views and templates to support the go-c8y-cli tool
- Host: GitHub
- URL: https://github.com/reubenmiller/go-c8y-cli-addons
- Owner: reubenmiller
- Created: 2021-03-13T17:25:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T14:59:47.000Z (7 months ago)
- Last Synced: 2025-04-23T00:15:27.426Z (about 1 month ago)
- Language: Shell
- Size: 69.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Notice
This repository is meant to compliment the [go-c8y-cli](https://github.com/reubenmiller/go-c8y-cli) project by providing the following:
* Installation script
* Default views
* Template (jsonnet) examples
* Shell profile helpers (i.e. `set-session`)Please see the [documentation](https://goc8ycli.netlify.app/docs/installation/shell-installation) for more information.
## Getting started
1. Clone the repository
**Shell (bash/zsh/fish)**
```sh
git clone https://github.com/reubenmiller/go-c8y-cli-addons.git ~/.go-c8y-cli
cd ~/.go-c8y-cli
```**PowerShell**
```sh
git clone https://github.com/reubenmiller/go-c8y-cli-addons.git $HOME/.go-c8y-cli
cd $HOME/.go-c8y-cli
```2. Install go-c8y-cli binary
**Option 1: without sudo**
```sh
~/.go-c8y-cli/install.sh
```**Option 2: with sudo**
If you want to make the c8y globally available, then you can run it using sudo, which will install it under `/usr/local/bin`.```sh
sudo -E ~/.go-c8y-cli/install.sh
```**PowerShell**
```sh
& "$HOME/.go-c8y-cli/install.ps1"
```3. Create a new session (if you do not already have one)
```sh
c8y sessions create --host myinfo --username [email protected] --type dev
```4. Activate the newly create profile
```sh
set-session
```5. Check the profile by showing your current user information
```sh
c8y currentuser get
```## Upgrading to latest version
1. Run the install script again
**Shell (bash/zsh/fish)**
```sh
~/.go-c8y-cli/install.sh
```**PowerShell**
```sh
& $HOME/.go-c8y-cli/install.ps1
```**Note**
go-c8y-cli will only be updated if you are not running the latest version already.