# Send NEAR Protocol CLI installation and setup guide. to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "near-cli-tools",
    "name": "NEAR Protocol CLI installation and setup guide.",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/cuongdcdev/near-cli-tools",
    "canonicalUrl": "https://clawhub.ai/cuongdcdev/near-cli-tools",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/near-cli-tools",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=near-cli-tools",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package.json",
      "README.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "near-cli-tools",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-05T23:01:56.762Z",
      "expiresAt": "2026-05-12T23:01:56.762Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=near-cli-tools",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=near-cli-tools",
        "contentDisposition": "attachment; filename=\"near-cli-tools-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "near-cli-tools"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/near-cli-tools"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/near-cli-tools",
    "downloadUrl": "https://openagent3.xyz/downloads/near-cli-tools",
    "agentUrl": "https://openagent3.xyz/skills/near-cli-tools/agent",
    "manifestUrl": "https://openagent3.xyz/skills/near-cli-tools/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/near-cli-tools/agent.md"
  }
}
```
## Documentation

### NEAR Tools - NEAR CLI Installation & Setup

CRITICAL FOR AGENTS: Before calling any near command, you MUST find the absolute path of the near binary (e.g., using which near or whereis near) and use that absolute path in your commands. This ensures consistency across different shell environments.

This skill provides comprehensive guidance for installing and setting up the NEAR Protocol CLI (near-cli-rs) on any platform.

### Installation Methods

Choose the installation method that works best for your system:

### Option 1: Shell Script (Linux, macOS, WSL)

Best for: Most Linux and macOS users

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

if not add near to PATH:
find the near binary by whereis near

Add to PATH:

# Temporary (current session only)
export PATH="$HOME/.cargo/bin:$PATH"

# Permanent (add to your shell config)
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc  # For bash
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc   # For zsh

Reload your shell or run:

source ~/.bashrc   # or ~/.zshrc

### Option 2: npm/npx (Any Platform with Node.js)

Best for: JavaScript/TypeScript developers, Windows users

Run directly without installation:

npx near-cli-rs

Install globally:

npm install -g near-cli-rs

Or add to package.json:

npm install --save-dev near-cli-rs

Then use:

npx near-cli-rs

### Option 3: Windows Installer

Best for: Windows users without Node.js or Cargo

Visit: https://github.com/near/near-cli-rs/releases/latest
Download the Windows MSI installer (e.g., near-cli-rs-installer-x64.msi)
Double-click the installer and follow the wizard
The installer automatically adds NEAR CLI to your PATH

### Option 4: Cargo (Rust)

Best for: Rust developers, custom builds

Prerequisites: Install Rust first from https://rustup.rs/

Install:

cargo install near-cli-rs

Or install latest from git:

cargo install --git https://github.com/near/near-cli-rs

Linux users may need:

# Debian/Ubuntu
sudo apt install libudev-dev

# Fedora/Red Hat
sudo dnf install libudev-devel

### Verification

After installation, verify it's working:

near --version

Expected output:

near-cli-rs 0.23.6  # or newer version

If the command is not found:

Make sure the installation directory is in your PATH:
echo $PATH | grep cargo  # Check if cargo/bin is in PATH



If not found, add it manually:
export PATH="$HOME/.cargo/bin:$PATH"



Test again:
near --version

### View Configuration Location

near --help
# Output will show where config is stored, typically:
# "near CLI configuration is stored in ~/.config/near-cli/config.toml"

### View Available Commands

near --help

Main command groups:

account - Manage accounts (view, create, import, export)
tokens - Manage token assets (NEAR, FT, NFT)
staking - Manage staking (view, add, withdraw)
contract - Manage smart contracts (deploy, call functions)
transaction - Operate transactions
config - Manage connections in config.toml

### View Your Account Summary

If you already have a NEAR account:

near account view-account-summary <your-account.near> network-config mainnet now

Example:

near account view-account-summary near network-config mainnet now

### Import an Existing Account

If you have a seed phrase or key:

near account import-account

Follow the interactive prompts to sign in.

### Create a New Account

If you don't have an account yet:

near account create-account

Follow the prompts to create a new account (requires existing account to fund it).

### "near: command not found"

Cause: NEAR CLI is not in your PATH

Solution:

# For shell script installation
export PATH="$HOME/.cargo/bin:$PATH"

# For npm global installation
export PATH="$(npm config get prefix)/bin:$PATH"

# Make it permanent by adding to ~/.bashrc or ~/.zshrc

### "Permission denied" when running installer

Cause: Lack of execute permissions

Solution:

chmod +x near-cli-rs-installer.sh
./near-cli-rs-installer.sh

### "near-cli-rs-installer.sh: No such file"

Cause: Download didn't work or file name changed

Solution:

# Check the releases page manually
curl -s https://api.github.com/repos/near/near-cli-rs/releases/latest | grep "browser_download_url" | grep "installer.sh"

### Installation hangs or is slow

Cause: Network issues or slow connection

Solution:

# Use a longer timeout with curl
curl --proto '=https' --tlsv1.2 -LsSf --connect-timeout 30 --max-time 300 https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

### Version Information

Latest stable version: 0.23.6 (as of documentation date)
Check for updates: Visit https://github.com/near/near-cli-rs/releases
Update: Re-run the installation command with the desired version

### Additional Resources

Official GitHub: https://github.com/near/near-cli-rs
NEAR Protocol Docs: https://docs.near.org/
NEAR Stack Overflow: https://stackoverflow.com/questions/tagged/nearprotocol
NEAR Discord: https://discord.gg/near

### Quick Reference

# Install (Shell script)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/near-cli-rs/releases/latest/download/near-cli-rs-installer.sh | sh

# Install (npx)
npx near-cli-rs

# Verify installation
near --version

# View account
near account view-account-summary <account-id> network-config mainnet now

# Import account
near account import-account

# Help
near --help
near account --help
near tokens --help
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: cuongdcdev
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-05T23:01:56.762Z
- Expires at: 2026-05-12T23:01:56.762Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/near-cli-tools)
- [Send to Agent page](https://openagent3.xyz/skills/near-cli-tools/agent)
- [JSON manifest](https://openagent3.xyz/skills/near-cli-tools/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/near-cli-tools/agent.md)
- [Download page](https://openagent3.xyz/downloads/near-cli-tools)