LogoLogo
Go ToJoin the Community
  • Getting Started
    • Introduction
    • How it Works
    • Onboarding
  • Examples
    • Tutorials
      • Hello, World!
      • Image Generation w/ Stable Diffusion
  • CREATE WITH BYTENITE
    • Building Blocks
      • Apps
      • Job Templates
  • SDK
    • ByteNite Dev CLI
  • Launch with ByteNite
    • Data Sources
      • AWS S3
      • Google Cloud Storage
      • Storj
      • HTTP
      • File Upload
      • Temporary Bucket
    • Jobs
  • API Reference
    • Customer API
      • Jobs
        • Create
        • Read
        • Update
        • Manage
        • Other
      • Logs
      • Data Sources
      • Templates
      • Events
    • Authentication API
      • Access Token
      • API Keys
      • Secrets
      • User
    • Developer API
      • Apps
        • Metadata
        • Push
        • Manage
        • Pull
      • Engines
        • Metadata
        • Push
        • Manage
        • Pull
      • Templates
    • Wallet API
      • Balance
      • Transactions
      • Exchange Rate
      • Redeem Coupon
  • GUI
  • Other
    • Glossary
    • Feature Requests
    • Status
Powered by GitBook

© 2025 ByteNite Inc.

On this page
  • Download & Install
  • Authenticate
  • Commands & Usage

Was this helpful?

Export as PDF
  1. SDK

ByteNite Dev CLI

PreviousJob TemplatesNextData Sources

Last updated 11 days ago

Was this helpful?

The Dev CLI is a tool for developers to create and manage apps on ByteNite.

Download & Install

Quick Installation Script

The following script automates the installation of the ByteNite Dev CLI tool.

#!/bin/bash

# Define variables
ARCH="darwin-arm64"  # Available releases: darwin-arm64, darwin-amd64, linux-amd64, linux-arm64, windows-amd64.exeed
TARGET_NAME="bytenite"
GLOBAL_PATH="/usr/local/bin/$TARGET_NAME"

# Fetch the latest release download URL
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/ByteNite2/bytenite-dev-cli/releases/latest | grep "browser_download_url.*$ARCH" | cut -d '"' -f 4)

if [ -z "$LATEST_RELEASE_URL" ]; then
  echo "Error: Failed to fetch the latest release URL for $ARCH. Exiting."
  exit 1
fi

# Download the file
curl -L -o "$TARGET_NAME" "$LATEST_RELEASE_URL"
if [ $? -ne 0 ]; then
  echo "Error: Failed to download $LATEST_RELEASE_URL. Exiting."
  exit 1
fi

echo "Downloaded $LATEST_RELEASE_URL as $TARGET_NAME."

# Set executable permissions
chmod +x "$TARGET_NAME"
if [ $? -ne 0 ]; then
  echo "Error: Failed to set executable permissions on $TARGET_NAME. Exiting."
  exit 1
fi

echo "Set executable permissions on $TARGET_NAME."

# Remove the previous version if it exists
if [ -f "$GLOBAL_PATH" ]; then
  echo "Removing previous version of $TARGET_NAME..."
  sudo rm -f "$GLOBAL_PATH"
  if [ $? -ne 0 ]; then
    echo "Error: Failed to remove old version of $TARGET_NAME. Exiting."
    exit 1
  fi
  echo "Previous version removed."
fi

# Move the new executable to /usr/local/bin
sudo mv "$TARGET_NAME" "$GLOBAL_PATH"
if [ $? -ne 0 ]; then
  echo "Error: Failed to move $TARGET_NAME to $GLOBAL_PATH. Exiting."
  exit 1
fi

echo "Moved $TARGET_NAME to $GLOBAL_PATH."

# Verify installation
echo "Verifying installation..."
if command -v $TARGET_NAME >/dev/null 2>&1; then
  echo "$TARGET_NAME is successfully installed. Run '$TARGET_NAME --help' to verify."
else
  echo "Error: $TARGET_NAME is not installed correctly. Exiting."
  exit 1
fi

# Print installed version
echo "Installed $TARGET_NAME version:"
$TARGET_NAME version

Download the Latest Version

  1. Get the latest .

    • Executable files are available for Unix-like systems (e.g., Linux, macOS) and Windows.

Rename the Executable

  1. For convenience, rename the downloaded file to bytenite to avoid typing the full command bytenite-cli-[release] each time.

Set Executable Permissions

  1. Ensure the file has executable permissions:

chmod +x bytenite
Additional Permissions for Mac Users

Mac users have to manually give permissions for the System Settings > Privacy & Security before running a ByteNite command the first time.

Follow the necessary steps as shown in the image below to let your OS know ByteNite is safe to use.

Install Globally (Optional)

  1. To install the executable globally, move it to a directory included in your system's PATH, such as /usr/local/bin or /usr/bin. Use the following command:

sudo mv bytenite /usr/local/bin/

Verify Installation

  1. Run the executable from anywhere using:

bytenite [command]


Authenticate

  1. To authenticate, run:

bytenite auth

This will open an oAuth2 authentication page in your browser. The login is automatic if you're already logged in on ByteNite.

After successful authentication, credentials will be stored in the application support or configuration directory:

  • Linux: /$HOME/.config/bytenite-cli/auth.json

  • Mac: /Users/[user]/Library/Application Support/bytenite-cli/auth.json


Commands & Usage

Run the help command to get started with the ByteNite Dev CLI:

bytenite --help

Authentication

  • Authenticate with OAuth2: bytenite auth

Version

  • Get Dev CLI Version: bytenite version

App Commands

  • App Command Info: bytenite app --help

  • Initialize New App: bytenite app new [app_name]

  • Push/Upload App: bytenite app push [app_folder]

  • Pull/Download App: bytenite app pull [app_tag]

  • Get App Details: bytenite app get [app_tag]

  • List Existing Apps: bytenite app list

  • Activate App: bytenite app activate [app_tag]

  • Deactivate App: bytenite app deactivate [app_tag]

  • Get App Status: bytenite app status [app_tag]

Template Commands

  • Template Command Info: bytenite template --help

  • Initialize New Template: bytenite template new [template_id]

  • Push/Upload Template: bytenite template push [template_filepath]

  • Pull/Download Template: bytenite template pull [template_id]

  • Get Template Details: bytenite template get [template_id]

  • List Existing Templates: bytenite template list

Engine Commands

  • Engine Command Help: bytenite engine --help

  • Initialize New Engine: bytenite engine new [engine_name]

  • Push/Upload Engine: bytenite engine push [engine_folder]

  • Pull/Download Engine: bytenite engine pull [engine_tag]

  • Get Engine Details: bytenite engine get [engine_tag]

  • List Existing Engines: bytenite engine list

ByteNite CLI release from GitHub