Download the PHP package mohamed-ashraf-elsaed/claude-agent-sdk-laravel without Composer

On this page you can find all versions of the php package mohamed-ashraf-elsaed/claude-agent-sdk-laravel. 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 claude-agent-sdk-laravel

Claude Agent SDK for Laravel

Tests Latest Version Total Downloads PHP Version Laravel

Build AI agents with Claude Code as a library in your Laravel applications. This SDK wraps the Claude Code CLI to give your app access to file operations, bash commands, code editing, web search, subagents, and more.

Requirements

Installation

Publish the config:

Add your API key to .env:

Quick Start

Simple Query

With Options (Fluent API)

Streaming Responses

Stream with Callback

Options Reference

Fluent Builder

From Array

System Prompts

Permission Modes

Mode Behavior
default Ask for permission on each tool use
acceptEdits Auto-accept file edits, ask for others
dontAsk Don't ask but log decisions
bypassPermissions Skip all permission checks
plan Create a plan but don't execute

Custom Permission Handler

For fine-grained control over tool permissions, use canUseTool() to register a callback that approves, denies, or modifies each tool invocation:

Return PermissionResultAllow to approve (optionally with modified input), or PermissionResultDeny with a reason to block the tool call.

Hooks

Run shell commands before or after Claude uses tools. The SDK supports all 12 hook events:

PreToolUse, PostToolUse, PostToolUseFailure, UserPromptSubmit, Notification, SessionStart, SessionEnd, Stop, SubagentStart, SubagentStop, PreCompact, PermissionRequest

HookMatcher Factory Methods

Subagents

Define specialized agents that Claude delegates tasks to:

Structured Output

Get validated JSON responses matching a schema:

Session Resumption

Continue conversations across multiple queries:

MCP Servers

Connect external tools via Model Context Protocol:

Working with Results

Working with Messages

Default Options via Config

Set defaults in config/claude-agent.php or .env:

Options passed to query() override config defaults.

Advanced: Sandbox, Plugins & Betas

Stderr Monitoring

Capture diagnostic output from the Claude CLI process:

Interrupt & Lifecycle

Control a running Claude process programmatically:

Error Handling

Testing

To run with coverage:

Support

If you find this package useful, please consider giving it a star on GitHub. It helps others discover the package and motivates continued development.

GitHub stars

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE for details.


All versions of claude-agent-sdk-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2|^8.3|^8.4
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0
symfony/process Version ^6.0|^7.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 mohamed-ashraf-elsaed/claude-agent-sdk-laravel contains the following files

Loading the files please wait ...