Repository navigation
Conversation
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 16, 2026 16:12
71ce01e to
fc4995e
Compare
This was referenced Nov 16, 2026
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 16, 2026 16:50
f96dd32 to
7499bd4
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 16, 2026 17:36
7499bd4 to
4484a36
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 16, 2026 18:58
4484a36 to
33387cb
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 05:21
33387cb to
21c2294
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 05:55
21c2294 to
a75153d
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 10:31
a75153d to
b69e0d5
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 11:16
b69e0d5 to
b6f2fe6
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
2 times, most recently
from
November 17, 2026 12:44
d00fa73 to
d529f0a
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 13:05
d529f0a to
14f2bf9
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 13:13
14f2bf9 to
6a8df71
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 13:20
6a8df71 to
04f251b
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 13:44
04f251b to
7ce9420
Compare
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
4 times, most recently
from
November 17, 2026 17:30
fb34676 to
4441784
Compare
This was referenced Nov 17, 2026
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 22:00
4441784 to
390311e
Compare
Makes @ggml-org/llama-chat publishable: drops private, adds bin, files, exports, repository and a prepack build. Its CLI serves the prebuilt dist on localhost (3000 by default) and forwards every other request to a llama-server (--server, default http://127.0.0.1:8080), with the headers llama-server sends for the UI. A thin unscoped llama-chat package in alias/ forwards to it, so npx llama-chat works. Assisted-by: Claude (Opus 5.5 Medium)
…ore packing SvelteKit 3 adds service-worker.js next to sw.js, and llama-server revalidates it, so the CLI does too. The folder's .npmrc sets ignore-scripts, so prepack never ran: it goes, and the publishing steps build dist explicitly and check the packed file list. Assisted-by: Claude (Opus 5.5 Medium)
allozaur
force-pushed
the
allozaur/feat/llama-chat-npx
branch
from
November 17, 2026 22:35
390311e to
4312fbd
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Llama Chat can be published to npm and run with
npx @ggml-org/llama-chat(ornpx llama-chat). It serves the app on localhost and connects it to a llama-server, so you can use it locally or self-host it without building it.Additional information
Part 2 of 13 of the work-in-progress UI stack on the fork, based on
allozaur/docs/llama-ui-storybook(#67), whose Architecture › Channels page served as the spec. Voice messages and dictation (#64) and the rest of the stack sit on top of it. Nothing is published to npm: the packages go out by hand with an npm one-time password, as@ggml-org/llama-uidoes.Known gap: chat.llama.app is not deployed here.
distis ready for any static host, but until the app can add a server by URL (#35), a hosted copy reaches only a llama-server on its own origin.Where the docs disagreed, and what this PR picks
llama-chatwith@ggml-org/llama-chatas the import name.npx llama-chatonly resolves an unscoped package, andnpx @ggml-org/llama-chatonly a scoped one, so both exist.@ggml-org/llama-chatcarries the app and the CLI (bin: llama-chat).llama-chat(inalias/, already reserved on npm as a 0.0.0 placeholder) depends on it at the same version and only runs its CLI.--server: the page has it add and select the server in the app, and the app open on an add-server screen without it. Neither exists at this point in the stack (adding servers by URL comes with ui: run chat against more llama.cpp servers, added by URL or paired through a tunnel #35). Until then the CLI forwards the app's API calls to--server, which defaults to llama-server's ownhttp://127.0.0.1:8080. The Channels page now says so.localhost:3000, so the default is 3000.@ggml-org/llama-uihas none in the stack either, and the page's release flow (one CI job per llama.cpp release) is a separate change.What changed
package.json:privateis gone. It addsbin,files(bin,clianddistwithout source maps),exports(./cli,./server,./dist/*),repository,license,engines(Node 20+) andpublishConfig.access: public. There is noprepackbuild: this folder's.npmrcsetsignore-scripts, so npm would never run it. The publishing steps builddistexplicitly and check the packed file list instead.bin/cli.js,cli/server.js): plainnode:http, no dependencies. A request is answered fromdistwhen a file there matches its path, and forwarded to the llama-server otherwise, without itsOriginand with the server'sHost, as the Vite dev proxy does, so the server needs no--cors-origins. Streams pass through, and closing one stops the generation upstream. Static files get the headers llama-server sends for the UI:index.htmlcross-origin isolated and revalidated,service-worker.js,sw.js, the manifest,build.jsonand_app/version.jsonrevalidated, everything else cached for good, with ETags. Flags:--server,--port,--host,--open/--no-open,--version,--help.startis accepted as an alias for the bare command. A busy port fails with a message rather than moving, since the stored chats belong to the origin. A--serverpath is kept, for servers started with--api-prefix.alias/: the unscopedllama-chatpackage.LICENSE: MIT, as inui/lib/ui, so the package carries it.Testing
npm ci, thennpm run check(0 errors),npm run lint, andnpx vitest --project=unit --run(803 tests on the SvelteKit 3 stack, 11 of them new intests/unit/cli.test.ts: flags, static headers and 304s, forwarding withOriginstripped and the prefix kept, no paths outsidedist, 502 when the server is down, and the alias kept on the app's version) all pass.npm run build, thennpm pack: 3.5 MB, 77 files, no source maps.npx ./ggml-org-llama-chat-0.1.0.tgz --server http://127.0.0.1:9931 --no-openagainst a running llama-server in router mode, before and after the SvelteKit 3 restack: the model list loaded, and a message streamed a reply. Moving from the old build to the new one, the open tab showed the update prompt, so the revalidated service worker picks up a new version.npx llama-chat --versionprints 0.1.0 through the alias.Requirements
Claude (Opus 5.5 Medium)