โ† Back to AI & LLMs
AI & LLMs by @artur-zhdan

undetectable-ai

Make AI text undetectable

0
Source Code

Undetectable AI

TypeScript CLI tools for bypassing AI content detectors by removing telltale patterns.

Setup

cd scripts && npm install

Scripts

analyze.ts โ€” Scan for Detectable Patterns

Finds patterns that AI detectors look for: vocabulary, sentence structure, artifacts.

# Analyze a file
npx ts-node scripts/analyze.ts input.txt

# From stdin
echo "This serves as a testament" | npx ts-node scripts/analyze.ts

# JSON output
npx ts-node scripts/analyze.ts input.txt --json

Output:

==================================================
AI DETECTION SCAN - 5 issues found
==================================================

AI VOCABULARY:
  โ€ข testament: 1x
  โ€ข crucial: 2x

AUTO-FIXABLE:
  โ€ข "serves as" โ†’ "is": 1x

transform.ts โ€” Auto-Fix Patterns

Rewrites text to evade detection.

# Transform and print
npx ts-node scripts/transform.ts input.txt

# Write to file
npx ts-node scripts/transform.ts input.txt -o output.txt

# Fix em dashes too
npx ts-node scripts/transform.ts input.txt --fix-dashes

# Quiet mode
npx ts-node scripts/transform.ts input.txt -q

What it fixes:

  • Filler phrases: "in order to" โ†’ "to"
  • AI vocabulary: "utilize" โ†’ "use", "leverage" โ†’ "use"
  • Sentence starters: removes "Additionally,", "Furthermore,"
  • Chatbot artifacts: removes entire sentences with "I hope this helps", etc.
  • Curly quotes โ†’ straight quotes
  • Capitalization after removals

Workflow

  1. Scan to see detection risk:

    npx ts-node scripts/analyze.ts essay.txt
    
  2. Auto-fix mechanical patterns:

    npx ts-node scripts/transform.ts essay.txt -o essay_clean.txt
    
  3. Manual pass for flagged AI vocabulary (requires judgment)

  4. Re-scan to verify:

    npx ts-node scripts/analyze.ts essay_clean.txt
    

Customizing

Edit scripts/patterns.json:

  • ai_words โ€” vocabulary to flag (manual fix needed)
  • puffery โ€” promotional language to flag
  • replacements โ€” auto-replace mappings
  • chatbot_artifacts โ€” phrases that trigger full sentence removal

Batch Processing

# Scan all docs
for f in *.txt; do
  echo "=== $f ==="
  npx ts-node scripts/analyze.ts "$f"
done

# Transform all
for f in *.md; do
  npx ts-node scripts/transform.ts "$f" -o "${f%.md}_clean.md" -q
done