# copper-sdk

> Copper App SDK

Latest version **0.9.1** (published 2025-06-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install copper-sdk
pnpm add copper-sdk
yarn add copper-sdk
bun add copper-sdk
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2025-06-16 |
| First published | 2018-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 233 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Guangda Zhang |
| Maintainers | copperinc-dev |
| Keywords | Copper, SDK, app, framework, integration |

## Links

- npm: https://www.npmjs.com/package/copper-sdk
- Repository: https://github.com/ProsperWorks/copper-sdk
- Homepage: https://github.com/ProsperWorks/copper-sdk#readme
- Issues: https://github.com/ProsperWorks/copper-sdk/issues
- npm.io page: https://npm.io/package/copper-sdk

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.9.1 (latest) — 2025-06-16
- 0.6.0-beta.0 (beta) — 2019-02-05
- 0.9.0 — 2025-03-06
- 0.8.0 — 2024-05-14
- 0.7.1 — 2024-05-02
- 0.7.0 — 2024-04-24
- 0.6.3 — 2019-05-03
- 0.6.2 — 2019-03-28
- 0.6.1 — 2019-03-21
- 0.6.0 — 2019-02-19
- 0.5.0 — 2018-10-17
- 0.4.2 — 2018-07-23
- 0.4.1 — 2018-07-09
- 0.4.0 — 2018-07-09

## README

Copper App SDK
====================

[![npm](https://img.shields.io/npm/v/copper-sdk.svg?style=flat-square)](https://www.npmjs.com/package/copper-sdk)


The javascript SDK provides client-side functionalities for adding embedded apps to the Copper web client.

The embedded app is an iframe embedded in the Copper web page. The display location of the iframe is configured in the embedded app's settings page.

## Usage
Execute the following with your webpack/rollup/browserify etc.
```bash
yarn add copper-sdk
# or
npm install copper-sdk --save
```

Followed by:
```javascript
import Copper from 'copper-sdk';
const sdk = Copper.init();

sdk.getContext()
  .then(({ context }) => {
    // do something with the context
  });
```

### Use with CDN
`copper-sdk` is served with https://www.jsdelivr.com/package/npm/copper-sdk

```html
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/copper-sdk@latest/dist/copper-sdk.min.js"></script>
<script type="text/javascript">
var sdk = window.Copper.init();
sdk.getContext()
  .then(function (data) {
    var type = data.type; // person,lead,...
    var context = data.context;
    // do something with the context
  });
</script>
```


## Development
### Prerequisites

We recommend Node 18 or newer.

Confirm all packages have been installed. This project uses yarn for package management.

```bash
yarn
```

### Developing SDK
```bash
## watch changes
yarn dev

## or run separately
yarn dev:es
yarn dev:commonjs

## build
yarn build

## test
yarn test
# or watch changes
yarn test:dev

## lint
yarn lint
```

## FAQ
### How do I use my local SDK instead of the npm one?
Execute `yarn link` inside this repository, then navigate over to the other repository and execute `yarn link copper-sdk`.

An alternative way would be to execute `npm link path/to/copper-sdk` in the repository.

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