Download the PHP package darvis/api-x without Composer
On this page you can find all versions of the php package darvis/api-x. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package api-x
Short Description Post to X (Twitter) from Laravel: posts with an image through the X API v2, a setup wizard, an artisan command and an MCP server so Claude and other AI agents can post for you.
License MIT
Homepage https://arviddejong.github.io/api-x/
Informations about the package api-x
darvis/api-x
A Laravel package that posts short updates, with one optional image, to X (formerly Twitter) through the X API v2. Call it from PHP, from the command line, or let an AI agent such as Claude post for you through a local MCP server. No SDK: every call goes through Laravel's built-in HTTP client.
Unofficial and independent: this is not an official X product and is not affiliated with X Corp.
Features
- A setup wizard,
php artisan x:install, that explains every step and writes.env - One call to post a text with a JPEG, PNG, GIF or WebP image, from a local path or a URL
php artisan x:postfor scripts and the terminal- A local MCP server with a
post-updatetool, registered whenlaravel/mcpis installed - A page to post from the browser with the history of every post, when Livewire and Flux are installed
- Checks the text the way X counts it before anything is sent or billed, up to 25,000 characters for accounts with an X subscription
- Refuses links by default, because X bills posts with a link at a much higher rate
- A daily limit and a dry run mode, so an agent cannot run up a bill
- Ships a Laravel Boost guideline and skill
Requirements
- PHP 8.2 or higher
- Laravel 11, 12 or 13
- An X developer app with Read and Write permissions and API credit
laravel/mcp1.0 or higher for the MCP server (Laravel Boost installs it)livewire/livewireandlivewire/flux(free edition) for the page
Installation
Run the setup wizard. It explains how to create the X app, writes the four OAuth 1.0a keys of
your own account to .env, checks them with X, sets the safety limits and adds the MCP server:
Or put the keys in .env yourself:
Installation & configuration has every step and every config key.
Quick start
For an AI agent, add php artisan mcp:start x as a stdio MCP server. See the
MCP server page.
Documentation
The full documentation is at arviddejong.github.io/api-x.
Changelog
See CHANGELOG.md.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
License
MIT. See LICENSE.