Skip to content

OptimaiNetwork/OptimAI-CLI-Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

OptimAI Node CLI

This repository contains the OptimAI Node CLI. Use it to sign in, run your node, check status, and view rewards.

Full Documentation: For detailed information about the OptimAI Node, please visit our Official Documentation.

Requirements

Before installing, ensure you have:

  • Hardware:
    • RAM: 4 GB minimum (8 GB recommended).
    • CPU: 2 Cores or more.
    • Disk Space: 15 GB free space.
  • Operating System:
    • Windows 10/11
    • macOS 12+ (Intel or Apple Silicon)
    • Ubuntu 22.04+ (or compatible Linux distro)
  • Software:
    • Docker: Docker Desktop (Windows/macOS) or Docker Engine (Linux) must be installed and running.
  • Account: OptimAI account
  • Network: Active internet connection

Install

macOS

Run the following commands in your terminal to download and install:

# Download and rename to optimai-cli
curl -L https://cli-node.optimai.network/optimai_cli_darwin_universal2 -o optimai-cli

# Make executable and install to PATH
chmod +x optimai-cli
sudo mv optimai-cli /usr/local/bin/optimai-cli

Linux (Ubuntu)

# Download and rename to optimai-cli
curl -L https://cli-node.optimai.network/optimai_cli_ubuntu -o optimai-cli

# Make executable and install to PATH
chmod +x optimai-cli
sudo mv optimai-cli /usr/local/bin/optimai-cli

Windows (PowerShell or Command Prompt)

curl.exe -L https://cli-node.optimai.network/optimai_cli_windows.exe -o optimai-cli.exe

After downloading, you can run it from the current folder:

.\optimai-cli.exe --help

Tip: Move optimai-cli.exe to a folder in your System PATH to use it from anywhere as optimai-cli.

Tutorial

Windows note: If you haven't added the binary to your PATH, use .\optimai-cli.exe instead of optimai-cli in the examples below.

1) Sign in

Open a terminal and run:

optimai-cli auth login

This will open your browser to sign in via the OptimAI Node Dashboard. After signing in, you'll be redirected back and the CLI will automatically complete the login process.

Legacy login (email/password): If you prefer to use email/password instead of browser login:

optimai-cli auth login --legacy

2) Start the node

Make sure Docker Desktop is running, then start the node:

optimai-cli node start

Running in the background (Linux/macOS): To keep the node running after closing your terminal, we recommend using a tool like screen:

  1. Start a new session: screen -S optimai
  2. Run the node: optimai-cli node start
  3. Detach: Press Ctrl+A then D
  4. Resume later: screen -r optimai

Otherwise, keep your terminal open while the node is running.

3) Check status

Open a new terminal and run:

optimai-cli node status

4) View rewards

optimai-cli rewards balance

5) Update the CLI

optimai-cli update

6) Stop the node

Press Ctrl+C in the terminal where the node is running.

Command Reference

Windows note: Use .\optimai-cli.exe if the binary isn't in your PATH.

Account:

# Sign in via browser (default)
optimai-cli auth login

# Sign in using email/password (legacy)
optimai-cli auth login --legacy

# Check login status
optimai-cli auth status

# View account info
optimai-cli auth me

# Sign out
optimai-cli auth logout

Node:

optimai-cli node start
optimai-cli node status

Rewards:

optimai-cli rewards balance

Updates:

optimai-cli update

Tips

  • Keep Docker Desktop running before you start the node.

Troubleshooting

  • Browser login not working: If browser login fails or the dashboard doesn't support it yet, use the legacy email/password method with optimai-cli auth login --legacy.
  • Docker not running: If optimai-cli node status shows Docker as not_running, start Docker Desktop and retry.
  • Node already running: If you see "Another node instance is already running", a node process is active in the background.
    • Run optimai-cli node status to check the Process ID (PID).
    • If you need to stop it manually, use your system's task manager or run kill <PID> (macOS/Linux).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages