php-sdk/examples/09-standalone-cli
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Oskar Stark a5f9d5647d
Fix typos in documentation and configuration files (#25)
- Fix grammar in doc/index.rst: "There two types" → "There are two types"
- Fix grammar in doc/index.rst: "if non of" → "if none of"
- Fix grammar in phpstan.dist.neon: "This errors" → "These errors"
- Fix grammar in examples/09-standalone-cli/README.md: "test add" → "test by adding"
- Fix sentence structure in examples/README.md for better readability

Signed-off-by: Oskar Stark <oskarstark@googlemail.com>
2025-09-04 23:25:49 +02:00
..
src Adopt server examples 2025-08-29 11:19:51 +02:00
composer.json Adopt server examples 2025-08-29 11:19:51 +02:00
example-requests.json Adopt server examples 2025-08-29 11:19:51 +02:00
index.php Adopt server examples 2025-08-29 11:19:51 +02:00
README.md Fix typos in documentation and configuration files (#25) 2025-09-04 23:25:49 +02:00

Standalone example app with CLI

This is just for testing and debugging purposes. Different from the other examples, this one does not use the same autoloader, but installs the SDK via path repository and therefore has mostly decoupled dependencies.

Install dependencies:

cd /path/to/your/project/examples/09-standalone-cli
composer update

Run the CLI with:

DEBUG=1 php index.php

You will see debug outputs to help you understand what is happening.

In this terminal you can now test by adding some JSON strings. See example-requests.json.

Run with Inspector:

npx @modelcontextprotocol/inspector php index.php