PHPackages                             spikard/spikard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. spikard/spikard

ActiveLibrary[Framework](/categories/framework)

spikard/spikard
===============

High-performance PHP web framework with a Rust core. Build REST APIs, WebSockets, and SSE services with ext-php-rs bindings, async handlers, dependency injection, and lifecycle hooks.

0.13.0(1mo ago)99164[5 PRs](https://github.com/Goldziher/spikard/pulls)MITRustPHP ^8.2CI passing

Since Nov 30Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Goldziher/spikard)[ Packagist](https://packagist.org/packages/spikard/spikard)[ Docs](https://github.com/Goldziher/spikard)[ RSS](/packages/spikard-spikard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (49)Used By (0)

Spikard
=======

[](#spikard)

 [ ![Documentation](https://camo.githubusercontent.com/e0047252e1996a0b7e0c82338ae749c588e17c0807bc903249337d44b6e394be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d7370696b6172642e6465762d303037656336) ](https://spikard.dev) [ ![Crates.io](https://camo.githubusercontent.com/e9d884faf357dfa38cefc880e4579a1b9df0f3b53aa46a24d676aa7a53583a0b/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f7370696b6172642e7376673f636f6c6f723d303037656336) ](https://crates.io/crates/spikard) [ ![PyPI](https://camo.githubusercontent.com/f416dad14e6f9f003dcd27fc2413c9dd8d3dde755bf0775541b8e9f66d3b2264/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f7370696b6172642e7376673f636f6c6f723d303037656336) ](https://pypi.org/project/spikard/) [ ![npm](https://camo.githubusercontent.com/ea4566a83c5d5889f1d49ea310398cda909f2d1a9ad1ba930432a416a741f5ab/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f407370696b6172642f6e6f64652e7376673f636f6c6f723d303037656336) ](https://www.npmjs.com/package/@spikard/node) [ ![RubyGems](https://camo.githubusercontent.com/d0e45a8295c71d8c4582000e768173fa1fb0377aaf23d8d20895e59275360cd1/68747470733a2f2f696d672e736869656c64732e696f2f67656d2f762f7370696b6172642e7376673f636f6c6f723d303037656336) ](https://rubygems.org/gems/spikard) [ ![Packagist](https://camo.githubusercontent.com/00234ffdd4daaf5795d4f26147fe8fe7f104ef08fb28f52ae785b703effb13c2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370696b6172642f7370696b6172642e7376673f636f6c6f723d303037656336) ](https://packagist.org/packages/spikard/spikard) [ ![Hex.pm](https://camo.githubusercontent.com/811b41b14d0cc2bf8697423962fd7e29869b7f1d1962f86ba331249e8f0bed3b/68747470733a2f2f696d672e736869656c64732e696f2f686578706d2f762f7370696b6172642e7376673f636f6c6f723d303037656336) ](https://hex.pm/packages/spikard) [ ![License](https://camo.githubusercontent.com/ebf4bee0df8e1ecc03eacb01f4ad439aa2582fabf4e80fec6b88078913112fdd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d303037656336) ](https://github.com/Goldziher/spikard/blob/main/LICENSE)

Rust-centric, codegen-first framework for building typed web services and generating idiomatic server scaffolds for Python, TypeScript, Rust, Ruby, PHP, and Elixir.

Features
--------

[](#features)

- **Codegen-first CLI** for OpenAPI 3.1, AsyncAPI 3.0, OpenRPC/JSON-RPC, GraphQL, and Protobuf/gRPC
- **Agent-friendly MCP server** with CLI-equivalent project init and code generation tools
- **Real starter projects** via `spikard init` for Python, TypeScript, Rust, Ruby, PHP, and Elixir
- **Shared Rust runtime** with Tower HTTP middleware, WebSockets, SSE, and gRPC support
- **Quality-validated output** with formatter, syntax, and lint/type checks for generated code

Supported Languages
-------------------

[](#supported-languages)

LanguageRuntime / ToolchainPackage ManagerRust1.85+cargoPython3.10+pip / uvTypeScript5.xnpm / pnpm / yarnRuby3.2+gem / bundlerPHP8.2+composerElixir1.18+ / OTP 27+mix / hexInstallation
------------

[](#installation)

```
cargo install spikard-cli
```

Quick Start
-----------

[](#quick-start)

Install the CLI, scaffold a real project, and generate typed handlers:

```
spikard init my_api --lang python --dir .
cd my_api
uv sync
uv run python -m my_api.app
```

Generate code from a schema with the current command surface:

```
# OpenAPI 3.1
spikard generate openapi examples/schemas/auth-service.openapi.yaml --lang python --output ./generated.py

# GraphQL
spikard generate graphql examples/schemas/social.graphql --lang typescript --output ./src/generated.ts

# Protobuf / gRPC
spikard generate protobuf examples/schemas/user-service.proto --lang rust --output ./src/generated.rs
```

MCP
---

[](#mcp)

The CLI ships with an MCP server by default, exposing the same init and code generation surface over stdio:

```
spikard mcp
```

That MCP surface includes `init_project`, `generate_openapi`, `generate_asyncapi_handlers`, `generate_jsonrpc`, `generate_graphql`, `generate_protobuf`, `generate_asyncapi_fixtures`, `generate_asyncapi_test_app`, `generate_asyncapi_bundle`, `validate_asyncapi`, and `get_features`.

For HTTP transport, build or install with the `mcp-http` feature and run:

```
cargo run -p spikard-cli --features mcp-http -- mcp --transport http --host 127.0.0.1 --port 3001
```

Code Generation Support
-----------------------

[](#code-generation-support)

FormatGenerated TargetsOpenAPI 3.1Python, TypeScript, Rust, Ruby, PHP, ElixirAsyncAPI 3.0Python, TypeScript, Rust, Ruby, PHP, ElixirOpenRPC / JSON-RPCPython, TypeScript, Rust, Ruby, PHP, ElixirGraphQL SDL / introspectionPython, TypeScript, Rust, Ruby, PHP, ElixirProtobuf / gRPCPython, TypeScript, Rust, Ruby, PHP, ElixirAll generated output is validated before write-out, and `spikard init` starter projects now produce real, idiomatic project layouts for every supported binding.

Performance
-----------

[](#performance)

Benchmarked across 34 workloads at 100 concurrency ([methodology](docs/benchmarks/methodology.md)):

FrameworkAvg RPSP50 (ms)P99 (ms)**spikard-rust**64,5161.433.93spikard-bun49,4602.184.21spikard-node46,1602.183.35spikard-php16,9425.829.1spikard-python12,6235.5538.39spikard-ruby7,15114.6218.98Spikard is **benchmarked against mature framework baselines across the supported bindings**.

Key optimizations:

- **Thin bindings** over a shared Rust core
- **Zero-copy FFI paths** where the binding supports them
- **Template-driven code generation** validated before files are written

Development
-----------

[](#development)

Use the task runner to keep the workspace aligned with CI:

```
task setup
task build
task test
task lint
task readme:validate
```

The authoritative README set is template-driven from `scripts/readme_config.yaml`, `scripts/readme_templates/`, and `scripts/readme_content/`.

Related READMEs
---------------

[](#related-readmes)

- [CLI](crates/spikard-cli/README.md) - init, generate, testing, validate-asyncapi, and MCP
- [Rust crate](crates/spikard/README.md) - runtime API and tower-based HTTP stack
- [Python package](packages/python/README.md) - PyO3 bindings and Python-first usage
- [Node package](packages/node/README.md) - napi-rs bindings for TypeScript and Node.js
- [Ruby package](packages/ruby/README.md) - Magnus bindings and Ruby DSL
- [PHP package](packages/php/README.md) - ext-php-rs bindings and PHP framework API
- [Elixir package](packages/elixir/README.md) - Rustler bindings and Elixir router API

Documentation
-------------

[](#documentation)

- [spikard.dev](https://spikard.dev)
- [Examples](examples/README.md)
- [Schema fixtures](examples/schemas/README.md)

License
-------

[](#license)

MIT - See [LICENSE](LICENSE) for details

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance91

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Recently: every ~11 days

Total

33

Last Release

52d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e332a98740b42010f18d4ff016720276b0f6b893776963c6fe29beac6f5a94ff?d=identicon)[Goldziher](/maintainers/Goldziher)

---

Top Contributors

[![Goldziher](https://avatars.githubusercontent.com/u/30733348?v=4)](https://github.com/Goldziher "Goldziher (1726 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (24 commits)")[![markkimsal](https://avatars.githubusercontent.com/u/54099?v=4)](https://github.com/markkimsal "markkimsal (1 commits)")

---

Tags

bundenoedgehttpnodephppythonrubyrusttypescriptwasmwebhttpasyncframeworkperformancewebsocketsseREST APIphp8rustffiweb frameworkext-php-rstower-httpaxumtokio

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spikard-spikard/health.svg)

```
[![Health](https://phpackages.com/badges/spikard-spikard/health.svg)](https://phpackages.com/packages/spikard-spikard)
```

###  Alternatives

[hprose/hprose

It is a modern, lightweight, cross-language, cross-platform, object-oriented, high performance, remote dynamic communication middleware. It is not only easy to use, but powerful. You just need a little time to learn, then you can use it to easily construct cross language cross platform distributed application system.

2.1k215.3k37](/packages/hprose-hprose)[clue/framework-x

Framework X – the simple and fast micro framework for building reactive web applications that run anywhere.

936736.7k8](/packages/clue-framework-x)[hprose/hprose-swoole

Hprose asynchronous client &amp; standalone server based on swoole

17928.9k9](/packages/hprose-hprose-swoole)[hprose/hprose-yii

Hprose Server for Yii 2

357.1k](/packages/hprose-hprose-yii)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
