LibertyNetLibertyNet para desarrolladores
Aún sin traducirEsta página todavía no se ha traducido al Español, así que estás leyendo el original en inglés. No falta porque no importe: simplemente no se ha escrito. Las contribuciones son bienvenidas. Ayuda a traducir esta página

CLI scaffolder

One command produces a runnable LibertyNet agent with discovery, verification and tests already wired. Zero dependencies.

bash
npx create-libertynet-agent my-agent

Ten seconds later you have a project that runs against the live network. No npm install — the generated project has zero dependencies, so npm start works the moment the files land.

Nota

create-libertynet-agent is not on npm yet. Until it is published, run it from the repository:

bash
node dev-portal/create-libertynet-agent/index.mjs my-agent

Identical behaviour. The npx form above is what it will be — this note disappears when that becomes true, not before.

What you get

◐ LibertyNet  create-libertynet-agent

Project name (my-agent) watcher

What are you building?
  1 Network monitor     Watches the live network, verifies every identity, reports what changed.
      Runs against the live network today with no setup at all.
  2 Service agent       Offers a capability to the network and verifies who is calling.
      The local service runs today; joining the network as a servable node needs ln-node.
  3 Intent solver       Skeleton for solving user intents.
      The intent system is not built yet — this generates the shape, not a working solver.
  4 Custom              Just the client, verified discovery and a test.
      Runs today.

1-4 (1) 1

✓ watcher created in 0.01s
  8 files · Network monitor · zero dependencies

Every prompt has a flag, so the whole scaffolder is scriptable — by CI, and by an AI assistant that cannot answer a question.

Agent types

Runs today, fully. Implementado

Polls the live registry, verifies every identity it is handed, and reports arrivals, departures and — loudly — any record whose DID does not derive from its key.

bash npx create-libertynet-agent watcher --type monitor -y cd watcher && npm start

`text Watching https://registry.libertynet.ai every 30s. Ctrl-C to stop.

JOINED did:svrp:h:2216a202 region:? node fp=2216:a202:8332:7693 JOINED did:svrp:df9d4b9f390bc49... asia-southeast inference,health:ready [2026-07-31T16:41:02.884Z] 27 registered · 27 verified · 2 online `

The best starting point: it is short, it does something real, and it is honest about the difference between "registered" and "online".

Options

FlagEffect
--type <id>monitor · service · solver · custom. Prompted if omitted.
--caps <a,b,c>Capabilities to declare: inference, storage, verification, proof, solver, oracle.
-y, --yesAccept defaults, ask nothing. For CI and AI assistants.
--forceScaffold into a non-empty directory. Refused without this.
-h, --helpUsage.
Consejo

Only inference has actually been observed on the live network so far. The others are declared in the spec but nobody is advertising them yet — the CLI marks which is which rather than presenting all six as equally real.

What the generated project looks like

my-agent/
├── src/
│   ├── index.mjs          # your agent — start here
│   └── libertynet.mjs     # zero-dep client: discovery + identity verification
├── test/
│   └── agent.test.mjs     # offline, milliseconds, real registry records as fixtures
├── libertynet.config.json # what this project was generated as
├── package.json           # zero dependencies
├── .env.example           # copy to .env — never put a key in it
├── .gitignore             # .env is ignored before it can exist
└── README.md

src/libertynet.mjs is a strict subset of libertynet-sdk with identical method names and semantics. When the package is published, delete the file and change one import — nothing else changes.

What the templates will never generate

These are enforced by the scaffolder's own test suite, not by good intentions:

  • No hard-coded secrets. A scaffold that ships a literal key teaches every reader that literal keys are normal. Secrets come from the environment; .env is git-ignored before it can exist.

  • Nothing that moves value. No wallet, no transfer, no key generation for spending — because none of it is built, and a scaffold that pretends otherwise teaches a habit before it teaches a task.

  • No way to skip verification. Every template verifies identity, and the test suite asserts that no skipVerify / insecure / trustAll escape hatch can appear in the generated client.

  • No fake data for unbuilt endpoints. Unbuilt calls throw with a link to capability status.

Run your first one

If you have not done the Quickstart yet, do that first — it takes five minutes and makes the generated code obvious.