# Work SDK

> The agent-safe TypeScript SDK for GitHub Issues, GitLab, Linear, Jira, and Azure DevOps.

Work SDK is an open-source TypeScript library for GitHub Issues, GitLab, Linear, Jira, and Azure DevOps. It provides one normalized API for reading and writing work items, with inspectable prepared changes, atomic idempotency coordination, explicit concurrency guarantees, capability discovery, and normalized errors.

## Install

```bash
npm install work-sdk
```

## Quick example

```ts
import { createWorkClient } from "work-sdk";
import { github } from "work-sdk/github";

const work = createWorkClient({
  adapter: github({
    owner: "acme",
    repo: "api",
    token: process.env.GITHUB_TOKEN!,
  }),
});

const change = await work.prepareUpdate("481", { state: "closed" });
console.log(change.changes, change.warnings);

await work.commit(change, {
  idempotencyKey: "merge:acme/api#481",
});
```

## Why prepared changes?

Direct provider calls combine intent, provider mapping, and an irreversible side effect. Work SDK separates them:

1. **Prepare** validates input, reads current state, and produces a fingerprinted change plan.
2. **Inspect** lets a human or policy check exact field changes and provider warnings.
3. **Commit** verifies the fingerprint and expected revision before writing.

## Supported providers

- GitHub Issues via `work-sdk/github`
- GitLab via `work-sdk/gitlab`
- Linear via `work-sdk/linear`
- Jira Cloud via `work-sdk/jira`
- Azure DevOps via `work-sdk/azure-devops`

## Links

- Website: https://work-sdk.vercel.app
- Documentation: https://work-sdk.vercel.app/docs
- Getting started: https://work-sdk.vercel.app/docs/getting-started
- Provider comparison: https://work-sdk.vercel.app/docs/providers
- Example apps: https://work-sdk.vercel.app/docs/examples
- Source: https://github.com/arturict/work-sdk
- npm: https://www.npmjs.com/package/work-sdk
- Machine index: https://work-sdk.vercel.app/llms.txt
- Agent guide: https://work-sdk.vercel.app/agents.md
