docs: update readmes

achingbrain committed May 24, 2025 at 08:47 UTC aae8b9f578468a430a27294d3fa6e51dcab4e8e9
6 files changed +71 -9
README.md
+6 -1
@@ -1,10 +1,15 @@
1 -# js-libp2p-inspector-monorepo
1 +# js-libp2p-inspector
2
3 [![codecov](https://img.shields.io/codecov/c/github/ipshipyard/js-libp2p-inspector.svg?style=flat-square)](https://codecov.io/gh/ipshipyard/js-libp2p-inspector)
4 [![CI](https://img.shields.io/github/actions/workflow/status/ipshipyard/js-libp2p-inspector/js-test-and-release.yml?branch=main\&style=flat-square)](https://github.com/ipshipyard/js-libp2p-inspector/actions/workflows/js-test-and-release.yml?query=branch%3Amain)
5
6 > Inspect a running libp2p node
7
8 +A web based inspector for libp2p nodes that runs in [browser devtools](https://github.com/ipshipyard/js-libp2p-inspector/tree/main/packages/libp2p-devtools) or as a
9 +standalone [Electron app](https://github.com/ipshipyard/js-libp2p-inspector/tree/main/packages/libp2p-inspector).
10 +
11 +![libp2p-inspector running in Electron](https://github.com/ipshipyard/js-libp2p-inspector/blob/main/assets/electron.png)
12 +
13 # Packages
14
15 - [`packages/libp2p-devtools`](https://github.com/ipshipyard/js-libp2p-inspector/tree/main/packages/libp2p-devtools) Browser DevTools plugin to inspect a libp2p node running on the current page
assets/electron.png
Binary files /dev/null and b/assets/electron.png differ
package.json
+1
@@ -32,6 +32,7 @@
32 "dep-check": "aegir run dep-check",
33 "doc-check": "aegir run doc-check",
34 "spell-check": "aegir spell-check",
35 + "start": "aegir run start",
36 "release": "run-s build docs:no-publish npm:release docs",
37 "npm:release": "aegir run release --concurrency 1",
38 "docs": "aegir docs",
packages/libp2p-devtools/README.md
-6
@@ -101,12 +101,6 @@ Browse to your webapp and open the DevTools, you should see a "libp2p" tab towar
101
102 6. ??? more features here
103
104 -# Install
105 -
106 -```console
107 -$ npm i @ipshipyard/libp2p-devtools
108 -```
109 -
104 # License
105
106 Licensed under either of
packages/libp2p-inspector/README.md
+30 -2
@@ -25,12 +25,40 @@ repo and examine the changes made.
25 An electron app that bundles @ipshipyard/libp2p-inspector-ui for use with
26 libp2p nodes running under Node.js or (eventually) in browsers.
27
28 -# Install
28 +![libp2p-inspector running in Electron](https://github.com/ipshipyard/js-libp2p-inspector/blob/main/assets/electron.png)
29 +
30 +## Installation instructions
31 +
32 +### 1. libp2p configuration
33 +
34 +Configure `@ipshipyard/libp2p-inspector-metrics` as your metrics implementation:
35 +
36 +```ts
37 +import { createLibp2p } from 'libp2p'
38 +import { inspectorMetrics } from '@ipshipyard/libp2p-inspector-metrics'
39 +
40 +const node = await createLibp2p({
41 + metrics: inspectorMetrics(),
42 + //... other options her
43 +})
44 +```
45 +
46 +### 2. Install the inspector
47 +
48 +```console
49 +$ npm i -g @ipshipyard/libp2p-inspector
50 +```
51 +
52 +### 3. Run
53
54 ```console
31 -$ npm i @ipshipyard/libp2p-inspector
55 +$ libp2p-inspector
56 ```
57
58 +Local libp2p nodes running the `@ipshipyard/libp2p-inspector-metrics` metrics
59 +implementation will advertise themselves via MDNS and should appear in the
60 +app.
61 +
62 # License
63
64 Licensed under either of
packages/libp2p-inspector/src/index.ts
+34
@@ -3,6 +3,40 @@
3 *
4 * An electron app that bundles @ipshipyard/libp2p-inspector-ui for use with
5 * libp2p nodes running under Node.js or (eventually) in browsers.
6 + *
7 + * ![libp2p-inspector running in Electron](https://github.com/ipshipyard/js-libp2p-inspector/blob/main/assets/electron.png)
8 + *
9 + * ## Installation instructions
10 + *
11 + * ### 1. libp2p configuration
12 + *
13 + * Configure `@ipshipyard/libp2p-inspector-metrics` as your metrics implementation:
14 + *
15 + * ```ts
16 + * import { createLibp2p } from 'libp2p'
17 + * import { inspectorMetrics } from '@ipshipyard/libp2p-inspector-metrics'
18 + *
19 + * const node = await createLibp2p({
20 + * metrics: inspectorMetrics(),
21 + * //... other options her
22 + * })
23 + * ```
24 + *
25 + * ### 2. Install the inspector
26 + *
27 + * ```console
28 + * $ npm i -g @ipshipyard/libp2p-inspector
29 + * ```
30 + *
31 + * ### 3. Run
32 + *
33 + * ```console
34 + * $ libp2p-inspector
35 + * ```
36 + *
37 + * Local libp2p nodes running the `@ipshipyard/libp2p-inspector-metrics` metrics
38 + * implementation will advertise themselves via MDNS and should appear in the
39 + * app.
40 */
41
42 export {}