Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koxy-cli

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koxy-cli

Command-line tool to run your Koxy serverless APIs locally or in the cloud

  • 1.2.2
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Koxy CLI

The Koxy Command Line Interface (CLI) can be used to test, run, manage, and sync your Koxy serverless APIs from your command line.

  • Run and test your API locally.

  • Run your API in the Koxy edge-cloud served from 35 regions.

  • Sync your API data across devices and keep a backup of it.

What is Koxy AI

Koxy AI is a low-code decentralized platform that allows you to build sevrerless globally distributed, secure, fast, scalable, and flexible APIs with no-code and zero config.

With Koxy AI you can serve your API from 35 regions around the world edge-close to your users.

Installation

You can install Koxy CLI using npm (the Node Package Manager). Note that you will need to install Node.js and npm. Installing Node.js should install npm as well.

Run the following command to download and install Koxy CLI:

npm install -g koxy-cli

This will provide you with the globally accessible koxy command.

Commands

Here is our small list of commands. all the commands are cloudspace-specific (API or project specefic) so you need to be inside your cloudspace/project directory to run them.

CommandDescription
initSetup a new cloudspace/project in the current directory. This command will create a koxy.config.json configuration file in your current directory
runRun your API locally. See the full docs.
cloudrunRun your API in the edge-cloud. See the full docs.
syncSync your data across devices using Koxy Syncer. See the full docs.

Usage

Setting up

We recommend you check the Quick start guide.

After creating an account and a Cloudspace in Koxy AI platform, you can run the following commands to start running your API:

First create a directory for your Cloudspace

mkdir myApi && cd myApi

Now setup Koxy in your directory

koxy init cloudspace=CLOUDSPACE_TOKEN

Now you should see a koxy.config.json file in your directory, and It should look something like this:

{
    "cloudspace": CLOUDSPACE_TOKEN,
    "local": {
        "entry": "main",
        "logs": true,
        "responseType": "json"
    },
    "cloud": {
        "entry": "main",
        "source": "flows"
    }
}

Run your API

You can run your API locally using the following command

koxy run

You can also pass your configurations with every run:

koxy run entry="flow1" logs=false

You can run your API in the cloud using the following command

koxy cloudrun

See full docs on how to run your API

Sync your data

We recommend you check how data works in Koxy AI.

To start running Koxy Syncer, You can run the following command in the directory where you did koxy init to sync your API (cloudspace) data:

koxy sync

Koxy Syncer will start syncing your data immediately. You can see the progress of the sync in your terminal.

to turn the logs off you can do this:

koxy sync logs=off

Using koxy sync will keep Koxy Syncer running in your machine untill you stop it, if You just want to sync your data once and save a backup to your local machine you can do this:

koxy sync once

This will run Koxy Syncer for few seconds, It will sync the data, save a version of it, and turn off. this is only useful if you want to keep a backup of your data so you can get it back if you lose your browser's data.

See the full Koxy Syncer docs here

Keywords

FAQs

Package last updated on 25 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc