All Projects → reubenmiller → go-c8y-cli

reubenmiller / go-c8y-cli

Licence: MIT license
Unofficial go c8y cli tool for interacting with the Cumulocity REST API.

Programming Languages

go
31211 projects - #10 most used programming language
powershell
5483 projects
shell
77523 projects
Dockerfile
14818 projects
Makefile
30231 projects
Jsonnet
166 projects

Projects that are alternatives of or similar to go-c8y-cli

cumulocity-app-builder
The Application Builder for Cumulocity provides a simple, coding-free way to create new applications inside Cumulocity. Application Builder is an open-source tool for you to create web applications in a no-code environment. Created by Global Presales.
Stars: ✭ 18 (+5.88%)
Mutual labels:  cumulocity-iot
cumulocity-migration-tool
A Cumulocity webapp to migrate applications, dashboards, groups, devices, simulators, smart rules, images, and managed objects between tenants. Developed by Global Presales.
Stars: ✭ 15 (-11.76%)
Mutual labels:  cumulocity-iot

go-c8y-cli

build

Unofficial Cumulocity IoT Command Line Tool

Supported on

  • Linux (amd64, x86, armv5->7)
  • MacOS (amd64)
  • Windows (amd64, x86)

Installation

See the following installation instructions

Documentation

See the documentation website for instructions on how to install and use it.

Contributing

  1. Fork the project, then clone it

    git clone https://github.com/reubenmiller/go-c8y-cli.git
  2. Open the project in Microsoft VS Code (using Dev Containers - this requires Docker!)

  3. Run initial setup tasks so that you can run c8y inside the dev container

    make init_setup
  4. Add or edit a command specification (.yaml file) in api/spec/yaml/. The specifications are used to auto generate the go code

  5. Run the code generation and build the go binary

    make build
  6. Try out the newly built binary (it should already be added to your)

    Shell

    c8y currentuser get

    PowerShell

    Import-Module ./tools/PSc8y/dist/PSc8y -Force
    Get-CurrentUser

Building the documentation

  1. Update the auto generated cli docs (if you have changed something)

    make docs
  2. Launch the documentation preview

    make gh_pages
  3. View the documentation in the browser

Tests

Pre-requisites

  1. Build the latest version and update auto generated tests

    make build
    make generate_cli_tests
  2. Set the c8y session that you want to use for the tests

    set-session

Run test on example code

The examples included in the API specification can be validated by running the follow make task.

make test_cli

Run all tests

make TEST_THROTTLE_LIMIT=1 test_powershell

Running a test on a single

make TEST_FILE_FILTER=ClientRequest test_powershell
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].