Skip to main content

🚀 ai-scaffold

Turn AI-generated Markdown or JSON into real project files — instantly.

ai-scaffold is a lightweight CLI tool and Python library that converts AI-generated content (from ChatGPT, DeepSeek, Claude, Gemini, etc.) into a real project directory structure with actual files.

No more manual copy-paste.

No cleanup.

No broken file paths.


✨ Why ai-scaffold?

AI tools are great at generating code — but terrible at delivering it in a usable format.

This tool bridges that gap.

You give AI output (Markdown/JSON). It creates real files.


✨ Features

  • ✅ Convert AI Markdown or JSON into real files & folders
  • ✅ Multi-format Support: Works with Bold titles (**file**), Headers (### file), or Structured JSON
  • ✅ Smart Cleanup: Automatically removes emojis (📁, 📄), numbering (1.), and comments
  • ✅ Auto-Deduplication: Handles duplicate filenames by renaming them (e.g., file_2.js)
  • ✅ Supports .env, Dockerfile, config files
  • ✅ Safe overwrite handling
  • ✅ Dry-run preview mode
  • ✅ Works as CLI or Python library
  • ✅ Zero dependencies

📦 Installation

pip install ai-scaffold

Verify installation:

ai-scaffold --version

🚀 Quick Start (CLI)

1. Default Format (Bold Titles)

Best for prompts like "Use **path/to/file** for filenames".

ai-scaffold project.md

2. Header Format

Best for prompts like "Use ### path/to/file for filenames". Handles emojis and comments automatically.

ai-scaffold project.md --format 2

3. JSON Format (New!)

Best for high-precision scaffolding. Automatically detected for .json files.

ai-scaffold project.json --format 3

🧠 Supported Formats

ai-scaffold supports three common AI output styles.

Format 1: Bold Titles (Default)

Matches files wrapped in bold asterisks **...**.

Input Example:

Here is the **src/main.py** file:

```python
print("Hello")
```

Format 2: Header Titles (--format 2)

Matches files in Markdown headers (#, ##, ###).

Input Example:

### 📄 package.json (Backend)

```json
{}
```

Format 3: JSON Structure (--format 3)

Matches structured JSON data.

Input Example:

{
  "project_name": "my-app",
  "files": [
    {
      "path": "main.py",
      "content": "print('hello')"
    }
  ]
}

To get perfect results, append one of these prompts to your AI request:

Option A (For Default Format)

Output code in Markdown.
IMPORTANT: Precede each code block with the filename in bold, like: **path/to/file.ext**

Option B (For Header Format)

Output code in Markdown.
IMPORTANT: Use headers for filenames, like: ### path/to/file.ext

Option C (For JSON Format)

Output the project structure in a single JSON object:
{ "project_name": "...", "files": [{ "path": "...", "content": "..." }] }

🧩 Python Library Usage

You can use ai-scaffold as a Python module.

from ai_scaffold import parse_markdown, parse_json, generate

# For Markdown
with open("project.md") as f:
    files = parse_markdown(f.read(), fmt=1)

# For JSON
with open("project.json") as f:
    files, root = parse_json(f.read())

# Generate files
generate(files, root="my_project", overwrite=False, dry_run=False)

⚙️ CLI Options

Option Description
--format 1 = Bold (default), 2 = Headers, 3 = JSON
--dry-run Preview files without writing
--overwrite Overwrite existing files
--no-interactive Disable prompts
--version Show version

🧪 Example Output

$ ai-scaffold project.json

Root folder detected: readme-builder
Use this folder? [Y/n] y
[INFO] Created: readme-builder/package.json
[INFO] Created: readme-builder/index.html
[INFO] Created: readme-builder/src/utils/generateMarkdown.js

Project successfully generated

🛡️ Safety & Stability

  • Does not execute code
  • Does not guess file paths
  • Does not hallucinate structure
  • Only uses what exists in the input

📦 Package Details

  • Name: ai-scaffold
  • CLI: ai-scaffold
  • Python import: ai_scaffold
  • Python: >= 3.8
  • License: MIT

🧭 Use Cases

  • Generate full-stack projects from DeepSeek, ChatGPT, Claude, Gemini, etc
  • Convert AI answers into real repos
  • Automate scaffolding
  • Developer productivity tooling
  • AI-assisted coding workflows

📜 License

MIT License — free for personal & commercial use.


❤️ Author Note

This tool exists because AI should build projects, not just talk about them.

If you find this useful — ⭐ star the repo, share it, or build on top of it.

Happy scaffolding 🚀

Metadata

Release files for ai-scaffold 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-scaffold 1.0.0
File Size Uploaded Provenance
ai_scaffold-1.0.0.tar.gz 6.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-scaffold 1.0.0
File Interpreter ABI Platform
ai_scaffold-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / ai_scaffold-1.0.0.tar.gz

Download URL ai_scaffold-1.0.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6cfcc6ef44400bd8640d10a29ea8c5e17fa6d3eefb1ca03ca8b6289d3b63b05c
BLAKE2b-256 checksum
How to use checksums
89b844be5a886a19ba76d1c5a26aa86a4583271ae0f0f20d85f4da6c58b12d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 18, 2025.

Transparency log

Release files / ai_scaffold-1.0.0-py3-none-any.whl

Download URL ai_scaffold-1.0.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94fc39bcc814d1bfcf1760b4a4318ac97dbad782e209b5e415b52f5f2f6c0f5e
BLAKE2b-256 checksum
How to use checksums
001789184f44a6277d915bfb30f1e75e26c8d349724d12fd43cd56ec8d93b53c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 18, 2025.

Transparency log

Security for ai-scaffold 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_scaffold-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 18, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page