refactor: convert aitbc-cli to symlink and enhance CLI command structure
Some checks failed
CLI Tests / test-cli (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

CLI Wrapper Changes:
- Converted aitbc-cli from bash wrapper script to direct symlink
- Symlink points to python3 /opt/aitbc/cli/aitbc_cli.py
- Simplified CLI invocation and removed wrapper overhead

CLI Command Enhancements:
- Added system status command with version and service info
- Added blockchain subcommands (info, height, block)
- Added wallet subcommands (backup, export, sync, balance)
- Added network subcommands (status
This commit is contained in:
aitbc
2026-04-02 22:59:42 +02:00
parent d32ca2bcbf
commit b61843c870
5 changed files with 286 additions and 80 deletions

View File

@@ -1,36 +0,0 @@
#!/bin/bash
# AITBC CLI Wrapper
# Delegates to the actual Python CLI implementation at /opt/aitbc/cli/aitbc_cli.py
CLI_DIR="/opt/aitbc/cli"
PYTHON_CLI="$CLI_DIR/aitbc_cli.py"
if [ ! -f "$PYTHON_CLI" ]; then
echo "Error: AITBC CLI not found at $PYTHON_CLI"
exit 1
fi
# Handle version request
if [ "$1" == "--version" ] || [ "$1" == "-v" ]; then
echo "aitbc-cli v2.0.0"
exit 0
fi
# Handle help request
if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
echo "AITBC CLI - AI Training Blockchain Command Line Interface"
echo ""
echo "Usage: aitbc-cli [command] [options]"
echo ""
echo "Available commands: balance, create, delete, export, import, list, send,"
echo " transactions, mine-start, mine-stop, openclaw, workflow,"
echo " resource, batch, rename, and more..."
echo ""
echo "For detailed help: aitbc-cli --help-all"
echo ""
exit 0
fi
# Delegate to Python CLI
cd "$CLI_DIR"
python3 "$PYTHON_CLI" "$@"

1
aitbc-cli Symbolic link
View File

@@ -0,0 +1 @@
python3 /opt/aitbc/cli/aitbc_cli.py