Small NIP-98 client for managing routstrd clients and admin npubs.
bun install
cp .env.example .envEdit .env:
NSEC=nsec1...
HOST_URL=http://localhost:8008NSEC is the Nostr private key used for NIP-98 admin requests.
HOST_URL must be the public base URL that routstrd-auth sees, because NIP-98 signs the exact request URL.
# Add a client, then list clients
bun run start -- --name "My Laptop"
# List clients only
bun run start
# JSON output
bun run start -- --jsonCLI flags can override .env values:
bun run start -- --url http://localhost:8008 --key nsec1... --name "My Laptop"The client understands routstrd-auth's /npubs endpoints.
# List configured admin npubs. This does not require a key.
bun run start -- --list-npubs
# Add an admin npub/pubkey.
# If no admins exist yet, this first add is unauthenticated.
# Once admins exist, --key must belong to an existing admin.
bun run start -- --add-npub npub1...
bun run start -- --key nsec1... --add-npub npub1...
# Delete an admin npub/pubkey. Requires --key from an existing admin.
bun run start -- --key nsec1... --delete-npub npub1...When normal client management is run with --key, the CLI checks /npubs first. If no admin npubs are configured, it automatically bootstraps the public npub for --key as the first admin before calling /clients/add or /clients.
Disable that automatic first-admin bootstrap with:
bun run start -- --no-bootstrap-admin --key nsec1...