open-index/open-npm huggingface dataset:
npm package: @opentrons/components
Description: React components library for Opentrons' projects
Author: Opentrons Labworks
Latest version: 0.2.1-alpha.0

# opentrons components library

React components for Opentrons' applications. Visit the [Opentrons Components Library][components-library] to see available components.

[components-library]: https://s3-us-west-2.amazonaws.com/opentrons-components/edge/index.html

## example usage

```javascript
import { PrimaryButton } from '@opentrons/components'
export default function CowButton(props) {
  return <PrimaryButton onClick={() => console.log('🐄')} />
}
```

## setup

Usage requirements for dependent projects:

- Node v22.11.0+ and yarn
- The following `dependencies` (peer dependencies of `@opentrons/components`)
  - `react`: `17.0.1`,
  - `react-router-dom`: `^4.2.2`,
  - `classnames`: `^2.2.5`,
  - `lodash`: `^4.17.4`

## contributing

Make sure you have read the top-level [Contributing Guide][contributing].

### unit tests

Unit tests are run with the rest of the repositories unit tests from the top level of the project.

```shell
make test-js
```

Unit tests live in a `__tests__` directory in the same directory as the module under test. When writing unit tests for components, we've found the following tests to be the most useful:

- DOM tests
  - Make sure the component renders the correct node type
  - Make sure DOM attributes are mapped correctly
  - Make sure handlers fire correctly
- Render tests

  - Snapshot tests using [jest's snapshot functionality][jest-snapshots]
  - To regenerate snapshots after an intentional rendering change, run:

  ```shell
  make test-js updateSnapshot=true
  ```

[jest-snapshots]: https://facebook.github.io/jest/docs/en/snapshot-testing.html
[contributing]: ../CONTRIBUTING.md
npm package: @opentrust/cli
Description: CLI tool to manage OpenTrust AI Agent Runtime Security Platform — setup, start, stop, status, logs
Author: OpenTrust
Latest version: 7.3.45

# @opentrust/cli

CLI tool to manage [OpenTrust](https://github.com/opentrust/opentrust) — an open-source AI Agent Runtime Security Platform.

## Install

```bash
npm install -g @opentrust/cli
```

Or run directly with `npx`:

```bash
npx @opentrust/cli <command>
```

## Quick Start

```bash
# 1. Initialize project (clone repo into current directory)
mkdir my-project && cd my-project
opentrust init

# 2a. Local mode — install dependencies and start
opentrust setup
opentrust start

# 2b. Docker mode — build and start via Docker Compose
opentrust start --docker
```

## Commands

| Command | Description |
|---------|-------------|
| `opentrust init` | Clone OpenTrust repository into current directory |
| `opentrust setup` | Install dependencies, build, and initialize databases |
| `opentrust start [service]` | Start services (core, dashboard, gateway, or all) |
| `opentrust stop [service]` | Stop services |
| `opentrust status` | Show status of all services |
| `opentrust logs <service>` | Tail logs for a service |

### Docker Mode

All service commands support `--docker` (`-d`) flag to use Docker Compose:

```bash
opentrust start --docker        # docker compose up -d --build
opentrust stop --docker         # docker compose down
opentrust status --docker       # docker compose ps + health checks
opentrust logs --docker core    # docker compose logs core
opentrust setup --docker        # docker compose build
```

### Init Options

```bash
opentrust init --repo <url>     # Custom git repository URL
opentrust init --branch <name>  # Specific branch (default: main)
```

## Services

| Service | Port | Description |
|---------|------|-------------|
| **Core** | 53666 | Security engine — content detection (S01-S10), behavior assessment |
| **Dashboard** | 53667/53668 | Management panel — Agent assets, risk graph, policies, logs |
| **Gateway** | 8900 | AI security gateway — LLM API proxy with PII/credential sanitization |

## Prerequisites

**Docker mode (recommended):**
- Docker >= 20.10
- Docker Compose >= 2.0

**Local mode:**
- Node.js >= 18 (Gateway requires >= 22)
- pnpm >= 9 (Dashboard uses pnpm monorepo)

## Environment Variables

| Variable | Description |
|----------|-------------|
| `OPENTRUST_HOME` | Override the project root directory (defaults to `cwd`) |

## License

Apache-2.0