# Build and host your own LogiShell shell

Any coding agent with a terminal and Node 20+ can build a shell. It is a folder with a portable `logishell.json` manifest and HTML tool pages. A reader opens it in their browser. No model subscription or LogiShell account is needed to build or open it.

## Build in a conversation

Open [the studio](https://shell.lsh.dev/) and try the Notes tool in the preview. Tell LOG one change you want, for example “Add a word counter to Notes and keep my text when I reopen it.” Connect your Claude when prompted. Check the result in Preview. Ask for one more change in the same conversation. Select a changed file to see its contents or choose **Restore** to return to an earlier version.

**More → Files and download** exports a ZIP with the manifest and tool pages. Unzip it in a Git repository, review the files, and push when ready. **Connect repo** opens the GitHub address field. **More → Tools & repositories** also lets you choose where to save a composition. The conversation and unpublished source files live in this browser.

## Try the workflow first

Open [Tools and repositories](https://shell.lsh.dev/library), give your desk a name, add a tool from the list and choose **Open my shell**. Use **Copy link** to share its arrangement. For a working example, [Daybook](https://shell.lsh.dev/s/LogiShell/shell-next-step) lets you write your next action, keep your brief alongside it and mark it done.

Try keeping the same tool in two desks. Write a next action in [Daybook](https://shell.lsh.dev/s/LogiShell/shell-next-step), then open the [writing desk](https://shell.lsh.dev/new#m=eyJpZCI6IndyaXRpbmctZGVzayIsIm5hbWUiOiJXcml0aW5nIGRlc2siLCJ2ZXJzaW9uIjoiMS4wLjAiLCJuZWVkcyI6WyJMb2dpU2hlbGwvc2hlbGwtbmV4dC1zdGVwIl0sInRvb2xzIjpbXSwic2hlbGxzIjpbeyJpZCI6Im1haW4iLCJ0aXRsZSI6IldyaXRpbmcgZGVzayIsImRlc2NyaXB0aW9uIjoiRHJhZnQgaW4gTm90ZXMgYW5kIGtlZXAgeW91ciBuZXh0IGFjdGlvbiB3aXRoaW4gcmVhY2guIiwidG9vbHMiOlsiY29yZS5ub3RlcyIsIm5leHQtc3RlcC5jYXJkIl0sImhvbWUiOiJjb3JlLm5vdGVzIn1dfQ) in the same browser profile and select **Today**. Edit the action there and reopen Daybook. Both desks use one tool with one set of records. A shared link gives another person the arrangement and their own entries.

Use the starter below when two tools should work on the same record. Inbox captures a task. Review shows that task without copying it into another app. On your next visit the task is still there in the same browser profile. A colleague opening your published link starts with their own entries.

## Connect a GitHub repository

Open [Tools and repositories](https://shell.lsh.dev/library), paste a public GitHub repository address such as `https://github.com/LogiShell/shell-next-step` and connect it. The builder reads the default branch once and shows the commit. Choose **Open this shell** to run that version, or add its tools to your own shell. The manifest, tool pages and relative assets use that commit when you reopen the link. To pick up changes, connect the repository again and save the new version.

A project can also provide a root `plugin.json`. Open its plugin link, review the manifest address in the LogiShell app and press **Install**. The installation uses the same commit. Both a full shell and a plugin can share a repository.

## Connect your own AI

Open [Customize](https://shell.lsh.dev/yours) and sign in to LogiShell. For a Claude subscription, sign in once with Claude Code on this computer, open the LogiShell Backbone desktop app, then choose **Connect my Claude account**. Allow the browser to reach the local app if prompted. For an Anthropic API key, use the key field instead. Ask for a small change, open the preview and check the result. The subscription needs the desktop app running. A personal key is kept in this browser and sent directly to Anthropic.

## Keep a composition on your computer

Choose tools, sign in and select **Keep this shell in**. The list shows the names of your approved computers, including your cloud computer. Choose a place and press **Open my shell**. The same builder opens from the admin constructor. The selected computer must be online with the shell library installed.

Use **Edit shell** to save a new version. In another browser, sign in, choose the same place and open its saved shell. Append `&version=1` to the saved address to see the original composition. Tool entries follow the browser storage rules below. Published dependencies keep their own release histories.

## Create and preview

In an empty workspace, install the toolkit next to the folder you will publish:

```sh
mkdir -p .tools
curl -fsSL https://shell.lsh.dev/skill.tgz -o .tools/logishell-shell.tgz
tar -xzf .tools/logishell-shell.tgz -C .tools
KIT="$PWD/.tools/logishell-shell"
node "$KIT/author.mjs" init my-shell
node "$KIT/author.mjs" check my-shell
node "$KIT/author.mjs" preview my-shell
```

Edit the manifest and HTML pages. The preview updates while you work. The kit includes a complete authoring reference in `SKILL.md`. In a second terminal run `node .tools/logishell-shell/check.mjs my-shell --live` to open the tools at phone width if Chrome is installed.

In the preview add “Review the brief” in Inbox and click Review. Go back, add a second task and open Review again. Both tasks should appear. Reload, then open the same link in a fresh browser profile. The first profile keeps both tasks and the fresh profile starts empty.

## Connect your own tools

Edit `logishell.json` to name the project and its tools. Each tool has an ID and either a local HTML `page` or an external `url`. List tool IDs in `shells[0].tools` in rail order and choose the first view with `home`. Keep the project and tool IDs stable across updates.

| Web API | How to use it |
| --- | --- |
| `localStorage.setItem('items', JSON.stringify(tasks))` | Write from a page in the project. Read on open with `JSON.parse(localStorage.getItem('items') ?? '[]')`. |
| `window.addEventListener('storage', render)` | In another open page of that project, read the value again and redraw. The writer redraws after its own edit. |
| `await window.logishell.hello()` | Inspect the host context, including project and web mode. |
| `await window.logishell.tools.open('my-shell.review')` | Open a tool already included in this shell. Substitute the actual project and tool IDs. |
| `await window.logishell.id.whoami()` | Check sign-in for optional account features. The host holds the token. |

Storage belongs to a source project in this browser profile. Bringing in a tool from another project keeps that project's own storage. An external URL opens a web page and keeps that site's data separate. Clearing the site's data removes local entries.

## For a coding agent

Ask what the person needs to finish and which record they currently copy between tools. Build the smallest useful pair around that record. Show entry, switching, editing, reopening and an empty second profile. Give the owner the preview and the result of the live check. Publish to their chosen repository after approval.

## Publish and verify

Use a public GitHub repository the owner has approved for this shell. Put the manifest in its root and its tool pages and assets at the paths it declares. Review the files and push them to the default branch. Keep the toolkit, credentials, and personal notes out of that repository.

For the starter, in an empty checkout of the approved public repository:

```sh
cp /path/to/my-shell/logishell.json /path/to/my-shell/tool.html /path/to/my-shell/review.html .
git add -- logishell.json tool.html review.html
git diff --cached
git commit -m "Publish my shell"
git push origin HEAD
```

For a larger shell, include its referenced pages and assets in the commit. Follow the repository's review process if its default branch is protected. The host reads the public default branch directly; readers need only the link.

Replace OWNER/REPO below with the destination. The command only reads public pages. It checks the public manifest and each declared HTML tool against the local source, then prints the working frame link.

```sh
node .tools/logishell-shell/share-link.mjs my-shell OWNER/REPO
```

Visitors open `https://shell.lsh.dev/s/OWNER/REPO`. The same address serves updates from the default branch after the host cache refreshes. Visitors keep their own entries in their browser. Only the published shell files are shared.

To run the same host on your domain, use the Backbone web Worker and assets. From a Backbone checkout, run `node web/build.mjs`, copy `web/wrangler.jsonc` to `web/wrangler.mine.jsonc`, and set a unique Worker name and your own custom domain in the copy. Deploy to your Cloudflare account with `npx wrangler deploy --config web/wrangler.mine.jsonc`. Set `LOGISHELL_WEB=https://your-domain.example` when running `share-link.mjs`. The public read path uses the same sandboxed tool frames and public repositories. Local Claude connection is specific to the official host.
