calmlens / sdk
CalmLens PHP SDK for moderation, storage, events and CDN delivery
Package info
Language:Java
pkg:composer/calmlens/sdk
Requires
- php: ^8.2
- ext-hash: *
- ext-json: *
- guzzlehttp/psr7: ^2.7 || ^3.0
- php-http/discovery: ^1.19
- psr/http-client: ^1.0
- psr/http-message: ^2.0
- psr/log: ^2.0 || ^3.0
Requires (Dev)
None
Suggests
- guzzlehttp/guzzle: The HTTP client the SDK uses when none is passed, with per-attempt timeouts; any PSR-18 client works
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.44.0
- v0.43.0
- v0.42.0
- v0.41.0
- v0.40.0
- v0.39.0
- v0.38.3
- v0.38.2
- v0.38.1
- v0.38.0
- v0.37.1
- v0.37.0
- v0.36.0
- v0.35.0
- v0.34.0
- v0.33.0
- v0.32.0
- v0.31.1
- v0.31.0
- v0.30.0
- v0.29.2
- v0.29.1
- v0.29.0
- v0.28.2
- v0.28.1
- v0.28.0
- v0.27.6
- v0.27.5
- v0.27.4
- v0.27.3
- v0.27.2
- v0.27.1
- v0.27.0
- v0.26.1
- v0.25.0
- v0.24.0
- v0.23.1
- v0.23.0
- v0.22.0
- v0.21.0
- v0.20.0
- v0.19.0
- v0.18.3
- v0.18.2
- dev-changeset-release/main
This package is auto-updated.
Last update: 2026-12-05 14:35:05 UTC
README
Official SDKs for CalmLens: content moderation, storage and CDN delivery.
| Language | SDK | Install |
|---|---|---|
| JavaScript / TypeScript | javascript | npm install calmlens (also published as @calmlens/sdk) |
| Python | python | pip install calmlens |
| Ruby | ruby | gem install calmlens |
| Rust | rust | cargo add calmlens |
| Java | java | com.calmlens:calmlens-sdk |
| PHP | php | composer require calmlens/sdk |
| Go | go | go get calmlens.com/go/calmlens |
See the SDK documentation for usage and API coverage.
Examples
| Example | Language |
|---|---|
| Calmgram: photo sharing | JavaScript / TypeScript |
| Calmform: static feedback form | JavaScript |
| UI components | React, Vue, Svelte, JavaScript |
| Widget playground | React, Vue, Svelte, web components |
| Calmsnap: mobile photo uploads | TypeScript / Expo |
| Link board | Python |
| Comment board | PHP / Laravel |
| Chirp: short posts with images | PHP |
| Comment thread | Ruby |
| Media library | Rust |
| Marketplace listings | Java |
| Voice clips | Go |
Development
This repository is the source of truth for the SDKs and standalone examples. Open SDK issues and pull requests here. The private CalmLens application pins this repository as a Git submodule.
Install Bun, then run:
bun install --frozen-lockfile
bun run --cwd javascript check
bun run --cwd javascript test
bun run --cwd javascript build
The JavaScript SDK's React, Vue, Svelte and web component bindings are tested in
javascript/ui-tests, which installs the UI libraries apart from the SDK:
(cd javascript/ui-tests && bun install --frozen-lockfile && bun run check && bun run test)
Each native SDK has its own checks; run them from its directory. CI runs every one.
| SDK | Checks |
|---|---|
| Python | PYTHONPATH=. python -m unittest discover -s tests -v and python -m mypy (CI runs Python 3.10 and 3.14) |
| Go | go vet ./... and go test -race ./... |
| Rust | cargo test --locked, cargo clippy --locked --all-targets -- -D warnings and cargo check --no-default-features (CI runs Rust 1.88 and stable) |
| Ruby | bundle install, bundle exec ruby -Ilib -e 'Dir["test/*_test.rb"].each { |file| require_relative file }', bundle exec rubocop, steep check and rbs -I sig validate |
| Java | mvn verify (tests and Javadoc with doclint) |
| PHP | composer install, composer check and composer test (CI runs PHP 8.2 and 8.5) |
Every SDK replays the shared contract fixtures in its testdata/ (PHP reads Ruby's) and checks its
generated error-code list. bun run build:cli in javascript/ builds the CLI's npm entry, and
bun run build:cli:binary a standalone executable in dist/; set CALMLENS_BUILD_TARGET, such as
bun-linux-x64, to cross-compile it.
JavaScript examples use the local JavaScript SDK; build it before installing an example's dependencies. Calmgram's fixed examples are illustrative snapshots; its live mode uses the API.
bun install && bun run dev opens a dashboard that starts each example in its offline demo.
Its m key switches to local mode, which provisions the examples on a CalmLens development
instance at localhost:6110 that only the CalmLens team runs. To use your own project, follow
an example's README instead.
The javascript/src/contract bindings and native testdata fixtures are generated from the
CalmLens API contract. Update SDK implementations here; regenerate bindings when the API
contract changes. Generated bindings contain only public schemas, constants and SDK helpers.
Private backend provisioning and implementation stay in the application repository.
Releases
Add a changeset with bun run changeset when an SDK needs a release. Select the SDKs
and bump type; the Version SDKs workflow maintains a release PR containing the native
version updates and per-SDK changelogs. Merge that PR to release.
Every SDK and the CLI are released from this repository. When a merged plan
includes the JavaScript SDK and its commit's SDK Tests and SDK examples runs have passed,
release-npm.yml tags javascript/v<version> and publishes one packed build to npm with
provenance, as calmlens and as @calmlens/sdk. release-cli.yml tags cli-v<version>,
attaches the CLI's standalone executables to that GitHub release and updates the Homebrew
formula in Formula/; calmlens.com serves install scripts for those releases. It also builds a
Scoop manifest, winget manifests and a container image, published only when the
PUBLISH_SCOOP_BUCKET and PUBLISH_GHCR repository variables are true. Go tags and proxy validation run here too. release-php.yml tags PHP
releases v<version>; Packagist installs calmlens/sdk from those tags, through the root
composer.json, with .gitattributes keeping the archive to the PHP package.
Python, Ruby, Rust and Java are tagged <language>-sdk/v<version> once the same checks have
passed; release-python-sdk.yml, release-ruby-sdk.yml, release-rust-sdk.yml and
release-java-sdk.yml publish that tag's code to PyPI, RubyGems and crates.io through trusted
publishing; Java's signed files, signed with the maven-central environment's key, go on the
tag's GitHub release, from which the CalmLens Maven repository (https://maven.calmlens.com)
copies them. Java releases up to 0.43.0 are on Maven Central.
See .changeset/README.md for package identifiers and retry guidance.
The small native package.json files are version records for Changesets, not npm packages.
Published versions and tags are immutable.
All SDKs and examples are available under the MIT licence.