@engrym/sdk-ts
v1.0.1
Published
Engrym TypeScript SDK — typed client for the REST API. See https://github.com/engrym for documentation.
Readme
@engrym/sdk-ts
The official TypeScript SDK for the Engrym API — a typed client for reading and writing your project's knowledge programmatically.
Integrate Engrym into your own tools and workflows: query decisions, conventions, constraints, and context, and write new knowledge, with full TypeScript types generated from the Engrym API.
Install
npm install @engrym/sdk-tsUsage
import { createClient } from '@engrym/sdk-ts';
const client = createClient({
apiUrl: 'https://api.engrym.com',
apiKey: process.env.ENGRYM_API_KEY!, // your project's engrym_live_… credential
});
// Read your project's knowledge (atoms: decisions, conventions, constraints, context).
const atoms = await client.brain.list({ projectId: '<project-uuid>' });
// Record new knowledge.
const atom = await client.brain.create({
projectId: '<project-uuid>',
body: {
/* category, title, content, scope, confidence, source */
},
});
// Or pull the unified team-context snapshot in one call.
const context = await client.brain.context({ projectId: '<project-uuid>' });Construct the client with createClient({ apiUrl, apiKey }) (or jwt instead of apiKey for browser auth). It exposes 15 typed resource namespaces — brain, decisions, documents, intents, conflicts, sessions, projects, and more — each with fully-typed methods. Errors subclass ApiError (e.g. ApiNotFoundError, ApiValidationError, ApiRateLimitError) for typed handling.
Docs
https://engrym.com/docs/api-reference
License
Apache-2.0 © RTK AI Labs Ltd
