Skip to content

Latest commit

 

History

History

README.md

DAFU CLI Documentation

This directory contains comprehensive CLI documentation for the DAFU platform.


📚 Available Documentation

DAFU CLI Guide 📘 Main Reference

Original comprehensive CLI guide covering:

  • Interactive mode usage
  • All CLI commands
  • Docker integration
  • System information commands

CLI Demo 🎬 Examples & Demos

Demonstrations and examples:

  • Real usage scenarios
  • Screenshot-equivalent text outputs
  • Step-by-step walkthroughs

CLI with API Integration 🔌 API Features NEW

Complete guide for using API features through CLI:

  • Authentication commands
  • Logs management
  • Reports management
  • Products management
  • Integration architecture

CLI Step-by-Step 📋 Detailed Guide NEW

Step-by-step authentication and session management:

  • Login process
  • Session file management
  • Token handling
  • Complete workflows

CLI Usage Complete 📖 Complete Reference NEW

Comprehensive CLI usage guide:

  • All commands explained
  • Usage modes
  • Examples for every feature
  • Troubleshooting

🎯 Quick Start

Basic Usage

# Start DAFU CLI
./dafu

# Interactive mode
dafu> help
dafu> auth login
dafu> logs list
dafu> reports list
dafu> fraud-detection
dafu> exit

Single Command Mode

./dafu help
./dafu auth whoami
./dafu logs stats
./dafu reports list

📋 CLI Command Categories

🔐 Authentication & Users NEW

  • auth login - Login to API
  • auth logout - Logout
  • auth whoami - Show current user
  • auth register - Register new user

📋 Logs Management NEW

  • logs list [limit] - List recent logs
  • logs stats [hours] - Log statistics

📊 Reports Management NEW

  • reports list [limit] - List reports
  • reports create - Create new report
  • reports view <id> - View report details
  • reports stats - Report statistics

🛍️ Products Management NEW

  • products list [limit] - List products
  • products high-risk - High-risk products
  • products stats - Product statistics

🤖 ML Models

  • fraud-detection - Run ML models interactively
  • models - Alias for fraud-detection
  • ml - Alias for fraud-detection

🐳 Docker Services

  • docker up/down/restart - Manage services
  • docker status - Service status
  • docker logs - View logs

📊 System Information

  • status - Platform status
  • version - Version information
  • info - System details

🔑 Prerequisites for API Features

Required Services

  1. PostgreSQL:

    docker run -d --name dafu-postgres \
      -e POSTGRES_USER=dafu \
      -e POSTGRES_PASSWORD=dafu_secure_password \
      -e POSTGRES_DB=dafu \
      -p 5432:5432 \
      postgres:15-alpine
  2. API Server:

    cd fraud_detection
    ./start_api.sh

💡 Which Document Should I Read?

Your Goal Recommended Document
Just getting started DAFU CLI Guide
Want to see examples CLI Demo
Use API features CLI with API Integration
Need step-by-step for auth CLI Step-by-Step
Want complete reference CLI Usage Complete
General platform usage Usage Guide

🎓 Learning Path

Beginner

  1. DAFU CLI Guide - Learn basic commands
  2. CLI Demo - See examples
  3. Start using: ./dafu help

Intermediate

  1. CLI with API Integration - API features
  2. CLI Step-by-Step - Authentication flow
  3. Try API commands: ./dafu auth login

Advanced

  1. CLI Usage Complete - Full reference
  2. API Usage Guide - Direct API calls
  3. Write automation scripts

🆘 Troubleshooting

Common issues and their documentation:

Issue Solution Location
How to login? CLI Step-by-Step
API not responding CLI with API Integration
Command not found CLI Usage Complete
Session expired CLI Step-by-Step

📞 Support


DAFU CLI - One Command for Everything 🚀