Kinto CLI is a command line utility for accessing Kinto Core.
- Make sure you use bash to run this script
unzip
should be installed. If you don't already have it install it usingsudo apt-get install -y unzip
or similar command depending on your linux distro
Run the installation script to install Kinto CLI to its default location usr/local/bin
:
curl -L https://raw.githubusercontent.com/kintoproj/kinto-cli/main/install.sh | bash
- Windows 7 SP1+ or Windows Server 2008+
- PowerShell 5 (or later, include PowerShell Core)
- PowerShell must be enabled for your user account (e.g.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
) - Run PowerShell as Administrator to avoid any errors
Run the following command from your PowerShell to install Kinto CLI to its default location C:\Users\<user>\kinto
.
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/kintoproj/kinto-cli/main/install.ps1')
or
iwr -useb raw.githubusercontent.com/kintoproj/kinto-cli/main/install.ps1 | iex
💡 You can also download the latest available release for your operating system from releases and add it to your global
PATH
manually.
Kinto CLI is written in Golang using the popular package Cobra and it uses Go Modules to make working with external dependencies easy.
Kinto CLI follows the following project structure:
cli
|── internal (houses all the code for the CLI.)
├── api (provides access to different components of the CLI such as `environments`, `services/blocks`, etc.)
├── cli (contains the root file that houses all the command declarations.)
├── config (stores the consts and configs for the CLI.)
├── controller (hosts the business logic for all the functions declared in **cli**.)
└── utils (contains the basic utility functions needed by the CLI.)
Follow the below given instructions to set up the project locally.
- Clone the repository and
cd
into it:
git clone https://github.com/kintoproj/kintohub
cd kintohub/cli
- Once you have a local copy of KintoHub repository on your machine, you can use an IDE such as Goland to make working with Golang easier or you can do the setup manually by:
go mod download
- You can build the CLI binary file for your operating system by running the command:
go build
- And install it to
$GOPATH/go/bin/
by:
go install
For a detailed overview of the available CLI commands see CLI docs.