Skip to content

SKaaalper/Nexus-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

Nexus Testnet II CLI Installation

image

Nexus Layer 1: Planetary scale, Exponential performance. Built for everyone.

Guide on How to buy VPS: Contabo

NEX POINTS:

  • Earn NEX Points by contributing computing power and actively engaging with the Nexus ecosystem through various interactions and activities.
  • You can connect and manage multiple devices—including desktops, laptops, mobiles, and servers—under one Nexus account.
  • You can prove computations across multiple browser tabs at the same time.

Create an Account:

  • Visit: https://app.nexus.xyz
  • If you were on Testnet 1 before, you can connect your email to earn more points soon.
  • Follow the account linking instructions.
  • Your contributions will earn NEX Points.
  • Track your progress on the leaderboard.
  • Manage all your nodes in one place.

INSTALLATION:

  1. Update and Install Dependencies:

    sudo apt update && sudo apt upgrade -y && sudo apt install -y curl build-essential pkg-config libssl-dev git-all protobuf-compiler
    
    • Install Latest Protobuf Compiler (protoc 25.2)
    PROTOC_VERSION=25.2
    wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
    sudo unzip -o protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /usr/local
    rm protoc-${PROTOC_VERSION}-linux-x86_64.zip
    sudo chmod +x /usr/local/bin/protoc
    
    protoc --version
    
    • Output: libprotoc 25.2
  2. Install Rust and Cargo:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
    • Press Enter to Default
  3. Configure Rust Environment:

    source $HOME/.cargo/env && echo 'source $HOME/.cargo/env' >> ~/.bashrc && source ~/.bashrc
    
  4. Add the riscv32i Target:

    rustup target add riscv32i-unknown-none-elf
    
  5. Create a Screen Session:

    screen -S nexus
    
  6. Install Nexus CLI:

    curl https://cli.nexus.xyz/ | sh
    
    • Do you agree to the Nexus Beta Terms of Use (https://nexus.xyz/terms-of-use)? (Y/n) : Choose Y

    • Enter '2' to start earning NEX by connecting adding your node ID: Choose 2

      image

    • Enter your node ID, You can get it on the website HERE: Click Add Node > Click Add CLI > Copy the Node ID and paste it.

      image

    • If this is the result on your Prover node, then you're good. Now, you just need to wait for it to sync to your dashboard.

      image

If you're experiencing issues due to using VPS 1 and encountering a core dump,Killed, use this command:

curl -O https://gist.githubusercontent.com/NodeFarmer/013a495f61761903b1378a64cbe64810/raw/2524770f735e2c292d30e02c11f5447b052f63ad/nexus_swap.sh && chmod +x nexus_swap.sh && ./nexus_swap.sh
  • Run NEXUS CLI again:
curl https://cli.nexus.xyz/ | sh
  1. Detach from the Screen Session:
    • Press Ctrl + A, then Press D
    • Reattach to the Screen: screen -r nexus

Contribute Web browser:

  1. Visit: https://app.nexus.xyz/

image

  1. Many are facing auto-disconnect issues. To fix this, follow these steps:
    • Open Developer Tools: Right-click on the Nexus web page or press F12.
    • Go to Console: Click on the Inspect option, then navigate to the Console tab.
    • Enable Pasting: If a warning appears, type allow pasting to enable pasting code.
    • Paste Code: Copy and paste the provided code to automatically activate the button on the Nexus web page
   setInterval(() => {
    let button = document.querySelector('.relative.w-24.h-16');

    if (button) {
        let isOff = button.classList.contains('border-gray-400');

        if (isOff) {
            button.click();
            console.log("Button turned ON!");
        }
    }
}, 1000);

image

Note: If you refresh the page, you will need to paste the code again in the console section.

  1. Option 2 you can use this in your chrome browser:
    • Download TamperMonkey extension chrome: Here
    • Open Extension
    • Click Create New Script
    • Enter this code:
// ==UserScript==
// @name         Nexus Auto Clicker
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Automatically clicks the target button on Nexus app if not connected.
// @author       You
// @match        https://app.nexus.xyz/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function autoClick() {
    const targetSelector = '.relative.w-24.h-16.rounded-full.cursor-pointer';
    const checkInterval = 2000; // Check every 2 seconds

    function checkAndClick() {
        const target = document.querySelector(targetSelector);

        if (target) {
            console.log("Target found!");

            const img = target.querySelector('img[alt="Circle Image"]');
            if (img && img.classList.contains("brightness-0") && img.classList.contains("invert")) {
                console.log("Not connected! Clicking...");
                target.click();
            } else {
                console.log("Already connected.");
            }
        } else {
            console.log("Target not found.");
        }
    }

    setInterval(checkAndClick, checkInterval);
})();
  • Click save
  • Go to nexus web Web Node and REFRESH
  • Check on Tampermonkey extension, make sure it enable and nexus auto click script enabled
  • it will auto connect node everytime you open nexus website and alsol auto reconnect your node if it disconnected

Delete Nexus Node:

screen -ls | awk '/nexus/ {print $1}' | xargs -I {} screen -X -S {} quit && pkill -f nexus && rm -rf ~/.nexus && rm -f /usr/local/bin/nexus
  • Verify if Deleted:
screen -ls
ls -la ~/.nexus
which nexus

Releases

No releases published

Packages

No packages published