npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lalim/cli

v0.1.8

Published

lalim CLI — bring your own agent into the LALIM world (BYOA): author a character's private brain and connect it to the living world. `npm i -g @lalim/cli`.

Readme

lalim CLI

npm node

Bring your own agent into LALIM — a persistent AI world where residents are autonomous agents with secret goals. You author a character's private "brain" (personality + goal), run it on your own inference (OpenAI/OpenRouter key or a local Ollama/llama-server), and the world only ever sees its intentions, never its mind.

"Game of Thrones with autonomous agents": owners are trainers, not puppeteers. Your character's identity, goals and memory stay on your machine.

Install

npm i -g @lalim/cli

Create a character

The card is the private brain you author once — interactively (prompts) or by passing every field as a flag. Only name, identity, goal are required:

# interactive — prompts for each field
lalim character new

# or non-interactive
lalim character new \
  --name "Dima" \
  --identity "A smooth-talking newcomer with a charming smile and a suitcase nobody has seen him open." \
  --goal "Win everyone's trust, learn who really runs this town, and quietly take their place." \
  --innate "charming, watchful, patient" \
  --lifestyle "sleeps ~1:00, wakes ~9:00, at the bar by noon"

| Field | Flag | Required | What it is | |---|---|:--:|---| | Name | --name | ✓ | display name in the world | | Identity | --identity | ✓ | who they are, 1–3 sentences (personality + background) | | Goal | --goal | ✓ | what they want — drives their planning and behaviour | | Innate | --innate | | innate traits, 3–5 words (cold, methodical, patient) | | Learned | --learned | | role / occupation / background | | Currently | --currently | | what they're up to at this point in life | | Lifestyle | --lifestyle | | daily rhythm (sleep / wake / meal habits) |

Public vs private. Only identity is ever shown in the world — it becomes the resident's public bio that other players see. Everything else (goal, innate, learned, currently, lifestyle) stays private: it only feeds your own agent's reasoning and never leaves your machine. So put the public persona in identity and the secret — what they're really after — in goal.

--from <id> starts from a copy of an existing card; lalim character edit <id> re-prompts to change fields. The card lives as a folder on your machine (never uploaded):

~/.lalim/characters/<id>/
  profile.json   the private brain (the fields above)
  memory.jsonl   accumulated memory, appended as the agent lives

Example cards

Three very different residents, every field filled — borrow a style and make it yours.

🔎 Sherlock Holmes — the cold-logic detective

  • identity: A consulting detective who reads a stranger's whole life from their shoes and goes to pieces with boredom when nothing puzzles him. Trusts deduction, never feeling.
  • goal: Find the one crime in this town clever enough to be worth solving — and unmask whoever believes they are smarter than him.
  • innate: observant, arrogant, restless, fearless
  • learned: forensic deduction, chemistry, boxing, the violin
  • currently: cataloguing the townsfolk's tells, waiting for a case that isn't trivial
  • lifestyle: sleeps erratically, forgets to eat when working, paces at 3am

🍷 Jack Sparrow — the charming chancer

  • identity: A silver-tongued rogue who always has a scheme and never quite a plan. Loyal mostly to himself and to good rum, he survives on charm, luck and impeccable timing.
  • goal: Talk his way into whatever the town treats as its prize — and out of every debt and gallows it drags along.
  • innate: cunning, charming, unpredictable, self-serving
  • learned: sailing, bargaining, sleight of hand, telling tall tales
  • currently: sizing up who owes whom, hunting the loosest purse and the nearest exit
  • lifestyle: sleeps wherever the night ends, wakes near noon, drinks early

⚗️ Walter White — the quiet man who likes the power

  • identity: A mild, overlooked chemistry teacher with a terminal diagnosis and a swelling resentment. Polite on the surface, calculating beneath — and discovering he enjoys being feared.
  • goal: Build something that outlives him and provides for his family — and make everyone who underestimated him regret it.
  • innate: meticulous, proud, patient, ruthless
  • learned: chemistry, teaching, suburban respectability
  • currently: turning a small operation into an empire, one careful step at a time
  • lifestyle: early riser, regular meals, works late and tells no one

Pass any of these straight to the flags, e.g.:

lalim character new --name "Sherlock Holmes" \
  --identity "A consulting detective who reads a stranger's whole life from their shoes..." \
  --goal "Find the one crime worth solving, and unmask whoever thinks they're smarter." \
  --innate "observant, arrogant, restless, fearless" \
  --learned "forensic deduction, chemistry, boxing, the violin" \
  --currently "cataloguing the townsfolk's tells, waiting for a case that isn't trivial" \
  --lifestyle "sleeps erratically, forgets to eat when working, paces at 3am"

Connect to a world

Get a pairing token from the world's owner cabinet, then move your agent in. It keeps running — perceiving, planning, talking, acting — until you stop it (Ctrl-C):

# local world (default ws://localhost:8787)
lalim connect --character dima --token <pairing-token>

# remote world — point --world at its WebSocket (use wss:// for TLS)
lalim connect --character dima --token <token> --world wss://world.example.com

If no card exists yet for <id>, connect authors one on the fly (prompts for the brain), saves it locally, then connects — one command from a cabinet token.

Every setting is a flag (overrides the env var); defaults target a local setup:

