Goal: Load an existing plugin package throughDocumentation Index
Fetch the complete documentation index at: https://staging-docs.orderly.network/llms.txt
Use this file to discover all available pages before exploring further.
OrderlyAppProvider’s plugins prop.
Prerequisite: A plugin package that exports a register function (e.g. registerMyPlugin()), either from Tutorial 1 or published npm. Optional: orderly-devkit skills install plus Skills-first workflow.
Using agent skills for this tutorial
The orderly-plugin-add skill matches “integrate / install / register an Orderly plugin in a DEX host.” It is built around the same steps as below and stresses:- Find
OrderlyAppProvider(grep, or search the repo) — the skill treats this as the non-negotiable first step. - Resolve the package — workspace
workspace:*,file:, or npm, thenpnpm install. - **Import
registerXxxPluginand addplugins={[…]}on the provider. - Optionally
orderly-devkit view <plugin-id>(afterorderly-devkit login) to readusagePrompt/ package name for Marketplace plugins — same as the Import and Marketplace metadata sections below.
@scope/my-local-plugin into this host’s OrderlyAppProvider” / “Install the Marketplace plugin <id> and follow usagePrompt.” The skill should mirror this tutorial and refuse to guess plugins wiring.
1. Find OrderlyAppProvider
Search the host codebase:
plugins prop (if any).
2. Add the dependency
Pick one pattern:| Pattern | When |
|---|---|
| pnpm workspace | Monorepo: add the package to pnpm-workspace.yaml if needed, then "@scope/plugin-name": "workspace:*" in the host package.json. |
| Local path | "@scope/plugin-name": "file:../path-to-plugin" for local development. |
| Published npm | "@scope/plugin-name": "^x.y.z" after publish. |
pnpm install (or npm/yarn) from the workspace root.
Verification: pnpm why @scope/plugin-name (or equivalent) resolves in the host.
3. Import the register function
package.json / README / Marketplace metadata.
Marketplace metadata
If the plugin is listed on the Marketplace, you can inspect metadata with the devkit after logging in:usagePrompt first when present—it describes integration steps from the author. The CLI view command requires authentication today (Bearer token); see Agent skills alignment.
4. Register on OrderlyAppProvider
5. Verify
- Typecheck / build the host.
- Run the app and open UI surfaces affected by the plugin’s interceptors.
- Optional grep:
Layout plugins
If the plugin targetsTrading.Layout.Desktop, ensure you understand precedence between plugin layout strategies and host-provided layoutStrategy / getInitialLayout. See @orderly.network/layout-core on npm (layout customization docs) and the plugin types guide.
Optional: Storybook
If the host usesOrderlyAppProvider in Storybook, register the same plugins entry there for local UI testing.