Download the PHP package moneo/markdown-for-agents without Composer

On this page you can find all versions of the php package moneo/markdown-for-agents. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package markdown-for-agents

Laravel Markdown for Agents

Tests codecov Latest Version on Packagist PHP Version Laravel Version PHPStan Level Code Style License

A Laravel package that unifies Cloudflare's three Markdown conversion services under one elegant API.

Services

Service Driver Key Description
Markdown for Agents agents Content negotiation via Accept: text/markdown on any Cloudflare-enabled URL. Free, no auth.
Workers AI toMarkdown workers_ai Converts files (PDF, DOCX, images, etc.) to Markdown via REST API. Auth required.
Browser Rendering browser Headless browser renders JS-heavy pages then converts to Markdown. Auth required.

Requirements

Installation

Publish the config file:

Configuration

Add your Cloudflare credentials to .env:

The agents driver does not require credentials.

Usage

Convert a URL

Convert a file

Convert raw HTML

Choose a driver

Fallback

If the primary driver fails, automatically retry with another:

Browser options

Cache control

Caching is enabled by default for URL and HTML conversions:

Conditional fluent API

PendingConversion uses Laravel's Conditionable and Tappable traits:

Supported formats

Driver Comparison

Scenario Recommended Driver
Cloudflare-enabled site agents (fastest, free)
PDF, DOCX, XLSX, images workers_ai (only option)
SPA / JS-heavy page browser (full render)
Non-Cloudflare site browser
Raw HTML string browser
Make your app agent-ready Middleware (local, no API)

Middleware

Add the middleware to routes to make your Laravel app respond with Markdown when AI agents request it:

When a request includes Accept: text/markdown, the middleware converts HTML responses to Markdown locally using league/html-to-markdown. No Cloudflare API calls are made.

Response headers added:

Artisan Commands

Events

Two events are dispatched during conversions:

Custom Drivers

Register custom drivers that implement MarkdownConverterInterface:

Testing

The package uses orchestra/testbench. All tests mock HTTP responses -- no real API calls.

When testing your own app's code that uses this package, mock the facade:

License

MIT


All versions of markdown-for-agents with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/http Version ^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
league/html-to-markdown Version ^5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package moneo/markdown-for-agents contains the following files

Loading the files please wait ...