OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb / skills / repl-swarm / api-extract.json

52 lines · json ref:
{
  "repo": "repl-swarm",
  "timestamp": "2026-01-16T23:39:55.409Z",
  "entryPoint": "index.js",
  "exports": {
    "packageJson": {
      "main": "index.js"
    }
  },
  "api": {
    "file": "index.js",
    "exports": [
      {
        "type": "default",
        "name": "function"
      }
    ],
    "classes": [],
    "functions": [
      {
        "name": "replSwarm"
      },
      {
        "name": "firewall"
      },
      {
        "name": "randomBytes"
      }
    ]
  },
  "readme": {
    "content": "# repl-swarm\n\nAttach to a node repl using Hyperswarm\n\n```\nnpm install repl-swarm\n```\n\n## Usage\n\nIn the app you want to debug\n\n``` js\nconst repl = require('repl-swarm')\n\nrepl({ data: { i: 'am exposed in the repl' }, foo: 'anything in this map is exposed to the repl' })\n```\n\nRunning the above will print out a secure key you can use to connect to the repl with.\nTo do so, install the cli\n\n```\nnpm install -g repl-swarm\n```\n\nThen connect from anywhere in the world\n\n```\nrepl-swarm <key printed above>\n```\n\nThen you'll have a full end-to-end encrypted node repl.\n\n## API\n\n#### `const seed = repl(opts)`\n\n`opts` include:\n- `seed`: the seed to use (if not set, it checks the `REPL_SWARM` environment variable. If that is not set either then it defaults to a random seed)\n- `logSeed`: whether to log the seed (default true).\n\nAny other opts are exposed over the repl (see Usage section).\n\n## License\n\nMIT\n",
    "sections": [
      "intro",
      "usage",
      "api",
      "license"
    ],
    "hasApi": true,
    "hasExamples": true,
    "exampleCount": 3,
    "examples": [
      "npm install repl-swarm",
      "Running the above will print out a secure key you can use to connect to the repl with.\nTo do so, install the cli",
      "Then connect from anywhere in the world"
    ]
  },
  "patterns": [
    "dht-discovery",
    "cryptography"
  ]
}