A simple command line tool for installing and interacting with your leaf apps

v1.0.3 2023-09-28 11:50 UTC

This package is auto-updated.

Last update: 2024-05-28 13:18:32 UTC




Latest Stable Version Total Downloads License

Alchemy is a Leaf module which allows you to quickly and efficiently create and run tests in your Leaf apps. Leaf 3 is built with testing in mind. In fact, support for testing with Pest PHP/PHPUnit is included out of the box. However, Alchemy allows you to avoid all the hustle and write your tests without having to setup anything. Just run the setup script and run your tests without any config or anything like that.

📦 Installation

You can quickly install alchemy with leaf CLI

leaf install alchemy

Or with composer

composer require leafs/alchemy

🗂 Your First Test

After installing Alchemy, simply run the setup script

./vendor/bin/alchemy setup

This uses Pest PHP by default. If you want to use PHPUnit, you can add the --phpunit option to the setup script.

./vendor/bin/alchemy setup --phpunit

This will setup dummy tests and an alchemy.config.php file which you can use to gain a little more control over your tests. After writing the tests you need to write, you can simply run the test script.

./vendor/bin/alchemy run

Based on your engine, you might see either of the outputs below



  • PHPUnit


Alchemy is a test runner, not a testing framework.



💬 Stay In Touch

📓 Learning Leaf 3

  • Leaf has a very easy to understand documentation which contains information on all operations in Leaf.
  • You can also check out our youtube channel which has video tutorials on different topics
  • We are also working on codelabs which will bring hands-on tutorials you can follow and contribute to.

😇 Contributing

We are glad to have you. All contributions are welcome! To get started, familiarize yourself with our contribution guide and you'll be ready to make your first pull request 🚀.

To report a security vulnerability, you can reach out to @mychidarko or @leafphp on twitter. We will coordinate the fix and eventually commit the solution in this project.

Code contributors

Michael Darko

🤩 Sponsoring Leaf

Your cash contributions go a long way to help us make Leaf even better for you. You can sponsor Leaf and any of our packages on open collective or check the contribution page for a list of ways to contribute.

And to all our existing cash/code contributors, we love you all ❤️

Cash contributors

Aaron Smith

Peter Bogner


🤯 Links/Projects