# spock

> Spock — prototype an authority backend and optional Uhura client as one inspectable project.

Latest version **0.5.5** (published 2026-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install spock
pnpm add spock
yarn add spock
bun add spock
```

Provides the command `spock`.

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.5.5 |
| Published | 2026-07-27 |
| First published | 2024-08-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 55.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Maintainers | softmarshmallow |
| Keywords | spock, backend, full-stack, uhura, prototype, language, graphql, sqlite, codegen |

## Links

- npm: https://www.npmjs.com/package/spock
- Repository: https://github.com/gridaco/spock
- Homepage: https://spock.sh
- Issues: https://github.com/gridaco/spock/issues
- npm.io page: https://npm.io/package/spock

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.5.5 (latest) — 2026-07-27
- 0.1.0-rc.1 (next) — 2026-07-12
- 0.5.4 — 2026-07-22
- 0.5.3 — 2026-07-16
- 0.5.2 — 2026-07-15
- 0.5.1 — 2026-07-15
- 0.5.0 — 2026-07-15
- 0.4.0 — 2026-07-14
- 0.1.3 — 2026-07-12
- 0.0.1 — 2024-08-15

## README

# 🖖 spock

> It's only logical.

Spock is an early meta-framework for prototyping an authoritative application
backend and an optional Uhura client as one inspectable project. The Spock
language materializes the backend from tables, functions, and rules; Uhura
defines the client experience; one command checks and serves both on one
origin.

## Install

```sh
# run without installing
npx spock new demo
cd demo
npx spock dev

# or install globally
npm i -g spock
```

This package bundles a prebuilt native binary for your platform
(macOS arm64/x64, GNU-libc Linux x64, Windows x64), plus one shared Uhura
Editor/Play web and WebAssembly sidecar. Alpine and other musl-based Linux
distributions are not supported yet. There is no build step and no network
access at install time.

## Usage

```sh
spock new demo                   # create a full-stack project
cd demo
spock check                      # check manifest, backend, and client
spock dev                        # client-live, backend-pinned development host
spock start                      # fixed combined generation
spock init [PATH]                # adopt existing sources without moving them
spock new api --backend-only     # omit the optional Uhura client

# language-level commands
spock check backend/app.spock    # parse + check one program
spock run backend/app.spock      # materialize + serve (GraphQL, REST, /~studio)
spock gen types backend/app.spock        # emit TypeScript types
spock gen graphql-schema backend/app.spock
```

`spock run` serves REST at `/rest/v1`, the contract at `/~contract`, and the
studio console at `/~studio` — all from the single binary, offline. It also
serves GraphQL at `/graphql/v1` when the contract derives an operation root; an
empty authority reports that capability as unavailable instead of inventing a
placeholder field.

For a project with a configured client, `spock start` and `spock dev` serve the
Uhura Editor at `/` and integrated Play at `/play`. Both modes serve Spock
Studio and the framework protocols on the same origin, with no cross-origin
CORS grant by default. A backend-only project redirects `/` to Studio and
returns structured 404 responses for client routes.
The framework package's executable-bound shared sidecar provides the browser
and WebAssembly assets offline.

In `spock dev`, valid client saves publish live. Invalid saves keep the last
good client generation when one exists; an initially invalid client is reported
as `cold_invalid` while Editor diagnostics remain available. Backend
inputs—including the `.spock` source and referenced seed assets—and
topology-affecting `spock.toml` saves are noticed and reported as
restart-required, but never migrate, reseed, or replace the running database.
Restarting the command reconstructs backend state from seed.

The one-command host does not merge language ownership. Spock remains the
authority for durable facts, policy, and mutations; Uhura owns the client
experience and non-authoritative UI-session state. `spock.toml` composes their
roots, while each language keeps its own checker and configuration.

## Links

- Website: https://spock.sh
- Documentation: https://spock.sh/docs/
- Source: https://github.com/gridaco/spock
- Issues: https://github.com/gridaco/spock/issues

MIT

---
_Source: https://npm.io/package/spock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
