Skip to content

SmartArduino/CozyLife-cli

 
 

Repository files navigation

CLI Binaries

中文说明

This directory contains the compiled CLI binaries.

File Names

Artifacts use this naming pattern:

<goos>-<goarch>_<binary>
<goos>-<goarch>_<binary>.exe

Examples:

  • linux-amd64_cli
  • linux-arm64_cli
  • darwin-amd64_cli
  • darwin-arm64_cli
  • windows-amd64_cli.exe
  • windows-arm64_cli.exe

Choose the binary that matches your OS and CPU architecture. The examples below use amd64.

Linux

Run from inside dist/:

./linux-amd64_cli version
./linux-amd64_cli doctor

How to get CL_AUTH_CODE:

  • Open the CozyLife App
  • Go to account information
  • Copy Identity Verification Code
  • This code is valid for 12 hours

Set environment variables:

export CL_AUTH_CODE=your_auth_code
export CL_OUTPUT=json
export CL_LOCALE=en

Initialize token:

./linux-amd64_cli init

Common commands:

./linux-amd64_cli device ls
./linux-amd64_cli device get 685771977cb94c4e4093
./linux-amd64_cli device set 685771977cb94c4e4093 '{"1":1}'
./linux-amd64_cli device log 685771977cb94c4e4093 --dpid 1 --dpid 2
./linux-amd64_cli doctor --output json

Default config path:

${XDG_CONFIG_HOME:-~/.config}/cli/config.json

macOS

Run from inside dist/:

./darwin-amd64_cli version
./darwin-amd64_cli doctor

If you use Apple Silicon, replace it with ./darwin-arm64_cli.

How to get CL_AUTH_CODE:

  • Open the CozyLife App
  • Go to account information
  • Copy Identity Verification Code
  • This code is valid for 12 hours

Set environment variables:

export CL_AUTH_CODE=your_auth_code
export CL_OUTPUT=json
export CL_LOCALE=en

Initialize token:

./darwin-amd64_cli init

Common commands:

./darwin-amd64_cli device ls
./darwin-amd64_cli device get 685771977cb94c4e4093
./darwin-amd64_cli doctor

Default config path:

~/Library/Application Support/cli/config.json

Windows

Use the binary from inside dist\.

PowerShell:

.\windows-amd64_cli.exe version
.\windows-amd64_cli.exe doctor

How to get CL_AUTH_CODE:

  • Open the CozyLife App
  • Go to account information
  • Copy Identity Verification Code
  • This code is valid for 12 hours

Set environment variables in PowerShell:

$env:CL_AUTH_CODE = "your_auth_code"
$env:CL_OUTPUT = "json"
$env:CL_LOCALE = "en"

Set environment variables in Command Prompt:

set CL_AUTH_CODE=your_auth_code
set CL_OUTPUT=json
set CL_LOCALE=en

Initialize token:

.\windows-amd64_cli.exe init

Common commands:

.\windows-amd64_cli.exe device ls
.\windows-amd64_cli.exe device get 685771977cb94c4e4093
.\windows-amd64_cli.exe doctor --output json

Default config path:

%AppData%\cli\config.json

Common Environment Variables

  • CL_AUTH_CODE
  • CL_OUTPUT
  • CL_HTTP_TIMEOUT_SECONDS
  • CL_DEFAULT_PLATFORM
  • CL_DEFAULT_VERSION
  • CL_LOCALE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors