Files
aitbc/docs/archive/cli/3_cli_OLD_duplicate.md
aitbc1 d5b5c39d28
Some checks failed
AITBC CI/CD Pipeline / lint-and-test (3.13.5) (push) Has been cancelled
AITBC CI/CD Pipeline / test-cli (push) Has been cancelled
AITBC CI/CD Pipeline / test-services (push) Has been cancelled
AITBC CI/CD Pipeline / test-production-services (push) Has been cancelled
AITBC CI/CD Pipeline / security-scan (push) Has been cancelled
AITBC CI/CD Pipeline / build (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-staging (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-production (push) Has been cancelled
AITBC CI/CD Pipeline / performance-test (push) Has been cancelled
AITBC CI/CD Pipeline / docs (push) Has been cancelled
AITBC CI/CD Pipeline / release (push) Has been cancelled
AITBC CI/CD Pipeline / notify (push) Has been cancelled
GPU Benchmark CI / gpu-benchmark (3.13.5) (push) Has been cancelled
Security Scanning / Bandit Security Scan (apps/coordinator-api/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (cli/aitbc_cli) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-core/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-crypto/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-sdk/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (tests) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (javascript) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (python) (push) Has been cancelled
Security Scanning / Dependency Security Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / OSSF Scorecard (push) Has been cancelled
Security Scanning / Security Summary Report (push) Has been cancelled
fix: resolve pathological nesting in docs/archive directory
CRITICAL FIX: Archive directory had severe 'box in a box' nesting issue

PROBLEM IDENTIFIED:
- Pathological nesting: 46 levels deep in archive directory
- Structure: /docs/archive/by_category/infrastructure/by_category/security/by_category/core_planning/.../cli
- Usability: Completely unusable, impossible to navigate
- Maintenance: Impossible to maintain or update

SOLUTION APPLIED:
 Extracted all .md files from deeply nested structure
 Created flat, organized structure by content category
 Preserved all content without any loss
 Backed up broken structure to archive_broken_backup

NEW STRUCTURE:
/docs/archive/
├── analytics/          # 6 files - AI agent communication analysis
├── backend/            # 3 files - Backend system documentation
├── cli/                # 16 files - CLI implementation and testing
├── core_planning/      # 5 files - Planning and requirements
├── general/            # 16 files - General project documentation
├── infrastructure/     # 10 files - Infrastructure and deployment
└── security/           # 7 files - Security and compliance

RESULTS:
🎯 Before: 46 levels deep, 0% usable
🎯 After: 2 levels max, 100% usable
📁 All 63 files properly categorized and accessible
🔍 Easy navigation and maintenance achieved

BENEFITS:
 Usable archive structure
 Logical content organization
 Easy navigation and maintenance
 All historical documentation preserved
 Scalable for future additions

VERIFICATION:
 All files moved and categorized correctly
 No content lost in transition
 Structure is flat and navigable
 Categories are logical and clear
 Backup created for safety

STATUS: Critical nesting issue completely resolved
2026-03-26 17:48:21 +01:00

251 lines
4.6 KiB
Markdown

# 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
```bash
# 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
```bash
# Fix permissions (one-time setup)
sudo /opt/aitbc/scripts/clean-sudoers-fix.sh
# Test permissions
/opt/aitbc/scripts/test-permissions.sh
```
### Environment Variables
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# 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
```bash
# JSON output
aitbc --output json wallet balance
# YAML output
aitbc --output yaml blockchain info
# Table output (default)
aitbc wallet list
```
### Debug Mode
```bash
# 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
```bash
# 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
```bash
# Fix permissions
/opt/aitbc/scripts/fix-permissions.sh
# Test permissions
/opt/aitbc/scripts/test-permissions.sh
```
#### Service Not Running
```bash
# Check service status
aitbc-services status
# Restart services
aitbc-services restart
# View logs
aitbc-logs
```
#### Command Not Found
```bash
# Check CLI installation
which aitbc
# Load environment
source /opt/aitbc/.env.dev
# Check PATH
echo $PATH | grep aitbc
```
#### API Connection Issues
```bash
# 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
```bash
# 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
- [Complete CLI Reference](../23_cli/README.md)
- [Testing Procedures](../23_cli/testing.md)
- [Permission Setup](../23_cli/permission-setup.md)
- [Exchange Integration](../19_marketplace/exchange_integration.md)
## 🎯 **Tips and Best Practices**
### Development Workflow
```bash
# 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%)