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

loren-code

v0.3.10

Published

Terminal UI and local bridge for Ollama Cloud and Claude Code with model switching and API key rotation

Readme

loren-code

loren-code installs the loren CLI and terminal UI for working with a local Ollama Cloud bridge.

It is built to rotate multiple Ollama Cloud API keys, including the common setup where users configure more than one free-tier key for longer uninterrupted bridge usage.

If you configure more than one key, Loren sends requests in round-robin order across the configured keys.

Loren manages rotation and failover, but it does not bypass upstream limits or service terms.

Why Use Loren

Loren is useful if you want Claude Code ready quickly without repeating the same setup in every project.

A common workflow looks like this:

  • create one or more Ollama accounts
  • collect the available API keys, including free-tier keys
  • add them to Loren once
  • let Loren rotate requests across those keys in round-robin mode

That helps reduce rate-limit friction and keeps Claude Code sessions usable for longer.

Loren is installed globally, so once setup is done it stays ready across projects without manually redoing the same Claude Code bridge configuration every time.

Install

npm install -g loren-code

Verify:

loren

First Run

Loren stores user config in %USERPROFILE%\.lorencode.

On first run it creates:

C:\Users\<you>\.lorencode\.env.local

You must add valid OLLAMA_API_KEYS before the bridge can make upstream requests. If you configure multiple keys, Loren rotates them automatically.

For most users, the easiest path is:

loren

That opens Loren's terminal UI and guided setup.

Example .env.local:

BRIDGE_HOST=127.0.0.1
BRIDGE_PORT=8788
OLLAMA_API_KEYS=sk-key1,sk-key2
OLLAMA_UPSTREAM_BASE_URL=https://ollama.com
DEFAULT_MODEL_ALIAS=gpt-oss:20b
OLLAMA_MODEL_ALIASES={"ollama-free-auto":"gpt-oss:20b","ollama-free-fast":"gemma3:12b"}

Main Commands

loren
loren help
loren config:show
loren status
loren start
loren stop
loren model:list
loren model:set gpt-oss:20b
loren model:current
loren model:refresh
loren keys:list
loren keys:add sk-your-new-key
loren keys:remove 0
loren keys:rotate

Start The Bridge

loren start

The local bridge runs on:

http://127.0.0.1:8788

Claude Code Integration

On Windows:

powershell -ExecutionPolicy Bypass -File "$(npm prefix -g)\node_modules\loren-code\scripts\install-claude-ollama.ps1"

On Linux:

sh "$(npm prefix -g)/node_modules/loren-code/scripts/install-claude-ollama.sh"

The installer:

  • configures VS Code to use the local bridge
  • updates your user .claude settings
  • backs up existing global claude shims
  • installs Loren-backed claude, claude.cmd, and claude.ps1 wrappers

To restore the original claude command:

powershell -ExecutionPolicy Bypass -File "$(npm prefix -g)\node_modules\loren-code\scripts\uninstall-claude-ollama.ps1"

On Linux:

sh "$(npm prefix -g)/node_modules/loren-code/scripts/uninstall-claude-ollama.sh"

Troubleshooting

loren not found

Make sure the package was installed globally:

npm install -g loren-code

npm blocked in PowerShell

Use:

npm.cmd install -g loren-code

Missing API keys

Populate OLLAMA_API_KEYS in %USERPROFILE%\.lorencode\.env.local.

Port already in use

Change BRIDGE_PORT in %USERPROFILE%\.lorencode\.env.local.

Repository

Source code and project documentation:

https://github.com/lorenzune/loren-code