Skip to content

CLI Commands

Sidney Sebban edited this page Sep 20, 2025 · 1 revision

πŸ–₯️ CLI Commands - Command Documentation

The Zero-AI-Trace Framework provides a complete command-line interface with 6 main commands.

πŸ“‹ Overview

# Global installation required
npm install -g zero-ai-trace-framework

# Check installation
zero-ai-trace --version

# General help
zero-ai-trace --help

πŸ” Available Commands

1. validate - Interactive Validation

Usage:

zero-ai-trace validate

Description: Launches interactive framework validation with real-time testing.

Features:

  • βœ… Framework structure verification
  • βœ… Labeling rules testing
  • βœ… Writing style validation
  • βœ… AI markers detection
  • βœ… Detailed compliance report

Usage Example:

$ zero-ai-trace validate
🎯 Zero-AI-Trace Framework - Interactive Validation

βœ… Framework structure: Valid
βœ… Labeling rules: Compliant
βœ… Humanization style: Configured
⚠️  Anti-detection: Partially configured

Overall score: 85/100

2. show - Prompt Display

Usage:

zero-ai-trace show [options]

Options:

  • --format <type>: Output format (text, json, markdown)
  • --compact: Optimized compact version
  • --variant <name>: Specific variant

Description: Displays the framework's main prompt in different formats.

Examples:

# Standard prompt
zero-ai-trace show

# Compact version for injection
zero-ai-trace show --compact

# JSON format for API
zero-ai-trace show --format json

# Development variant
zero-ai-trace show --variant dev

3. test - Automated Testing

Usage:

zero-ai-trace test [options]

Options:

  • --verbose: Detailed output
  • --suite <name>: Specific test suite

Description: Runs the complete automated test suite (13 tests).

Tests Included:

  • Framework structure and integrity
  • Critical keywords coverage
  • Labeling rules validation
  • Style and humanization tests
  • AI patterns detection
  • Automatic correction tests

Example:

$ zero-ai-trace test --verbose
πŸ§ͺ Running automated tests...

βœ… Test 1/13: Framework structure
βœ… Test 2/13: Critical keywords
βœ… Test 3/13: Labeling rules
...
βœ… Test 13/13: Automatic correction

πŸŽ‰ All tests pass (13/13)
Execution time: 1.2s

4. build - Variant Generation

Usage:

zero-ai-trace build [options]

Options:

  • --output <dir>: Output directory
  • --variants <list>: Specific variants to generate

Description: Automatically generates 6 prompt variants and integration templates.

Generated Variants:

  1. compact.txt - Optimized version for injection
  2. extended.txt - Complete version with explanations
  3. api.json - Structured format for API
  4. chatgpt.md - Optimized for ChatGPT web
  5. system.txt - For system prompts
  6. dev.txt - Development version with debug

Created Templates:

  • ChatGPT Custom Instructions integration
  • OpenAI API configuration
  • Web frameworks template

Example:

$ zero-ai-trace build --output ./prompts
πŸ“¦ Generating variants and templates...

βœ… compact.txt (1,040 characters)
βœ… extended.txt (2,840 characters)
βœ… api.json (Complete structure)
βœ… chatgpt.md (Formatted markdown)
βœ… system.txt (System prompt)
βœ… dev.txt (Debug version)

πŸ“„ Generated templates:
βœ… ChatGPT Custom Instructions
βœ… API Integration Template
βœ… Web Framework Template

πŸŽ‰ Build completed successfully!

5. init - Project Initialization

Usage:

zero-ai-trace init <project-name> [options]

Options:

  • --template <type>: Project template (basic, api, web)
  • --language <lang>: Language (js, python, etc.)

Description: Creates a new project with framework integration.

Generated Structures:

my-project/
β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ zero-ai-trace.json
β”‚   └── prompts/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ framework.js
β”‚   └── examples/
β”œβ”€β”€ tests/
β”‚   └── framework.test.js
β”œβ”€β”€ package.json
└── README.md

Example:

$ zero-ai-trace init my-chatbot --template api --language js
πŸš€ Initializing project 'my-chatbot'...

βœ… Basic structure created
βœ… Zero-AI-Trace configuration
βœ… API integration templates
βœ… Automated tests configured
βœ… Documentation generated

πŸ“ Project created in: ./my-chatbot
πŸ“š See README.md to get started

6. info - Framework Information

Usage:

zero-ai-trace info [options]

Options:

  • --stats: Detailed statistics
  • --rules: List of active rules

Description: Displays framework information and statistics.

Displayed Information:

  • Framework version
  • Number of active rules
  • Test statistics
  • Current configuration
  • Useful links

Example:

$ zero-ai-trace info --stats
πŸ“Š Zero-AI-Trace Framework v1.0.1

🎯 Current configuration:
  β”œβ”€ Active rules: 15
  β”œβ”€ Available tests: 13
  β”œβ”€ Variants: 6
  └─ Templates: 3

πŸ“ˆ Statistics:
  β”œβ”€ Compact prompt: 1,040 characters
  β”œβ”€ Monitored keywords: 8
  β”œβ”€ Anti-detection patterns: 12
  └─ Last validation: βœ… Passed

πŸ”— Resources:
  β”œβ”€ Documentation: https://github.com/Darkfall48/Zero-AI-Trace-Framework/wiki
  β”œβ”€ Issues: https://github.com/Darkfall48/Zero-AI-Trace-Framework/issues
  └─ Discussions: https://github.com/Darkfall48/Zero-AI-Trace-Framework/discussions

🎯 Recommended Workflows

Development Workflow

# 1. Create a new project
zero-ai-trace init my-project --template api

# 2. Validate configuration
zero-ai-trace validate

# 3. Generate variants
zero-ai-trace build --output ./dist

# 4. Test
zero-ai-trace test --verbose

Production Workflow

# 1. Get compact prompt
zero-ai-trace show --compact > prompt.txt

# 2. Validate before deployment
zero-ai-trace test

# 3. Get integration templates
zero-ai-trace build --output ./production

Debug Workflow

# 1. Detailed information
zero-ai-trace info --stats

# 2. Validation with debug
zero-ai-trace validate

# 3. Verbose tests
zero-ai-trace test --verbose

# 4. Development prompt
zero-ai-trace show --variant dev

βš™οΈ Advanced Configuration

Environment Variables

# Custom configuration directory
export ZERO_AI_TRACE_CONFIG_DIR="/path/to/config"

# Verbosity level (0-3)
export ZERO_AI_TRACE_VERBOSE=2

# Default output format
export ZERO_AI_TRACE_DEFAULT_FORMAT="json"

Configuration File

Create ~/.zero-ai-trace.json:

{
  "defaultFormat": "compact",
  "autoValidate": true,
  "customRules": [],
  "outputDirectory": "./zero-ai-trace-output",
  "verboseMode": false
}

πŸ”§ CLI Troubleshooting

Command Not Found

# Check global installation
npm list -g zero-ai-trace-framework

# Reinstall if necessary
npm install -g zero-ai-trace-framework

Permission Errors

# On Unix/Mac
sudo npm install -g zero-ai-trace-framework

# Or configure npm without sudo
npm config set prefix ~/.npm-global

Node.js Issues

# Check Node.js version (>=14 required)
node --version

# Update if necessary

πŸ“š See Also


Documentation updated for version 1.0.1

Wiki Navigation

🏠 Home

πŸš€ Getting Started

πŸ“š Documentation

�️ Framework

❓ FAQ

🌐 External Links


Clone this wiki locally