Project

xapixctl

0.0
No release in over a year
xapix client library and command line tool
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 2.1.4
~> 13.0
~> 3.10.0
~> 1.11.0
~> 0.5.1
~> 3.11.0

Runtime

>= 5.2.3, < 6.0.0
>= 2.1.0, < 3.0.0
>= 1.0.0, < 1.2.0
>= 1.0.1, < 1.2.0
 Project Readme

xapixctl

Gem Version

Xapix client library and command line tool

Installation

Install it via:

$ gem install xapixctl

On Windows make sure you have ruby installed:

$ choco install ruby -y
$ refreshenv
$ gem install xapixctl

Usage

To see more details on how to run xapixctl, use:

$ xapixctl help

Commands:
  xapixctl api-resources                                            # retrieves a list of all available resource types
  xapixctl apply -f, --file=FILE -o, --org=ORG                      # Create or update a resource from a file
  xapixctl delete [TYPE ID] [-f FILE] -o, --org=ORG                 # delete the resources in the file
  xapixctl export -o, --org=ORG -p, --project=PROJECT               # retrieves all resources within a project
  xapixctl get TYPE [ID] -o, --org=ORG                              # retrieve either all resources of given TYPE or just the resource of given TYPE and ID
  xapixctl help [COMMAND]                                           # Describe available commands or one specific command
  xapixctl logs CORRELATION_ID -o, --org=ORG -p, --project=PROJECT  # Retrieves the execution logs for the given correlation ID
  xapixctl publish -o, --org=ORG -p, --project=PROJECT              # Publishes the current version of the given project

Options:
  -v, [--verbose], [--no-verbose]
      [--xapix-url=XAPIX_URL]      # Fallback: environment variable XAPIX_URL. URL to Xapix. Default: https://cloud.xapix.io/
      [--xapix-token=XAPIX_TOKEN]  # Fallback: environment variable XAPIX_TOKEN. Your access token.

The main commands to interact with Xapix are:

  • xapixctl get TYPE to list all the resources of a specific type. You can get the supported types with xapixctl api-resources. To see the complete resource definition instead of an overview use the -f yaml switch. Use xapixctl help get for more details.
  • xapixctl apply to create a new resource or update existing ones. Resources are matched using their type and id. If a resource with the same type and id already exists it is updated, otherwise a new one is created.
  • xapixctl publish to publish the current status of a project.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/xapix-io/xapixctl.