Skip to main content

Export source code and project files into AI-friendly text bundles with manifest

Project description

anything-to-text

Export source code and project files into AI-friendly text bundles with a compact manifest.

Commands: anything-to-text or att (short alias)

Features

  • Multi-language support: Python, TypeScript, JavaScript, Java, Kotlin, Swift, HTML/CSS, and more
  • AI-optimized output: Creates bundle files with embedded metadata for AI assistants
  • Smart filtering: Respects .gitignore and skips build/cache directories automatically
  • Manifest generation: Produces MANIFEST.json with precise file location mappings
  • Project overview: Optional PROJECT_OVERVIEW.txt for architecture insights
  • Secret protection: Skips .env, keys, certificates, and other sensitive files by default
  • Fancy interactive UI: Checkbox-style selection with questionary
  • Large file handling: Automatically splits large files into manageable chunks

Installation

pip install anything-to-text

Quick Start

CLI Usage

# Show version
anything-to-text --version
att --version

# Interactive mode - scan current directory
anything-to-text
att

# Specify project root
anything-to-text /path/to/project
att /path/to/project

# Non-interactive mode with specific categories
anything-to-text /path/to/project --non-interactive --categories python typescript
att /path/to/project --non-interactive --categories python typescript

# Export specific files or folders
anything-to-text . --non-interactive --paths src main.py
att . --non-interactive --paths src main.py

# Generate project overview
anything-to-text . --project-overview
att . --project-overview

# Use fancy interactive UI
anything-to-text . --fancy-ui
att . --fancy-ui

# Set custom output directory
anything-to-text . --output-dir ./my-bundles
att . --output-dir ./my-bundles

# Adjust max lines per bundle
anything-to-text . --max-lines 10000
att . --max-lines 10000

# Include secret files (use with caution)
anything-to-text . --include-secret-files
att . --include-secret-files

Output Files

After running, you'll get:

File Description
bundle_001.txt, bundle_002.txt, ... Text bundles containing your source code
MANIFEST.json Maps files to bundles and line ranges
README_EXPORT.txt Summary of the export
PROJECT_OVERVIEW.txt (Optional) Architecture overview

Categories

Category Description Extensions
python Python backend / scripts .py
typescript TypeScript / TSX .ts, .tsx
javascript JavaScript / JSX .js, .jsx, .mjs, .cjs
java_kotlin Android / JVM .java, .kt, .kts, .gradle
ios_apple iOS / Apple platform .swift, .m, .h, etc.
web_ui HTML / CSS / UI .html, .css, .scss, .vue, etc.
config_docs Config / metadata .json, .yaml, .xml, .toml, .md

Category Aliases

Alias Maps to
py python
ts, tsx typescript
js, jsx javascript
java, kotlin, android java_kotlin
ios, swift, apple ios_apple
web, frontend, ui web_ui
config, docs config_docs

Usage Examples

Export Python and TypeScript code for AI review

att /my-project --non-interactive --categories python typescript --project-overview

Export specific folders

att . --non-interactive --paths src/components src/utils

Full export with all features

att /path/to/project \
    --non-interactive \
    --categories python typescript web_ui \
    --max-lines 10000 \
    --project-overview \
    --output-dir ./ai-review-bundles

Interactive mode with fancy UI

att . --fancy-ui

Use with AI assistants

After running the exporter:

  1. Attach bundles: Upload bundle_001.txt (and others) to your AI assistant
  2. Include manifest: Upload MANIFEST.json so the assistant understands file mappings
  3. Add overview: Upload PROJECT_OVERVIEW.txt for architecture context
  4. Ask questions: The assistant can now reference exact file locations and line numbers

Security

By default, the following files are skipped to protect sensitive data:

  • .env files and variants (*.env.*)
  • Private keys (*.pem, *.key, id_rsa, id_ed25519)
  • Certificates (*.crt, *.cer, *.der)
  • Keystores (*.jks, *.keystore, *.p12, *.pfx)
  • Mobile provisioning (*.mobileprovision)
  • Firebase/Google config (google-services.json, GoogleService-Info.plist)

Use --include-secret-files to override this behavior (use with caution).

CLI Options

usage: anything-to-text [-h] [--max-lines MAX_LINES] [--output-dir OUTPUT_DIR]
                        [--non-interactive] [--categories [CATEGORIES ...]]
                        [--paths [PATHS ...]] [--include-secret-files]
                        [--fancy-ui] [--project-overview] [--version]
                        [project_root]

positional arguments:
  project_root          Project root to scan (default: current directory)

options:
  -h, --help            Show help message
  --version             Show version
  --max-lines N         Max lines per bundle (default: 8000)
  --output-dir DIR      Custom output directory
  --non-interactive     Run without prompts
  --categories CATS     Categories to export (e.g., python typescript)
  --paths PATHS         Specific files/folders to export
  --include-secret-files Include secret-like files
  --fancy-ui            Use checkbox-style interactive UI
  --project-overview    Generate PROJECT_OVERVIEW.txt

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anything_to_text-0.3.5.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anything_to_text-0.3.5-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file anything_to_text-0.3.5.tar.gz.

File metadata

  • Download URL: anything_to_text-0.3.5.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for anything_to_text-0.3.5.tar.gz
Algorithm Hash digest
SHA256 b58a831ac72eb3829a3d4ff4a3cb2fded44eb7a9af4de5b3edccfec1ecb48e46
MD5 3b110064225a2ce9eea06f8bdf4b0bf7
BLAKE2b-256 cc84d699793bb72c1e60e0386787c5b811e46642d7387531cdc39f50db8f457b

See more details on using hashes here.

File details

Details for the file anything_to_text-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for anything_to_text-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dbc1487c6d0a4a0f62a6d0723f393025ef800e7d3c1a6262176cd3b5fd62449f
MD5 f8503d9e911706d319ccb2f26cf1dd26
BLAKE2b-256 b78e35af8ec1590fd0578868d34b1436c108beaad88526fecc39de75d2e9d423

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page