Skip to content

Installation

import { Tabs, TabItem } from ‘@astrojs/starlight/components’;

Installation

ContractShield is distributed as multiple npm packages. Install only what you need.

Core Package

The PDP (Policy Decision Point) is always required:

Terminal window
npm install @cshield/pdp

Framework Adapters

Choose the adapter for your framework:

```bash npm install @cshield/pep-express ``` ```bash npm install @cshield/pep-fastify ``` ```bash npm install @cshield/sidecar ``` Or use Docker: ```bash docker pull contractshield/sidecar:latest ```

Optional Packages

PackagePurposeWhen to use
@cshield/clientSDK with caching/retrySidecar or centralized deployment
@cshield/licenseLicense verificationPro/Enterprise features
Terminal window
# Client SDK (for sidecar/centralized)
npm install @cshield/client
# License verification (Pro features)
npm install @cshield/license

Package Versions

All packages follow semantic versioning and are released together:

PackageCurrent VersionLicense
@cshield/pdp0.3.0Apache 2.0
@cshield/pep-express0.3.0Apache 2.0
@cshield/pep-fastify0.3.0Apache 2.0
@cshield/sidecar0.3.0Apache 2.0
@cshield/client1.1.0Apache 2.0
@cshield/license0.3.1Apache 2.0
@cshield/sink-rasp1.0.0Commercial

Requirements

  • Node.js: 18.x or later (LTS recommended)
  • TypeScript: 5.0+ (optional, types included)

Verify Installation

import { evaluate } from '@cshield/pdp';
const policy = {
policyVersion: '0.1',
routes: []
};
const context = {
version: '0.1',
request: {
method: 'GET',
path: '/health'
}
};
const decision = await evaluate(policy, context);
console.log(decision.action); // "ALLOW"

Next Steps