Neo CLI
A command-line interface for interacting with the Neo N3 blockchain, built on the NeoRust SDK (neo3).
Overview
Neo CLI wraps common SDK workflows into a single tool: network connectivity checks, contract operations, DeFi helpers, NeoFS commands, and project generation templates.
Note: some subcommands are still placeholders and may return “NotImplemented”. Use
neo-cli --helpfor the authoritative list of available commands.
Installation
From Source
# Clone the repository
# Build the CLI tool
# Run the CLI
Using Cargo
# If/when published to crates.io:
Quick Start
# Show top-level help
# Initialize configuration (optional; creates a config file in your OS config dir)
# Create a wallet file (prompts for password unless provided)
# Connect to a network (interactive if omitted)
# Inspect network state
# Token/DeFi helpers
# Check NeoFS connection status
# Generate a new project from templates
Command Reference
Run neo-cli --help (and neo-cli <command> --help) for the full set of flags and subcommands.
Network
neo-cli network connect: connect to an RPC endpoint / named networkneo-cli network status: show basic network informationneo-cli network peers: list peers (requires a working connection)neo-cli network block: fetch latest (or specified) block
Wallet
neo-cli wallet create,open,backup,restore,hd-walletneo-cli wallet sendandneo-cli wallet balanceexist, but some on-chain operations are still stubbed; for now,neo-cli de-fi tokenandneo-cli de-fi balance <TOKEN> <ADDRESS>are the most reliable token helpers.
Contracts
neo-cli contract deploy,update,invoke,list-native-contracts
DeFi
neo-cli de-fi tokenandneo-cli de-fi balancefor token metadata/balance queriesneo-cli de-fi transferexists, but signing workflows are still evolving (see subcommand--help)- Protocol helpers:
neo-cli de-fi flamingo ...,neo-cli de-fi neo-burger ...,neo-cli de-fi neo-compound ...,neo-cli de-fi grand-share ...
NeoFS
neo-cli fs ...: endpoints, container, object, statusneo-cli neo-fs ...: advanced NeoFS commands (acl/config/status)
# List all available NeoFS endpoints for mainnet
# Test connection to a specific endpoint
# Get detailed information about an endpoint
# Create a container
# Upload a file
# Download a file
Configuration
Neo CLI uses a configuration file to store settings like network preferences, RPC endpoints, and more. You can initialize the configuration with:
The default location for the configuration file is in your system's config directory under neo-cli/config.json.
Testing
The Neo CLI includes comprehensive automated tests to ensure functionality and help with development.
Running Tests
To run CLI tests:
Test Structure
- Unit Tests: Test individual functions and components
- Integration Tests: Test the CLI commands from a user perspective
defi_tests.rs: Tests for DeFi and well-known contract commandsfs_tests.rs: Tests for NeoFS storage operationsblockchain_tests.rs: Tests for blockchain query commandswallet_tests.rs: Tests for wallet management commands
Writing New Tests
When adding new features to the CLI, follow this pattern for testing:
- Create unit tests for new functions in the source files
- Add integration tests in the appropriate test module
- Run the tests to verify functionality
- Ensure both success cases and error handling are tested
Development
Building from Source
License
MIT License
Credits
Developed by the R3E Network team
Copyright © 2020-2025 R3E Network. All rights reserved.