Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/en/3-guides/3.0-how-to-create-an-instrument.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ sidebar:
import { Steps } from '@astrojs/starlight/components';
import Screenshot from '@/components/common/Screenshot.astro';

There are two ways to create and test an instrument:

- **Instrument Playground**: create, validate, and upload your instrument in the browser.
- **Local Development (CLI)**: run an instrument folder on your machine using `@opendatacapture/serve-instrument`.

## Instrument Playground (Recommended)

### Steps

<Steps>
Expand All @@ -31,3 +38,21 @@ import Screenshot from '@/components/common/Screenshot.astro';
<Screenshot alt="upload bundle form" name="upload-bundle" />

</Steps>

## Local Development (CLI)

To use the CLI you must have **Node.js** installed on your machine.

Install the CLI globally:

```bash
npm install -g @opendatacapture/serve-instrument
```

Then run it against your instrument folder containing an entrypoint (index.tsx, index.jsx, index.ts, index.js):

```bash
serve-instrument ./path/to/instrument
```

The server watches the instrument directory and rebuilds automatically when files change (refresh the browser to load the latest bundle).