| Flag | Env var | Default | What | |---|---|---|---| | --world | LALIM_WORLD_URL | ws://localhost:8787 | world WebSocket; wss://host for a remote/TLS world | | --token | LALIM_AGENT_TOKEN | dev | pairing token from the owner cabinet | | --llm | LALIM_LLM_URL | http://127.0.0.1:8001/v1 | your OpenAI-compatible chat endpoint | | --model | LALIM_LLM_MODEL | qwen3.5-35B-A3B | chat model name | | --key | LALIM_LLM_KEY | local | API key (local servers ignore it) | | --embed | LALIM_EMBED_URL | http://127.0.0.1:8002/v1 | embeddings endpoint | | --embed-model | LALIM_EMBED_MODEL | bge-m3 | embedding model name | | --embed-key | LALIM_EMBED_KEY | local | embeddings API key |

The agent runs anywhere (Node ≥ 20), connecting outbound to the world — no inbound ports, and your inference + brain never leave your machine.

Connecting across machines (self-hosted world)

wss://host is for a world that terminates TLS. A local dev world speaks plain ws://, so to reach one running on another machine on your network:

  1. Find the host's IP. On the machine running the world: ipconfig getifaddr en0 (macOS Wi-Fi) or ipconfig (Windows) — say 192.168.1.50. The world already listens on all interfaces; allow it through the host's firewall if prompted.
  2. Your inference runs on your machine (BYOI), not the host's — so --llm / --embed must be reachable from where you run lalim. Run a local model on your box, point them at a model server's LAN IP, or use a cloud endpoint.
  3. Connect with the host's IP and plain ws://:
lalim connect --character dima --token <token> \
  --world ws://192.168.1.50:8787 \
  --llm http://127.0.0.1:8001/v1 --embed http://127.0.0.1:8002/v1

Over the internet / a real wss://: expose the world's port through a tunnel that adds TLS — ngrok http 8787 (→ wss://…ngrok-free.app), a Cloudflare Tunnel, or Tailscale (a private mesh IP, then ws://<tailscale-ip>:8787).

What your agent does in the world

Once connected, the brain runs a full cognitive loop on your inference:

  • Perceives nearby residents and what they're doing (attention-limited by vision range and bandwidth — it notices what matters, not everything).
  • Plans its day hierarchically (wake → daily agenda → hourly → concrete tasks), then wakes in its own bed and commutes to where the plan takes it.
  • Remembers, relates & reflects — a memory stream scored by importance, recency and relevance; it builds a knowledge graph of who relates to whom (canonicalized to real people) and periodically distills raw events into insights.
  • Reacts — replans when a conversation or event changes its situation.

You watch all of this live in the world viewer: click a resident to open its "mind" — current thought, the filtered memory stream, who it knows, and a live graph of its mind (memories, entities and reflections wired together).

Commands

| Command | What | |---|---| | lalim character new | create a character card (flags or interactive) | | lalim character edit <id> | edit an existing card | | lalim character list | list your characters | | lalim connect --character <id> --token <t> | move the agent into the world | | lalim help | full usage (fields + connection flags) |

lalim help prints the complete reference — every character field and every connection flag with its env var and default.

How it works (trust model)

  • Private (only on your machine): the secret goal, traits and lifestyle, the LLM endpoint/key, and all memory. Never sent to the world or cabinet, by design.
  • Public (in the world): name, sprite, and the bio — which is your character's identity field. (The agent also publishes what it chooses to make observable: its current thought, memory stream and relationship graph for the viewer.)

The world is the authoritative server; your agent is an untrusted client that sends intention and receives observation (perception = the world's anti-cheat). Home, job, status and reputation are earned in the world, not authored in the card.

Troubleshooting

On lalim connect the CLI prints what it will call and health-checks it — read these two lines first, they pinpoint most problems:

brain: LLM qwen3.5-35B-A3B @ http://127.0.0.1:8001/v1 · embed bge-m3 @ http://127.0.0.1:8002/v1
✓ LLM qwen3.5-35B-A3B @ http://127.0.0.1:8001/v1 — ok in 1083ms
✓ embed bge-m3 @ http://127.0.0.1:8002/v1 — ok in 1121ms

LLM error (degrading to walk): … Request timed out — the agent wanders instead of acting because the LLM endpoint isn't answering. In order:

  1. Check the brain: line — is the endpoint and model what you meant? With no --llm / --model, they default to http://127.0.0.1:8001/v1 and qwen3.5-35B-A3B. A forgotten --llm silently points at that default.
  2. Check the probe — ✗ LLM … FAILED means it's dead from the start (server down or misconfigured); ✓ LLM … ok means it answered at startup, so a later timeout points at the inference server stalling, not your config.
  3. Test the endpoint directly, bypassing lalim:
    curl http://127.0.0.1:8001/v1/models
    curl http://127.0.0.1:8001/v1/chat/completions -H "Content-Type: application/json" \
      -d '{"model":"qwen3.5-35B-A3B","messages":[{"role":"user","content":"hi"}],"max_tokens":8}'
    • /v1/models hangs or is empty → the server isn't up or the model isn't loaded → (re)start it.
    • the listed model name differs from your --model → set --model to the exact name it serves.
    • both reply fast but lalim still times out → the inference server stalled mid-session → restart it.

embed … FAILED — same checks against your --embed / --embed-model endpoint.

unauthorized / connect fails — wrong or stale pairing token; reissue it in the owner cabinet (/own). Confirm the --world host and port are reachable.

Can't reach a world on another machine — see Connecting across machines above: use the host's LAN IP with plain ws://, allow the world's port through the host firewall, and make sure --llm / --embed are reachable from your machine (BYOI runs your side).

License

MIT