Giter Site home page Giter Site logo

cli's Introduction

Hightouch CLI

Hightouch CLI to list, inspect resources and trigger syncs

CircleCI

Demo

asciicast

Quick Start

  1. To install cli from curl script, run
curl -sLf https://raw.githubusercontent.com/hightouchio/cli/main/install.sh | sh -

To install from Github package, download the latest release from here.

  1. Create an API key. Follow docs here.

  2. Login CLI with API key.

$ ht login
Hightouch API key [************************************]:

Note: you can override api key with this environment variable HIGHTOUCH_APIKEY=mykey.

  1. Hightouch CLI is ready to use!

ht destinations

List all destinations in current workspace

USAGE
  $ ht destinations

DESCRIPTION
  List all destinations in current workspace

ALIASES
  $ ht destination

EXAMPLES
  $ ht destinations

See code: src/commands/destinations.ts

ht inspect RESOURCE

Inspect resources in the current workspace

USAGE
  $ ht inspect [RESOURCE] -f <value>

ARGUMENTS
  RESOURCE  Resource ID

FLAGS
  -f, --format=<value>  (required) [default: json] Output format(yaml/json)

DESCRIPTION
  Inspect resources in the current workspace

EXAMPLES
  $ ht inspect model/run-user

See code: src/commands/inspect.ts

ht login

Login hightouch with api key

USAGE
  $ ht login

DESCRIPTION
  Login hightouch with api key

EXAMPLES
  $ ht login

See code: src/commands/login.ts

ht models

List all models in current workspace

USAGE
  $ ht models

DESCRIPTION
  List all models in current workspace

ALIASES
  $ ht model

EXAMPLES
  $ ht models

See code: src/commands/models.ts

ht runs

List all syncs run for a given sync

USAGE
  $ ht runs -s <value> [-l <value>]

FLAGS
  -l, --limit=<value>  [default: 5] Limit the number of runs to output
  -s, --sync=<value>   (required) Specify sync name to list runs

DESCRIPTION
  List all syncs run for a given sync

ALIASES
  $ ht run

EXAMPLES
  $ ht runs

See code: src/commands/runs.ts

ht sources

List all sources in current workspace

USAGE
  $ ht sources

DESCRIPTION
  List all sources in current workspace

ALIASES
  $ ht source

EXAMPLES
  $ ht sources

See code: src/commands/sources.ts

ht syncs

List all syncs in current workspace

USAGE
  $ ht syncs

DESCRIPTION
  List all syncs in current workspace

ALIASES
  $ ht sync

EXAMPLES
  $ ht syncs

See code: src/commands/syncs.ts

ht trigger SYNC

Trigger sync to run

USAGE
  $ ht trigger [SYNC] [-f] [-q]

ARGUMENTS
  SYNC  Sync ID

FLAGS
  -f, --full-sync  Whether to run a full sync
  -q, --quiet      Whether to show run progress

DESCRIPTION
  Trigger sync to run

EXAMPLES
  $ ht trigger --sync test123

See code: src/commands/trigger.ts

Local Development

Hightouch cli is written in typescripts. To test or develop in local development:

  1. Install latest LTS nodejs.

  2. Run

$ ./script/dev

License

Copyright [2022] Carry Technologies, Inc. dba Hightouch

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

cli's People

Contributors

strongmonkey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cli's Issues

Release missing hash for arm64

I had to modify the download_and_verify function in the script to install ht CLI on an m1 macbook because there is no arm64 hash available for the install script to download.

Lines causing the issue:

cli/install.sh

Lines 124 to 129 in c9efb8f

download_hash() {
HASH_URL=${GITHUB_URL}/download/${VERSION_HT}/sha256sum-${ARCH}.txt
info "Downloading hash ${HASH_URL}"
curl -o "${TMP_HASH}" -sfL "${HASH_URL}" || fatal "Hash download failed"
HASH_EXPECTED=$(grep " ht${SUFFIX}$" "${TMP_HASH}" | awk '{print $1}')
}

cli/install.sh

Lines 74 to 79 in c9efb8f

arm64)
ARCH=arm64
;;
aarch64)
ARCH=arm64
;;

Error message:

[INFO] Finding latest release
[INFO] Using v0.1.0 as release
[INFO] Downloading hash https://github.com/hightouchio/cli/releases/download/v0.1.0/sha256sum-arm64.txt
[ERROR] Hash download failed

Function I had to modify:

cli/install.sh

Lines 177 to 192 in c9efb8f

download_and_verify() {
setup_verify_arch
verify_curl
setup_tmp
get_release_version
download_hash
if installed_hash_matches; then
info "Skipping binary downloaded, installed ht matches hash"
return
fi
download_binary
verify_binary
setup_binary
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.