Skip to content

davidalpert/go-contentstack

Repository files navigation

License: GPL v3


go-contentstack

A command-line tool for interacting with the ContentStack APIs
README · CHANGELOG . CONTRIBUTING
Report Bug · Request Feature

Table of contents

About the project

Why port the nodejs version to Golang?

People working with nodejs commonly use a version manager like nodenv, nvm, or asdf to manage several versions of nodejs side-by-side.

These tools install global packages per node version which means you have to install the node csdx plugin once per node version.

In contrast Golang offers the ability to build source code into single-file executables which truly install globally, independent of any versioning tools.

A Golang version of go-contentstack simplifies the install and update story making this plugin more manageable.

Built with

Getting started

Install

go install

With a working golang installation at version >= 1.18 you can install or update with:

go install github.com/davidalpert/go-contentstack/cmd/cs@latest

Pre-compiled binaries

Visit the Releases page to find binary packages pre-compiled for a variety of GOOS and GOARCH combinations:

  1. Download an appropriate package for your GOOS and GOARCH;
  2. Unzip it and put the binary in your path;

Verify your installation

  1. Check the version installed:
    cs version
    

Uninstall

  • go-contentstack ships with an uninstall sub-command which cleans up and removes itself:

    cs uninstall
    

Usage

  • TODO; coming as the project nears v1.0

Troubleshooting

If you run into trouble you can ask cs to write some diagnostics to a log file by setting the following environment variables:

Variable Default Description
CONTENTSTACK_CLI_LOG_LEVEL "fatal" "fatal", "error", "warning", "warn", "info", "debug"
CONTENTSTACK_CLI_LOG_FORMAT "text" "text" or "json"
CONTENTSTACK_CLI_LOG_FILE "" path to a log file; when empty logs go to STDOUT

Roadmap

See open issues project board for a list of known issues and up-for-grabs tasks.

Contributing

See the CONTRIBUTING guide for local development setup and contribution guidelines.

License

Distributed under the GPU v3 License. See LICENSE for more information.

Contact

David Alpert - @davidalpert

Project Link: https://github.com/davidalpert/go-contentstack