# Local subscription: Shiitake with your Claude or ChatGPT plan

Goal: install the `fungi` command and reach the sign-in boundary for the
person's own Claude or ChatGPT subscription. The person finishes the sign-in;
you do not. Human version: https://docs.fungi.computer/install/

## Before you start

- Linux x64/arm64 (glibc 2.35+) or macOS 13.5+ (Apple Silicon or Intel).
  Windows and Alpine Linux are not supported.
- Node 22.13 or newer, with npm optional dependencies enabled.

```sh
node --version
npm --version
```

Expected: `v22.13.0` or newer (any v24 is fine), then an npm version.

## 1. Install

```sh
npm i -g @fungi.computer/spore
```

Expected: npm prints `added N packages` and exits 0. No sign-in is needed.

If it fails:

- `EACCES` on a global install: ask the person where npm's global prefix should
  be, or use a user prefix (`npm config set prefix ~/.npm-global`) and add its
  `bin` to PATH. Do not use sudo without asking.
- Native runtime missing later: ```sh
npm install -g @fungi.computer/spore --include=optional
```

## 2. Verify the install

```sh
fungi --version
fungi doctor
```

Expected: `fungi X.Y.Z` (release 0.45.2 ships Spore
0.14.9 or newer). `fungi doctor` prints the platform, a PASS for
connectivity and version, and **SETUP** lines for the optional saved login and
models. SETUP is normal before sign-in. **FAIL** means a check failed: follow
that line's recovery advice before continuing. Doctor never sends a model request.

If it fails:

- `fungi: command not found`: npm's global bin directory is not on PATH. Run
  `npm prefix -g`, add its `bin` directory to PATH, open a new shell.
- A platform message and exit before any output: the machine is unsupported.
  Tell the person; do not work around it.
- Rosetta/x64 Node on Apple Silicon: install arm64 Node and reinstall.

## 3. Hand the sign-in to the person

Choose the line that matches their plan and ask them to run it in their own
terminal, in the project folder:

```sh
fungi login --provider anthropic --auth-type oauth
fungi login --provider openai --auth-type oauth
```

Expected: the command opens or prints a browser sign-in page. The person signs
in there and returns to the terminal. Plain `fungi` in a project folder does the
same through its first-run model choice.

**This is the login boundary. Stop here and wait for the person.** Do not try to
complete the browser step or read any credential.

## 4. Verify the first win (after the person says they signed in)

Replace `your-project` below with the person's actual project path.

```sh
cd your-project
fungi run "your prompt"
```

Use a harmless prompt such as `fungi run "Reply with the single word ready"`.
Expected: the model's reply appears in the terminal and the command exits 0.
Do not run `fungi stop` automatically: the local service is shared by other
terminal and editor clients. The person can stop it when those clients are done.

If it fails:

- "no model configured": the sign-in did not finish. Ask the person to run
  `fungi` and choose the subscription again.
- A provider rate or plan error: report it; it comes from the person's plan.

## Stop and ask the human when

- a browser sign-in, an email code, a password or a two-factor prompt appears;
- anything asks for payment, a plan upgrade or Team credit;
- a command wants an API key or token that you were not given. Never paste a
  credential into a log, a file in the repository, or a chat message;
- an error is not listed above. Report the exact command and its output.
