Files
aitbc/docs/guides/getting-started/3_cli.md
aitbc 19d415a235
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
CLI Tests / test-cli (push) Failing after 3s
Cross-Chain Functionality Tests / test-cross-chain-sync (push) Successful in 2s
Cross-Chain Functionality Tests / test-cross-chain-transactions (push) Successful in 3s
Cross-Chain Functionality Tests / test-cross-chain-bridge (push) Has been skipped
Cross-Chain Functionality Tests / test-multi-chain-consensus (push) Successful in 2s
Cross-Chain Functionality Tests / aggregate-results (push) Has been skipped
Deploy to Testnet / deploy-testnet (push) Successful in 1m12s
Documentation Validation / validate-docs (push) Failing after 8s
Documentation Validation / validate-policies-strict (push) Successful in 3s
Integration Tests / test-service-integration (push) Successful in 2m6s
Multi-Chain Island Architecture Tests / test-multi-chain-island (push) Successful in 2s
Multi-Node Blockchain Health Monitoring / health-check (push) Failing after 4s
P2P Network Verification / p2p-verification (push) Successful in 4s
Package Tests / Python package - aitbc-agent-sdk (push) Successful in 32s
Package Tests / Python package - aitbc-core (push) Successful in 14s
Package Tests / Python package - aitbc-crypto (push) Successful in 12s
Package Tests / Python package - aitbc-sdk (push) Successful in 9s
Package Tests / JavaScript package - aitbc-sdk-js (push) Successful in 8s
Package Tests / JavaScript package - aitbc-token (push) Successful in 17s
Python Tests / test-python (push) Successful in 15s
Security Scanning / security-scan (push) Successful in 27s
Node Failover Simulation / failover-test (push) Successful in 7s
Multi-Node Stress Testing / stress-test (push) Successful in 6s
Cross-Node Transaction Testing / transaction-test (push) Successful in 4s
feat: add SQLCipher database encryption support and consolidate agent documentation
- Add SQLCipher encryption for ait-mainnet database with configurable flag
- Add db_encryption_enabled and db_encryption_key_path config settings
- Implement encryption key loading and PRAGMA key setup via connection events
- Add shutdown_db function for proper database cleanup
- Export middleware classes in aitbc/__init__.py
- Fix import path in sync.py for settings
- Remove duplicate agent documentation from docs
2026-05-03 12:00:38 +02:00

4.6 KiB

AITBC CLI Getting Started Guide

Complete Command Line Interface Setup and Usage

🚀 Quick Start

Prerequisites

  • Linux system (Debian 13+ recommended)
  • Python 3.13+ installed
  • System access (sudo for initial setup)

Installation

# 1. Load development environment
source /opt/aitbc/.env.dev

# 2. Test CLI installation
aitbc --help
aitbc version

# 3. Verify services are running
aitbc-services status

🔧 Development Environment Setup

Permission Configuration

# Fix permissions (one-time setup)
sudo /opt/aitbc/scripts/clean-sudoers-fix.sh

# Test permissions
/opt/aitbc/scripts/test-permissions.sh

Environment Variables

# Load development environment
source /opt/aitbc/.env.dev

# Available aliases
aitbc-services    # Service management
aitbc-fix         # Quick permission fix
aitbc-logs        # View logs

📋 Basic Operations

Wallet Management

# Create new wallet
aitbc wallet create --name "my-wallet"

# List wallets
aitbc wallet list

# Check balance
aitbc wallet balance --wallet "my-wallet"

# Get address
aitbc wallet address --wallet "my-wallet"

Exchange Operations

# Register with exchange
aitbc exchange register --name "Binance" --api-key <your-api-key>

# Create trading pair
aitbc exchange create-pair AITBC/BTC

# Start trading
aitbc exchange start-trading --pair AITBC/BTC

# Check exchange status
aitbc exchange status

Blockchain Operations

# Get blockchain info
aitbc blockchain info

# Check node status
aitbc blockchain status

# List recent blocks
aitbc blockchain blocks --limit 10

# Check balance
aitbc blockchain balance --address <address>

🛠️ Advanced Usage

Output Formats

# JSON output
aitbc --output json wallet balance

# YAML output
aitbc --output yaml blockchain info

# Table output (default)
aitbc wallet list

Debug Mode

# Enable debug output
aitbc --debug wallet list

# Test mode (uses mock data)
aitbc --test-mode exchange status

# Custom timeout
aitbc --timeout 60 blockchain info

Configuration

# Show current configuration
aitbc config show

# Get specific config value
aitbc config get coordinator_url

# Set config value
aitbc config set timeout 30

# Edit configuration
aitbc config edit

🔍 Troubleshooting

Common Issues

Permission Denied

# Fix permissions
/opt/aitbc/scripts/fix-permissions.sh

# Test permissions
/opt/aitbc/scripts/test-permissions.sh

Service Not Running

# Check service status
aitbc-services status

# Restart services
aitbc-services restart

# View logs
aitbc-logs

Command Not Found

# Check CLI installation
which aitbc

# Load environment
source /opt/aitbc/.env.dev

# Check PATH
echo $PATH | grep aitbc

API Connection Issues

# Test with debug mode
aitbc --debug blockchain status

# Test with custom URL
aitbc --url http://localhost:8000 blockchain info

# Check service endpoints
curl http://localhost:8000/health

Debug Mode

# Enable debug for any command
aitbc --debug <command>

# Check configuration
aitbc config show

# Test service connectivity
aitbc --test-mode blockchain status

📚 Next Steps

Explore Features

  1. Wallet Operations: Try creating and managing wallets
  2. Exchange Integration: Register with exchanges and start trading
  3. Blockchain Operations: Explore blockchain features
  4. Compliance: Set up KYC/AML verification

Advanced Topics

  1. Market Making: Configure automated trading
  2. Oracle Integration: Set up price feeds
  3. Security: Implement multi-sig and time-lock
  4. Development: Build custom tools and integrations

Documentation

🎯 Tips and Best Practices

Development Workflow

# 1. Load environment
source /opt/aitbc/.env.dev

# 2. Check services
aitbc-services status

# 3. Test CLI
aitbc version

# 4. Start development
aitbc wallet create

Security Best Practices

  • Use strong passwords for wallet encryption
  • Enable multi-sig for large amounts
  • Keep API keys secure
  • Regular backup of wallets
  • Monitor compliance requirements

Performance Tips

  • Use appropriate output formats for automation
  • Leverage test mode for development
  • Cache frequently used data
  • Monitor service health

Last Updated: March 8, 2026
CLI Version: 0.1.0
Test Coverage: 67/67 tests passing (100%)