friend-assistant 0.1.93 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +618 -606
- package/dist/BUILD.json +2 -2
- package/dist/friend.mjs +3205 -2405
- package/dist/web/assets/{OrgParts-CTM488ZT.js → OrgParts-DtYhfju9.js} +1 -1
- package/dist/web/assets/index-CPN-1vDA.css +1 -0
- package/dist/web/assets/{index-DL_4YDP5.js → index-DRRCYTxW.js} +72 -72
- package/dist/web/assets/{jarvis-ui-Csg1Py5-.js → jarvis-ui-ChlNDG8W.js} +1 -1
- package/dist/web/assets/jarvisTree-CUR60kDk.js +1 -0
- package/dist/web/assets/{ort.bundle.min-CCWhq81g.js → ort.bundle.min-BzdZM8HK.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +2 -1
- package/dist/web/assets/index-ZE-6KsBh.css +0 -1
- package/dist/web/assets/jarvisTree-BdDS6ikq.js +0 -1
package/README.md
CHANGED
|
@@ -1,606 +1,618 @@
|
|
|
1
|
-
# Friend
|
|
2
|
-
|
|
3
|
-
A self-hosted personal AI assistant. It runs on your PC, talks to you from any screen over WebSocket, uses tools on your machine with risk-based approvals, and controls a full-screen sci-fi "stage" itself.
|
|
4
|
-
|
|
5
|
-
Phase 1: secure login, agent loop with Claude, CLI device node, approvals with PIN, and a minimal stage with a particle-sphere presence. Phase 2a: chart, gauge, timeline and graph objects, automatic layout, fade-out, orb and ring voice styles and mood intensity. Phase 5a: local voice. Hold Space and speak; Friend answers aloud. Phase 5b: only your voice commands it. Phase 2b: the agent can look through your camera, one approved picture at a time. Also built: memory (notes it keeps about you), tasks and reminders with a heartbeat, free-form pages in an isolated frame, a Docker code sandbox, and a plugin store. Models: Claude, or a local model through Ollama. See `docs/superpowers/specs` and `docs/superpowers/plans`.
|
|
6
|
-
|
|
7
|
-
## Install (npm)
|
|
8
|
-
|
|
9
|
-
Needs only **Node.js 20 or newer**. Everything else is checked, and offered, by the setup wizard.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g friend-assistant
|
|
13
|
-
friend onboard
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
(or without installing: `npx friend-assistant onboard`)
|
|
17
|
-
|
|
18
|
-
`friend onboard` is a guided setup, one step at a time. Press Enter to take the suggestion at any question; run it again and it carries on where it stopped.
|
|
19
|
-
|
|
20
|
-
1. **Welcome**: what is about to happen.
|
|
21
|
-
2. **What you want to use**: pick any of: Claude through your subscription (Claude Code), Claude with an API key, a model on this PC (Ollama), voice, safe code running (built in, nothing to install).
|
|
22
|
-
3. **What this PC needs**: it checks Node.js, plus only what your choices need: Python (voice), Ollama, Claude Code, and whether the port is free. Docker is optional and is not asked for. For each missing one it shows the exact command (`winget` on Windows, `brew` on a Mac, `apt` on Linux, `npm` for Claude Code), asks **before** installing, runs it one by one with the output visible, and checks again. If a program was installed but this terminal cannot see it yet, it tells you to open a new terminal and run `friend onboard` again.
|
|
23
|
-
4. **Your account**: password and PIN (each typed twice) and the assistant's name.
|
|
24
|
-
5. **How Friend thinks**: signs in to Claude if needed (`claude auth login`), asks for an API key, or downloads the local model, and sets the safety net (the local model behind Claude).
|
|
25
|
-
6. **Voice**: a female or male voice, then the speech models (about 250 MB).
|
|
26
|
-
7. **Your workspace folder**, 8. **Who can open Friend** (only this PC, or your network, and the port), 9. **How it looks** (a theme), 10. **Finish**: a summary, and it can start Friend and open the browser.
|
|
27
|
-
|
|
28
|
-
Handy options: `friend onboard --no-install` (never installs anything, only tells you what to do), `--yes` (take every suggestion), `--redo <step>` (run one step again, for example `--redo look`), `--reset` (start from the beginning). `friend doctor` shows what this PC has and how to fix what is missing, and changes nothing. Progress is kept in `onboarding.json` in the data folder; it never contains a password, PIN or key.
|
|
29
|
-
|
|
30
|
-
If `npm install` fails on `better-sqlite3` (it builds a small native part when no ready-made one fits your system), install the compiler tools it names (on Windows: the "Desktop development with C++" part of Visual Studio Build Tools) and run it again.
|
|
31
|
-
|
|
32
|
-
## Command reference
|
|
33
|
-
|
|
34
|
-
Every command starts with `friend`. If you run Friend from the source code, write `pnpm friend ...` instead. `friend` on its own prints the short list. Most things can also be done inside the app (press Esc, then Settings), and a few have their own commands there (see "Commands inside the app" below).
|
|
35
|
-
|
|
36
|
-
### Set up and check
|
|
37
|
-
|
|
38
|
-
| Command | What it does | Use it when |
|
|
39
|
-
|---|---|---|
|
|
40
|
-
| `friend onboard` | The guided setup in ten steps: asks what you want to use, checks this PC, offers to install what is missing (asking first), creates your account, then the model, voice, workspace, network and look. | The first time, or to finish something you skipped. It is safe to run again: it carries on where it stopped. |
|
|
41
|
-
| `friend onboard --no-install` | The same, but never installs anything; it only tells you what to install. | You manage software yourself, or this is a work PC. |
|
|
42
|
-
| `friend onboard --yes` | Takes every suggestion without asking (passwords and keys are still asked). | You want the defaults quickly. |
|
|
43
|
-
| `friend onboard --redo <step>` | Runs one step again. Steps: welcome, features, prereqs, account, model, voice, workspace, network, look, finish. | You want to change one thing, for example `friend onboard --redo look` or `--redo network`. |
|
|
44
|
-
| `friend onboard --reset` | Forgets what the wizard has done so far and starts over. Your account and settings stay. | The wizard's memory of its steps is wrong. |
|
|
45
|
-
| `friend doctor` | Shows what this PC has (Node.js, Python, Docker (optional), Ollama, Claude Code, the port) and the exact command to fix what is missing. Changes nothing. | Something does not work, or before asking for help. |
|
|
46
|
-
| `friend setup` | Only creates the owner account: password, PIN, assistant name, workspace folder, API key, voice. | You want the plain version without the wizard. |
|
|
47
|
-
| `friend status` | Prints the saved settings: data folder, owner, address, public URL, workspace, model, whether an API key is set. | A quick look at how Friend is set up. |
|
|
48
|
-
| `friend version` | Prints the version. | Reporting a problem, or checking an update. |
|
|
49
|
-
|
|
50
|
-
### Run Friend and other PCs
|
|
51
|
-
|
|
52
|
-
| Command | What it does | Use it when |
|
|
53
|
-
|---|---|---|
|
|
54
|
-
| `friend start` | Starts Friend: the web app, the assistant, the speech engine if installed, and your connectors. Prints the address (and your network address when that is on). Ctrl+C stops it. Friend's screen works in one browser window at a time: open it in a second place and that window shows "Use here", which moves Friend there and stops the first. | Every day. Open the address in a browser and sign in. |
|
|
55
|
-
| `friend pair` | Prints a one-time pairing code, valid for 5 minutes, and the command to run on the other PC. | You want Friend to also work on a second PC. |
|
|
56
|
-
| `friend node --url ws://HOST:8787/device --code CODE` | Run on the other PC: connects it to your Friend. Add `--roots C:/work,D:/files` for the folders it may use freely and `--name laptop` to name it. | The second step after `friend pair`. |
|
|
57
|
-
| `friend devices list` | Lists the paired PCs and when each was last seen. | Checking what is connected. |
|
|
58
|
-
| `friend devices revoke <id>` | Cuts a paired PC off at once. | A PC is lost, sold or no longer yours. |
|
|
59
|
-
|
|
60
|
-
### Choose the model
|
|
61
|
-
|
|
62
|
-
| Command | What it does | Use it when |
|
|
63
|
-
|---|---|---|
|
|
64
|
-
| `friend claude status` | Shows whether Claude Code is installed and signed in, and the model and fallback in use. | Checking the Claude subscription route. |
|
|
65
|
-
| `friend claude setup` | Checks that Claude Code is installed and signed in, and tells you what to fix. | You have a Claude plan and want to use it. |
|
|
66
|
-
| `friend claude setup --use` | The same, and switches Friend to your Claude subscription (restart `friend start`). | You want Friend to answer through your plan, with no API key. |
|
|
67
|
-
| `friend ollama status` | Shows whether Ollama is running, which models are installed, and which one Friend uses. | Checking the local model. |
|
|
68
|
-
| `friend ollama setup [model]` | Starts Ollama if needed (in Docker when it is not installed), then downloads the model (default qwen2.5:7b). | You want a free, private model on this PC. |
|
|
69
|
-
| `friend ollama setup [model] --use` | The same, and switches Friend to it. | Make the local model the main one. |
|
|
70
|
-
| `friend config set provider claude` | Chooses the model by hand: `claude` (API key), `claude-code` (your subscription) or `ollama` (this PC). | You prefer a command to the Settings screen. |
|
|
71
|
-
| `friend config set apiKey <key>` | Saves an Anthropic API key. | You use the API route. |
|
|
72
|
-
|
|
73
|
-
### Voice
|
|
74
|
-
|
|
75
|
-
| Command | What it does | Use it when |
|
|
76
|
-
|---|---|---|
|
|
77
|
-
| `friend voice setup` | Installs speech (a private Python environment, Whisper for listening, Piper for speaking), asks which voice you want (female or male) and downloads about 250 MB. | You want to talk to Friend and hear it. |
|
|
78
|
-
| `friend voice setup --female` | The same without the question: the first female voice (Amy). `--male` gives Ryan. | You know which kind you want. |
|
|
79
|
-
| `friend voice setup --voice jenny` | The same with a voice by name or by its number in the list (`--voice 4`), or any other Piper voice name such as `hi_IN-pratham-medium`. | You want a specific voice. |
|
|
80
|
-
| `friend voice list` | Shows the twelve voices (six female, six male), numbered, with the current one marked. | Choosing a voice. |
|
|
81
|
-
| `friend voice status` | Shows whether speech is installed, which models it uses, and whether your own voice is enrolled. | Voice does not work, or you want to check. |
|
|
82
|
-
| `friend voice forget` | Deletes your saved voice (asks for your PIN). Afterwards every voice is treated as yours until you enrol again. | You want to re-enrol, or switch recognition off. |
|
|
83
|
-
|
|
84
|
-
### Network and port
|
|
85
|
-
|
|
86
|
-
| Command | What it does | Use it when |
|
|
87
|
-
|---|---|---|
|
|
88
|
-
| `friend password` | Sets a new sign-in password (asks twice, nothing is shown while you type). The old one is not needed, because you are at this PC, so it is also the way back in if you forgot it. Every browser and phone is signed out. | You forgot the password, or want a new one. From the screen: Esc → Settings → Security. |
|
|
89
|
-
| `friend pin` | Sets a new PIN, the number Friend asks for before risky actions. | You forgot the PIN, or want a new one. |
|
|
90
|
-
| `friend daemon start` | Runs Friend in the background, with no terminal window needed. Prints the address, keeps a log in the data folder (`friend.log`). | You want Friend always available, even after you close the terminal. |
|
|
91
|
-
| `friend daemon stop` | Stops the background Friend and the speech engine with it. | Shutting it down. |
|
|
92
|
-
| `friend daemon restart` | Stops it and starts it again. | After changing a setting such as `friend lan on` or a different model. |
|
|
93
|
-
| `friend daemon status` | Says whether the background Friend is running, for how long, and at which address. Exit code 0 when running, 1 when not. | Checking, or in a script. |
|
|
94
|
-
| `friend upgrade` | Updates Friend in one go: checks npm for the newest version, stops the background Friend, installs it, and starts it again. Add `--force` to reinstall the same version. If Friend runs in a terminal instead, it asks you to press Ctrl+C there first. (`--auto` is what Friend itself runs to update itself; it writes what happened to `update.log` in the data folder.) | A new version is out. |
|
|
95
|
-
| `friend usage [--days N]` / `clear` | Shows the tokens Friend used, day by day (default 7 days), split by model and by where the request came from (voice, chat, scheduled tasks, messages). Only numbers are kept, never what was said; `clear` removes the saved counts. Counts older than a year go by themselves. | You want to see how much of your plan Friend is using. (Settings → Usage shows the same.) |
|
|
96
|
-
| `friend audit list [--since 2h] [--who ...] [--group ...] [--result ...] [--q text]` | Lists what you, your assistant and your workers did, newest first, with filters. Asks for your PIN and gives it to the running Friend (from this PC only). | You want to see what happened, for example `friend audit list --since 1d --who "Dev (be8d8dca)"`. |
|
|
97
|
-
| `friend audit show <request-id>` | Prints everything one request caused, in order: your request, the tool calls, the approvals, the workers' actions. | You found an entry and want its whole story. |
|
|
98
|
-
| `friend audit verify [--seal "..."]` | Checks that the log has not been changed (every entry is chained to the one before). With `--seal` it checks one of the daily seals sent to your phone. | Something looks wrong, or you want to be sure. |
|
|
99
|
-
| `friend audit export --format json\|csv\|html [--since 7d]` | Saves a report in the current folder (JSON with the chain fields, CSV, or a printable HTML page). It contains private content. | You want to keep or hand over a record. |
|
|
100
|
-
| `friend audit seal` | Prints the current seal: a one-line fingerprint of the log so far (also sent to your phone once a day). | You want to note the log's state yourself. |
|
|
101
|
-
| `friend autostart on` / `off` / `status` | Starts Friend by itself in the background when you sign in to this computer, so you never start it by hand after a restart. Windows: a hidden entry in your sign-in list; macOS: a launch agent; Linux: a user service (or an autostart entry when there is no user systemd). Only your own account's files are touched. `on` can be undone with `off`. | You want Friend always there after a restart. (Settings → Startup and updates does the same.) |
|
|
102
|
-
| `friend lan` (or `friend lan status`) | Shows what Friend listens on and the addresses to open. | Checking, or finding the address for your phone. |
|
|
103
|
-
| `friend lan on` | Lets other devices on your network open Friend. Prints the addresses and the things to know (plain http, no microphone on other devices, firewall prompt). | Using Friend from a phone or another PC. |
|
|
104
|
-
| `friend lan on --https` | The same, with a secure `https://` address (Friend makes its own certificate), so a phone may use the microphone and camera. | Talking to Friend from a phone. |
|
|
105
|
-
| `friend lan https on` (or `off`) | Turns the secure address on or off by itself. | You already ran `friend lan on`, or want plain http back. |
|
|
106
|
-
| `friend lan on --port 9100` | The same on another port. | Port 8787 is taken. |
|
|
107
|
-
| `friend lan port 9100` | Changes only the port. | Another program uses 8787. |
|
|
108
|
-
| `friend lan off` | Back to this PC only. | Closing it again. |
|
|
109
|
-
|
|
110
|
-
Restart `friend start` after any of these.
|
|
111
|
-
|
|
112
|
-
### Your data and what Friend may do
|
|
113
|
-
|
|
114
|
-
| Command | What it does | Use it when |
|
|
115
|
-
|---|---|---|
|
|
116
|
-
| `friend memory list` | Shows the tree of notes Friend keeps about you, folder by folder (the older flat list if the tree is not there yet). | Seeing what it remembers. |
|
|
117
|
-
| `friend memory show <path>` | Prints one note, or a folder's index (for example `family/priya.md` or `family`). | Reading what it wrote. |
|
|
118
|
-
| `friend memory forget <path or number>` | Deletes one note, a whole folder (by path), or an older numbered note. | A note is wrong or private. |
|
|
119
|
-
| `friend memory clear` | Deletes all notes (asks for your PIN). | Starting fresh. |
|
|
120
|
-
| `friend rules list` | Lists the "always allow" rules you created by choosing *Always allow* on an approval card. | Reviewing what Friend may do without asking. |
|
|
121
|
-
| `friend rules remove <id>` | Removes a rule, so Friend asks again. | You trust something less now. |
|
|
122
|
-
|
|
123
|
-
### Plugins
|
|
124
|
-
|
|
125
|
-
**Day trader (India)** is a bundled plugin with ten skills (focus list, scan for setups, news, entry, exit, budget, risk, replay, analyst, smart money). Ask "what should I trade today" and Friend scans the market (the most active stocks, volume spurts and the biggest F&O movers), checks the news, simulates each setup and gives a ranked focus list with entry, stop, target and odds and an exact sizing tool (`trade-plan`). It reads Indian market data through three built-in tools, `market.get` (candles, quotes, NSE announcements, results, insider trades, bulk and block deals, shareholding, top movers, most active, volume spurts), `market.scan` (finds opening-range breakouts and bounces across the market and ranks them) and `market.replay` (replays the rest of the session from the stock's own recent candles). Both use free public feeds (Yahoo Finance and the NSE, no key), follow the Web switch, and work in IST and rupees. Your limits (max loss, money, leverage) are asked each session, never assumed. It is analysis only: it never places an order, you place it in your broker app.
|
|
126
|
-
|
|
127
|
-
| Command | What it does | Use it when |
|
|
128
|
-
|---|---|---|
|
|
129
|
-
| `friend plugin catalog` | Lists the plugins that come with Friend. | Looking for something to add. |
|
|
130
|
-
| `friend plugin list` | Lists the installed plugins and whether each is on. | Checking what is installed. |
|
|
131
|
-
| `friend plugin install <name or folder>` | Shows exactly what a plugin contains and asks before installing (add `--yes` to skip the question). A folder path installs your own plugin. | Adding a skill or a sandboxed tool. |
|
|
132
|
-
| `friend plugin enable <id>` and `friend plugin disable <id>` | Switches a plugin on or off without removing it. | Pausing a plugin. |
|
|
133
|
-
| `friend plugin remove <id>` | Deletes a plugin. | You no longer want it. |
|
|
134
|
-
|
|
135
|
-
Connectors (Gmail, Chrome control, any MCP service) are managed inside the app, not on the command line: Esc, then Connectors, or `/connectors`.
|
|
136
|
-
|
|
137
|
-
### Settings by command
|
|
138
|
-
|
|
139
|
-
`friend config set <key> <value>` changes one setting; `friend config keys` prints the list with a line about each. Anything on the Settings screen can be changed there instead, with the same effect. The keys:
|
|
140
|
-
|
|
141
|
-
| Key | What it is |
|
|
142
|
-
|---|---|
|
|
143
|
-
| `provider` | Which model answers: `claude` (API key), `claude-code` (your subscription), `ollama` (this PC) or `openai` (any OpenAI-compatible server, such as OmniRoute). |
|
|
144
|
-
| `approvals` | How much Friend asks before acting: `manual` (asks every time, the default), `edits` (file work and the sandboxed code runner go ahead) or `auto` (commands and tools go ahead too). Risky commands (they need your PIN), the camera (unless you switched the eye on and are talking at the screen, see "The eye"), adding connectors or plugins, and Friend's own data folder always ask, in every mode. The AI cannot change this. Easier: Esc → Settings → Approvals. |
|
|
145
|
-
| `ownerName` | Your name, shown on the profile badge (a shield in the corner) while you are signed in; it shows whoever Friend just recognized when they speak. Empty shows "Owner". |
|
|
146
|
-
| `apiKey`, `model` | The Anthropic API key and the Claude model used with it. |
|
|
147
|
-
| `claudeCode.model`, `claudeCode.command`, `claudeCode.fallback` | The subscription route: model (`sonnet`, `haiku`, `opus`), the command that starts Claude Code, and `ollama` or `none` for what to use when Claude is unavailable. |
|
|
148
|
-
| `claudeCode.webSearch` | With Claude Code, lets Claude search the web with its own WebSearch tool (on by default), so questions about today (prices, news, scores) are answered from what it finds, with the source, instead of from memory. Only searching: Claude gets no other built-in tool, and a guest never gets it. Off: Claude answers from memory only. |
|
|
149
|
-
| `web.enabled` | Gives every model the tools `web.search` (a list of results) and `web.read` (the text of one page) so it can answer about today (prices, news, scores) from the web instead of from memory. They run on this PC with no browser. A page can never give Friend orders, and Friend will not open addresses on this PC or your network. Off: neither tool exists. |
|
|
150
|
-
| `web.provider` | Where `web.search` asks: `duckduckgo` (default, free, no key), `brave` or `tavily` (your own key), or `searxng` (your own server). If the chosen source cannot answer, Friend tries DuckDuckGo once and says so. |
|
|
151
|
-
| `web.searxngUrl` | The address of your own SearXNG server (http or https, no login in it), used when `web.provider` is `searxng`. It must allow the JSON format. |
|
|
152
|
-
| `web.braveKey`, `web.tavilyKey` | Your keys for Brave Search and Tavily. Write-only: never shown again, and an empty box leaves the saved key alone. Only the owner can change them, on the Settings screen. |
|
|
153
|
-
| `ollama.url`, `ollama.model`, `ollama.vision`, `ollama.contextTokens` | The local model: server address, model name, whether it can see pictures, and how much it remembers at once. |
|
|
154
|
-
| `openai.url`, `openai.model`, `openai.apiKey`, `openai.vision` | An OpenAI-compatible server: its address (ending in `/v1`), the model name it knows, its API key (or empty), and whether the model can see pictures. For OmniRoute (https://github.com/diegosouzapw/OmniRoute) run `npm install -g omniroute` and `omniroute`, then `friend config set provider openai` (the defaults are OmniRoute's: `http://localhost:20128/v1` and model `auto`). Also works with LM Studio, LiteLLM, vLLM and OpenRouter. |
|
|
155
|
-
| `voice.hindiVoice`, `voice.marathiVoice` | The voices that read Hindi and Marathi (Devanagari) text: `hi_IN-priyamvada-medium`, `hi_IN-pratham-medium`, `hi_IN-rohan-medium`, `mr_IN-google-medium`. Empty makes the main voice read that language. See "Hindi, Marathi and English together". |
|
|
156
|
-
| `updates.auto` | Look for a newer Friend shortly after it starts and every few hours, and install it by itself while Friend is not busy (only a Friend running in the background restarts itself). Off: Friend only tells you a new version is out, and you run `friend upgrade` or press Update now in Settings → Startup. |
|
|
157
|
-
| `session.autoCompact` | With Claude Code, Friend keeps one long conversation and re-reads all of it for every answer. On (default): when it grows past `session.compactAtTokens`, Friend writes short notes on it and starts a fresh conversation from them before the next answer. Off: it only tidies when you press Tidy up now. |
|
|
158
|
-
| `session.compactAtTokens` | How big the conversation may grow before it is tidied up by itself, in tokens (50000 to 800000, default 100000). A fresh conversation already starts near 36000. |
|
|
159
|
-
| `voice.enabled`, `voice.sttModel`, `voice.ttsVoice`, `voice.language`, `voice.speakTyped`, `voice.duck`, `voice.duckPercent`, `voice.accept`, `voice.challenge` | Speech on or off, the listening model, the speaking voice, a forced language, speaking typed replies, turning music and video down while you talk and while Friend speaks (and how far, in percent), and the two thresholds for recognising your voice. |
|
|
160
|
-
| `eye.autoOffMinutes` | Minutes until the camera eye switches itself off (0 to 1440, default 120; 0 means only when you switch it off). The eye itself (Friend looks through the camera without asking each time, only when you talk to it at the screen) is switched on, with your PIN, in Esc → Settings → Approvals, and is always off after a restart or sign-out. |
|
|
161
|
-
| `codeRunner` | Where the code the assistant writes runs: `auto` (the default: Docker when it is installed and running, otherwise the sandbox built into Friend), `sandbox` (always the built-in one, nothing to install) or `docker` (always Docker). Easier: Esc → Settings → Approvals. Changing it needs your PIN. |
|
|
162
|
-
| `phoneApprovals.enabled`, `phoneApprovals.channel`, `phoneApprovals.delaySec`, `phoneApprovals.buttons`, `phoneApprovals.allowRisky`, `phoneApprovals.batchSec` | Approving from your phone when you are away from the screen: on or off, which linked app is asked (`auto`, `telegram`, `whatsapp`), how many seconds to wait for the screen first (0 to 110), Telegram Allow / Deny buttons, whether the camera and the Office's requests may also be answered there, and how many seconds (0 to 30) questions that pile up are gathered into one message. See `docs/guides/phone-approvals.md`. |
|
|
163
|
-
| `audit.keepDays`, `audit.archive`, `audit.sealAt`, `audit.unlockMinutes` | The audit trail: days kept before older entries are archived and removed (90; 0 keeps everything), whether a verifiable archive is kept, the time the daily seal goes to your phone (09:00; empty turns it off), and how many minutes the audit screen stays open after your PIN (10). |
|
|
164
|
-
| `bind`, `port` | Where Friend listens (easier: `friend lan`). |
|
|
165
|
-
| `https` | `true` serves a secure `https://` address with a certificate Friend makes for itself, so a phone may use the microphone (easier: `friend lan https on`). |
|
|
166
|
-
| `publicUrl`, `allowedOrigins`, `allowedHosts`, `trustProxy` | For running behind your own domain or reverse proxy (see "Using your own domain later"). |
|
|
167
|
-
| `roots` | The workspace folders Friend may use freely, separated by commas. |
|
|
168
|
-
|
|
169
|
-
Example: `friend config set voice.speakTyped false` keeps typed messages silent.
|
|
170
|
-
|
|
171
|
-
### Environment variables
|
|
172
|
-
|
|
173
|
-
| Variable | Meaning |
|
|
174
|
-
|---|---|
|
|
175
|
-
| `FRIEND_HOME` | The folder where Friend keeps its data (default: `.friend` in your home folder). Use another folder to keep a separate test copy. |
|
|
176
|
-
| `FRIEND_DAEMON` | Set to `1` by `friend daemon start` for the Friend it starts in the background. Only a background Friend may restart itself to install an update; one running in a terminal never does. You do not set it yourself. |
|
|
177
|
-
| `FRIEND_SECRET_KEY` | A passphrase to lock the saved keys, tokens and passwords with, instead of the `secret.key` file Friend makes in its data folder. Keys in `config.json` are always stored encrypted (on every system); with this set, the unlocking key is not on the disk at all. Set the same value on every start; if it is lost, those keys must be entered again. |
|
|
178
|
-
| `FRIEND_ANTHROPIC_KEY` | An API key to use when none is saved. |
|
|
179
|
-
| `FRIEND_PYTHON` | The Python program to use for voice, if the usual ones are not the right version. |
|
|
180
|
-
| `FRIEND_WEB_DIR`, `FRIEND_PLUGIN_CATALOG`, `FRIEND_VOICE_DIR`, `FRIEND_CHROME_CONTROL` | Where the web app, the bundled plugins, the Python voice code and the Chrome control program (its `index.js`) are, for unusual installs. |
|
|
181
|
-
| `CHROME_BRIDGE_PORT`, `CHROME_BRIDGE_HTTP_PORT` | Where Chrome control itself listens on this PC (its extension port, default 8765, and its MCP port, default 8766). Friend reaches both for you: other PCs only need Friend's own address. |
|
|
182
|
-
| `FRIEND_DEMO_PORT` | The port `pnpm demo` listens on (default 8788). |
|
|
183
|
-
|
|
184
|
-
### From the source code
|
|
185
|
-
|
|
186
|
-
| Command | What it does |
|
|
187
|
-
|---|---|
|
|
188
|
-
| `pnpm friend ...` | Runs any command above from the repository. |
|
|
189
|
-
| `pnpm demo` | A scripted demo with no network and no key; open the printed address. |
|
|
190
|
-
| `pnpm test`, `pnpm typecheck`, `pnpm build` | The checks and the web build. |
|
|
191
|
-
| `pnpm package` | Builds the npm package in `packages/friend` (then `npm publish` from there). |
|
|
192
|
-
|
|
193
|
-
### Commands inside the app
|
|
194
|
-
|
|
195
|
-
Type `/` in the message bar for a list that narrows as you type; they run on the screen and never go to the AI. `/help` opens the same list with a line about each.
|
|
196
|
-
|
|
197
|
-
| Command | What it does |
|
|
198
|
-
|---|---|
|
|
199
|
-
| `/settings` | Opens the settings. |
|
|
200
|
-
| `/look` | Opens the settings on the voice presence tab (themes, colour, size, captions). |
|
|
201
|
-
| `/view minimal`, `/view companion`, `/view workspace` | Chooses how much is on the screen besides the AI's pictures. |
|
|
202
|
-
| `/chat`, `/tasks` | Shows or hides the conversation and the schedule (add `on` or `off`). |
|
|
203
|
-
| `/layout reset` | Puts every panel back where it started. |
|
|
204
|
-
| `/connectors` | Opens the connectors (Gmail, Chrome control, any MCP service). |
|
|
205
|
-
| `/plugins` | Opens the plugins. |
|
|
206
|
-
| `/voice` | Opens voice enrolment. |
|
|
207
|
-
| `/camera on`, `/camera off` | Switches the camera. It only takes a picture when you approve. |
|
|
208
|
-
| `/mute`, `/unmute` | Hides or shows everything on the stage. Remembered on this device. |
|
|
209
|
-
| `/quiet`, `/speak` | Stops Friend speaking aloud (it still writes its answers, so you read the captions and the chat), or lets it speak again. Instant, no restart, remembered on this device. |
|
|
210
|
-
| `/clear` | Takes everything off the screen. |
|
|
211
|
-
| `/status` | Says what Friend is doing right now. |
|
|
212
|
-
| `/logout` | Signs out on this screen. |
|
|
213
|
-
| `/lock` | Emergency lock: ends every session and stops the agent. |
|
|
214
|
-
| `/help` | Lists the commands. |
|
|
215
|
-
|
|
216
|
-
## Quick start (from the source code)
|
|
217
|
-
|
|
218
|
-
```bash
|
|
219
|
-
pnpm install
|
|
220
|
-
pnpm build # builds the web client
|
|
221
|
-
pnpm friend setup # password, PIN, assistant name, workspace folder, API key
|
|
222
|
-
pnpm friend start # gateway + local device node, http://127.0.0.1:8787
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
Sign-in is guarded against guessing: after **three wrong passwords** (or PINs) from one address, that address is locked for a minute, and every wrong try after that doubles the wait (up to an hour). The sign-in screen shows the tries left and a countdown, and even the right password waits out a lock. Many addresses together are limited too. A refresh never shows any part of the home screen before sign-in: the page asks the server first and draws only the sign-in screen until you are in.
|
|
226
|
-
|
|
227
|
-
Open the address in a browser, sign in, and press any key to talk. Press `Esc` (or long-press the top-left corner) for the owner menu: voice on/off, mute stage, log out, emergency lock.
|
|
228
|
-
|
|
229
|
-
Preview the whole look with no API key and no network: `pnpm build && pnpm demo`, then open the printed address. Each message you send shows the next scene (gauges and charts, a timeline, a graph, the orb and ring voice styles, a warm mood).
|
|
230
|
-
|
|
231
|
-
Other commands: `friend rules list|remove <id>`, `friend devices list|revoke <id>`, `friend status`, `friend config set <key> <value>`, `friend pair` (code to connect another PC), `friend node --url <ws-url> --code <code>`.
|
|
232
|
-
|
|
233
|
-
## Use your Claude subscription (Claude Code)
|
|
234
|
-
|
|
235
|
-
Instead of an API key you can let Friend think through the Claude Code app you already have signed in with your Claude plan. To the rest of Friend it is just another model: same tools, same approvals, same screen. Nothing else changes.
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
claude # once: sign in with your Claude account (if you have not already)
|
|
239
|
-
pnpm friend claude setup --use # checks it works and switches Friend over; restart `friend start`
|
|
240
|
-
pnpm friend claude status
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
- One Claude Code process stays running, so replies start in about a second after the first message (a fresh start takes 3 to 9 seconds). Friend's conversation is remembered across restarts.
|
|
244
|
-
- Claude Code has no tools of its own here. Friend's tools reach it through a private local bridge (127.0.0.1, random token), and every call still goes through Friend's own approval and PIN rules and audit log.
|
|
245
|
-
- Unrecognized voices (guests) get a separate, tool-less, nothing-saved session.
|
|
246
|
-
- If your plan's usage limit runs out, Claude Code is signed out or missing, Friend answers with the local Ollama model and tells you once on screen (`friend config set claudeCode.fallback none` to see errors instead). Other settings: `claudeCode.model` (default sonnet), `claudeCode.command`.
|
|
247
|
-
- Caveats: it uses your plan's limits; using a subscription this way is a grey area in Anthropic's terms, so treat it as experimental; if Friend answered through the fallback, Claude does not know about that exchange.
|
|
248
|
-
- Opt-in live test against the real CLI: `FRIEND_LIVE_CLAUDE=1 pnpm exec vitest run packages/server/src/provider/claude-code/live.test.ts`.
|
|
249
|
-
|
|
250
|
-
## Connectors (Gmail, Chrome control, any MCP service)
|
|
251
|
-
|
|
252
|
-
A connector gives Friend the tools of an outside program or service through the MCP standard. Open **Esc, then Connectors** (or type `/connectors`). Ready-made entries:
|
|
253
|
-
|
|
254
|
-
- **Chrome control** is a plugin that comes with Friend, so there is nothing else to install (no npm package, no `claude mcp add`). Open **Plugins**, install **Chrome control** (PIN), and Friend sets it up by itself from the copy inside it: the small helper Chrome needs and the extension folder. The one step only you can do is loading that folder in Chrome (chrome://extensions, Developer mode, Load unpacked; Configure shows the folder with a Copy button) and switching the extension on from its icon. Then switch the plugin on (PIN); Friend connects, and the plugin page shows whether the extension is linked. Every browser action still asks for your approval. Removing the plugin only removes Friend's connection; the helper and the extension stay, because other programs on your PC may use them. See [docs/guides/chrome-control.md](docs/guides/chrome-control.md). **From another PC** it needs no extra port: switch on *Allow other PCs* in Configure and Friend serves Chrome control on its own address (`/chrome/mcp` for apps, `/chrome/ws` for the extension), with a download link for the extension and the key shown only after your PIN.
|
|
255
|
-
- **Gmail**: a community Gmail MCP server (`@gongrzhe/server-gmail-autoauth-mcp`). You create the Google OAuth credentials and sign in on Google's own page; **Friend never sees your Google password**. More mail and calendar connectors can be added the same way ("Something else": any program or any server by address).
|
|
256
|
-
|
|
257
|
-
How it is kept safe:
|
|
258
|
-
- **Adding or switching one on needs your PIN**, and the screen shows exactly which program will start (no shell is ever used) or which address it will reach. Plain `http://` is only allowed for a server on this PC.
|
|
259
|
-
- **Every call to a connector's tool asks for your approval** (the usual card; "Always allow" works for the ones you trust). Tools appear to the AI as `mcp.<connector>.<tool>`.
|
|
260
|
-
- **Secrets** (tokens, keys) are typed on the screen only. They are saved in `connectors.json` next to the database (readable only by you) and are never shown again, never put in the AI's context, never in the audit log. The AI cannot supply or change secrets.
|
|
261
|
-
- **What comes back is data, not orders.** The AI is told that email, web pages and documents from a connector are untrusted and that it must never send or delete anything unless you asked for exactly that.
|
|
262
|
-
- A connector that stops working shows why; it is started again on the next use. Friend does not wait for connectors when it starts.
|
|
263
|
-
- Turning one off removes its tools at once. Removing deletes its saved secrets.
|
|
264
|
-
|
|
265
|
-
**The AI can manage connectors too.** Ask it to "connect X", "switch Gmail off", "reload Chrome control" or "remove it". Adding or switching on shows the same PIN card with the exact program; turning off and reloading need nothing; removing asks. Opt-in live check of the real chrome-control: `FRIEND_LIVE_CHROME=1 pnpm exec vitest run packages/server/src/connectors/live.test.ts`.
|
|
266
|
-
|
|
267
|
-
## The AI writes its own skills and plugins
|
|
268
|
-
|
|
269
|
-
When it notices something you repeat, the AI may suggest a **skill** (instructions it loads later) or a **plugin tool** (a small python, node or shell program that runs in the code sandbox: no network, no access to your files, approval on every call). If you agree it calls `plugins.create`: the approval card shows **everything it wrote, untruncated**, and needs your PIN. It is then checked like any plugin, switched on and loaded straight away (`plugins.reload` re-reads everything; the Plugins panel has a **Reload plugins** button too). Creating the same id again installs a newer version. The AI can also list, switch off or on, and delete plugins.
|
|
270
|
-
|
|
271
|
-
## A screen that lays itself out
|
|
272
|
-
|
|
273
|
-
The assistant says what each thing on the screen is for (the main thing, what goes beside it, small values to keep in view, a passing note, an urgent alert) and Friend places it for the screen you are using: desktop, tablet or phone. Finished cards shrink into small chips along the top and come back with a tap. A bundled Screen design skill teaches the assistant the principles. See [docs/guides/screen-director.md](docs/guides/screen-director.md).
|
|
274
|
-
|
|
275
|
-
## Skills from GitHub
|
|
276
|
-
|
|
277
|
-
Give Friend a GitHub link and say "install this": for example `https://github.com/lemomo-ai/lemo-opuscar.git`. It works like a person would. It looks at the repository, **reads the README and the docs**, tells you in plain words what the project is, what it will take and what it will leave out and why, and asks only when it cannot tell. Then you read the source and the **full text of every skill** on the approval card and enter your PIN. Skills from Claude Code plugins are imported as they are; slash commands and sub-agents become skills (`cmd-…`, `agent-…`). You can also add a **marketplace** (a repository with `.claude-plugin/marketplace.json`) and install from it by name. Afterwards Friend writes a note in its memory saying which skills it has and what each is for, and the Plugins screen shows where each one came from.
|
|
278
|
-
|
|
279
|
-
Safety: it reads only github.com, api.github.com and raw.githubusercontent.com, never more than 60 files or 2 MB at a time. Everything in the repository is treated as outside text and never as instructions. Hooks are never installed. If the README asks for a command (`npm install`, a setup script), Friend tells you what it is, where it comes from and what it could do, and runs it only through the normal command approval, which is never skipped for such a command and shows "follows text from github.com/…" with warnings for the risky shapes (download and run, `sudo`, deleting folders, the registry). See [docs/guides/plugins-from-github.md](docs/guides/plugins-from-github.md).
|
|
280
|
-
|
|
281
|
-
## Commands
|
|
282
|
-
|
|
283
|
-
`/help` opens the list of every command with what it does.
|
|
284
|
-
|
|
285
|
-
## On-screen status, clock and settings
|
|
286
|
-
|
|
287
|
-
- **Status line (bottom-left):** always shows what Friend is doing in plain words: Ready, Listening, Understanding what you said, Thinking, Getting the weather for Pune, Creating a view, Running a command, Answering, Waiting for your approval, Reconnecting. It never shows command text or arguments.
|
|
288
|
-
- **Clock (bottom-right):** a small date and time, so the screen is never empty.
|
|
289
|
-
- **Settings (Esc, then Settings):** change the model provider (Claude subscription through Claude Code, Claude API key, or local Ollama), the model names, the fallback, the Ollama address, and the voice options without the terminal. A change is used straight away (no restart) except the speaking voice and listening model. Saving needs your PIN. The API key is write-only: it is never sent back to the screen. Network address, folders and safety rules are deliberately not in this screen; use `friend config set` for those.
|
|
290
|
-
- **Slash commands:** type `/` in the message bar for a list that narrows as you type (arrows or Tab to pick, Enter to run): /settings, /plugins, /voice, /camera on|off, /mute, /unmute, /quiet, /speak, /clear, /status, /logout, /lock, /help. They run on the screen and never go to the AI, so they work instantly and even when the model is down. Start a line with // to send a message that begins with a slash.
|
|
291
|
-
- **PIN with the keyboard:** wherever a PIN is asked for, type the digits, Backspace to correct, Enter to confirm (Enter never deletes your voice; that needs a click). The on-screen keys still work for touch.
|
|
292
|
-
- **The AI knows the screen:** its instructions include a layout guide (what is always on screen, the five regions, how to compose one answer, how long things should stay), and every request tells it what is on screen, where, for how long, and which regions are free. If it puts something on top of another object or over the captions, status line or clock, Friend moves it to a free spot (or the tidy auto grid) and tells it why, so it learns within the conversation. Nothing is refused.
|
|
293
|
-
- **Voice presence look (Settings, tab "Voice presence", or `/look`):** the settings dialog is wide and has tabs: *Model*, *Voice* and *Voice presence*. On the last one you choose a **theme** (Aurora, Ocean, Ember, Violet storm, Matrix, Rose, Ghost) with one click, or set everything yourself: the **shape** (sphere, orb, ring), the **colour** (swatches or any colour), **brightness**, **size**, how strongly it **reacts to the voice**, the soft **glow** behind everything, whether the live **captions** show and how big they are, and the **view**. A live preview shows the result before you save. Saving a change of look needs **no PIN**, and every open screen changes at once. *Let the AI change the shape, colour and brightness to suit a topic* can be switched off to keep exactly the look you chose (you can still ask it "make it purple" yourself). Pressing the colour box also works; the colour must be a plain #rrggbb.
|
|
294
|
-
- **Views and panels:** Esc, then **View** (or `/view minimal|companion|workspace`, or Settings) chooses how much is on the screen besides the AI's pictures. *Minimal*: only the voice presence (this hides the status line and the clock too; the Esc menu's View button never switches to it by accident, only Settings or `/view minimal` do, and Friend tells you once when the view is Minimal). *Companion*: plus the status line and clock. *Workspace*: also a **Chat** panel (what was said and answered, with a box to type in) and a **Schedule** panel (open tasks and reminders, soonest first, late ones in red). Turn any panel on or off from the Esc menu or with `/chat`, `/tasks`. **Drag a panel by its title bar** (or the status line and clock anywhere on them) to move it; arrow keys nudge it, double-click puts it back, `/layout reset` puts all back. Panels remember their place in this browser. Changing the view starts from that view's own set of panels.
|
|
295
|
-
- **The AI can change settings too:** ask it to switch the model, the fallback or the voice options, or to show a cleaner or fuller screen. Changing settings is a PIN-approval action (the same card as for any risky action); changing only the view needs no PIN. It can never change the API key or the Claude Code command (those stay on the settings screen), and a change of model takes effect after its current reply. The AI is also told which panels you have open and keeps its pictures out of their way.
|
|
296
|
-
|
|
297
|
-
## Voice (local, optional)
|
|
298
|
-
|
|
299
|
-
```bash
|
|
300
|
-
pnpm friend voice setup # one time: private Python environment + speech models (about 250 MB)
|
|
301
|
-
pnpm friend start # starts the speech engine too
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Hold **Space** (or long-press the screen) and speak; release to send. Friend answers in captions and aloud, and the sphere follows the real audio. Pressing Space while it talks interrupts it. Typed messages are answered silently.
|
|
305
|
-
|
|
306
|
-
- **Female or male voice.** Twelve voices to choose from, six female and six male, American, British and Scottish (Amy, Kristin, Hannah, Jenny, Alba, Kathleen; Ryan, Joe, Norman, Henry, Alan, Tom), plus the original voice (Lessac), which stays the default until you choose. You are asked at `friend setup` ("female or male") and again at `friend voice setup` (a number, `female` or `male`; or skip the question with `--female`, `--male` or `--voice jenny`). `friend voice list` shows them. Later, in **Settings, Voice tab**, pick one from the list and press **Hear it** to listen before you decide; the change needs no restart: the voice loads in the background (the first time a voice is used it downloads about 60 MB, then it works offline), you get a message when it is ready, and if it cannot be loaded Friend goes back to the previous voice instead of going silent. Any other Piper voice works too: `friend voice setup --voice hi_IN-pratham-medium`.
|
|
307
|
-
- Everything runs on your PC: speech to text with faster-whisper, text to speech with Piper. Recordings are never stored or sent anywhere else.
|
|
308
|
-
- Needs Python 3.10 or newer. `friend voice status` shows the state; `friend config set voice.sttModel small` (or `voice.language hi`, `voice.enabled false`) changes it, then run `friend voice setup` again for new models. The speaking voice is chosen as described above.
|
|
309
|
-
- Recordings are limited to 90 seconds and 4 MB. While Friend is busy with a request, a new recording is refused (409) instead of being dropped silently. Emergency lock also cancels a recording that is still being transcribed.
|
|
310
|
-
- The browser needs microphone permission and a secure origin (localhost, or HTTPS through your domain).
|
|
311
|
-
- **Until you enroll your voice, anyone who can press Space on a logged-in browser speaks as you.** The PIN still guards risky actions.
|
|
312
|
-
|
|
313
|
-
### Only your voice commands Friend (speaker verification)
|
|
314
|
-
|
|
315
|
-
Press **Esc** (or long-press the top-left corner), choose **Enroll my voice**, read the phrases aloud and enter your PIN. Friend keeps only an averaged 256-number voiceprint, encrypted on disk (AES-256-GCM, key in `voice.key` next to the database). Recordings are never kept. After that every spoken request is scored against your voiceprint:
|
|
316
|
-
|
|
317
|
-
| Match | What happens |
|
|
318
|
-
|---|---|
|
|
319
|
-
| Your voice (0.72 or higher) | Runs as you, as before. |
|
|
320
|
-
| Close, or too short to tell (0.58 to 0.72) | Nothing runs. A card asks "Was that you?"; the right PIN runs the words, a wrong PIN (3 tries), Dismiss or 60 seconds drops them. |
|
|
321
|
-
| Another voice (below 0.58) | A guest: polite answer, no tools, none of your conversation or screen, nothing saved. You get a warning with what was said. |
|
|
322
|
-
|
|
323
|
-
- `friend voice status` shows whether a voice is enrolled; `friend voice forget` deletes it after the PIN (so does the enrollment panel). `friend config set voice.accept 0.75` and `voice.challenge 0.6` tune the two thresholds.
|
|
324
|
-
- **Family voices.** Once your own voice is saved, press **Esc**, then **Family voices**, to add your wife, son, daughter or anyone at home (up to eight people). Hand the device to them: they read a few sentences, you enter your PIN. From then on Friend knows who is talking, calls them by name, and keeps a short conversation with each of them. A recognized person can chat, get help, ask for the weather and have pictures shown. They cannot use your PC, files, camera, messages, settings, notes or schedule, never see your private things, and nothing they say is stored or logged. If two voices sound too alike to tell apart, Friend asks for your PIN instead of guessing. You can remove a person any time (PIN needed).
|
|
325
|
-
- Emergency lock drops any pending challenge and any enrollment in progress.
|
|
326
|
-
- A voice match is a convenience, not a lock: a recording or a cloned voice can fool any speaker model. That is why a borderline match needs the PIN and risky actions always ask for it.
|
|
327
|
-
- Python tests for the speech engine: `cd packages/voice && python -m venv .venv && .venv/Scripts/pip install -e .[dev] && .venv/Scripts/python -m pytest`.
|
|
328
|
-
|
|
329
|
-
## Hindi, Marathi and English together
|
|
330
|
-
|
|
331
|
-
Speak or type in English, Hindi, Marathi, or a mix of them in one sentence ("आज का weather बताओ"). Friend answers in the language you used.
|
|
332
|
-
|
|
333
|
-
- **Understanding you.** Leave `voice.language` empty so each request is understood in the language you spoke. When it hears Hindi or Marathi it listens a second time with a hint that writes those in Devanagari and keeps English words in Latin letters. The default listening model (`base`) mishears Hindi and Marathi a lot: use `friend config set voice.sttModel small` (about 460 MB, a bit slower), run `friend voice setup` once, and restart.
|
|
334
|
-
- **Answering you.** The assistant is told to write Hindi and Marathi in Devanagari and English in Latin letters. Friend then says each piece with the right voice: Hindi with `voice.hindiVoice` (Priyamvada by default, or Pratham or Rohan), Marathi with `voice.marathiVoice`, English words with your main voice. Hindi or Marathi is told apart by the words used. The first time a voice is used it downloads about 64 MB (Settings → Voice picks them and starts the download). If one cannot be loaded, the main voice reads that language instead of staying silent.
|
|
335
|
-
- **Typed text** works the same: Devanagari in, Devanagari out, spoken with the Hindi or Marathi voice. Roman-letter Hindi ("kya haal hai") is understood by the model but is read by the English voice, so ask for Devanagari when you want it spoken well.
|
|
336
|
-
- Notes: the Hindi voices Priyamvada and Pratham are free for personal use but not for commercial use. A small local model (Ollama) writes Hindi and especially Marathi much worse than Claude does.
|
|
337
|
-
- Other languages are not set up with voices yet: the assistant may answer in them, but they are spoken by the English voice.
|
|
338
|
-
|
|
339
|
-
## Your screen: it knows what it draws on, and you can keep widgets
|
|
340
|
-
|
|
341
|
-
- **Friend knows the screen.** Your browser tells Friend the size and kind of its screen (phone, tablet or desktop, portrait or landscape) when it connects and whenever you resize or turn it. The assistant lays things out for that screen: on a phone it shows one or two short pictures in a column, on a wide desktop it uses the whole stage. It also knows which view you chose and which pictures and widgets are showing.
|
|
342
|
-
- **Temporary pictures and widgets.** What Friend shows while it works is temporary: it takes it off the screen when the task is done, and the screen goes back to how you keep it. To keep something, press the pin on its corner, or ask "keep this on screen". A pinned widget is a widget: it stays across refreshes, signing out and in, and restarts, in the place you gave it. "Clear the screen" leaves your widgets alone; the **×** on a widget removes it for good (the assistant never removes or unpins your widgets unless you ask).
|
|
343
|
-
- **Move and resize.** On a computer or tablet, drag an object by the bar at its top and resize it by its bottom-right corner (or focus the bar and use the arrow keys; hold Shift to resize). Objects stay inside the part of the screen that is free of the menu, captions, status line and clock.
|
|
344
|
-
- **The profile badge.** A shield in the corner shows your name (`friend config set ownerName "Your name"`, or Settings → Voice presence) while you are signed in. When Friend recognizes a family member's voice the badge shows their name; an unrecognized voice shows Guest. Drag it where you like; it is hidden in the Minimal view.
|
|
345
|
-
|
|
346
|
-
## Showing files, and looking at its own screen
|
|
347
|
-
|
|
348
|
-
- **Widgets.** Besides card, stat, gauge, list, table, code, chart, timeline, graph and sandbox, Friend can show **markdown** (formatted text with tables), **progress** bars, **checklists**, **key-value** lists, a **countdown**, **image**, **video** (sound too), **pdf** and a **gallery** of pictures and clips. A **group** puts several of them into one object (a dashboard) and **tabs** put several views into one, so it does not need a card per fact.
|
|
349
|
-
- **Your files.** Ask "show me C:\\Users\\me\\Pictures\\trip.jpg" or "open my notes.md". Friend shows images and GIFs, video and sound, PDFs, Markdown, text, CSV (as a table) and code. **Every file needs your PIN**, and the approval card shows the full path. The file is served only to your signed-in browser, under a random address; nothing inside Friend's own data folder can be shown. A web address can never be used as a picture or clip, so a page or file cannot make Friend send data out through an image link.
|
|
350
|
-
- **Looking at its own screen.** The assistant can take a picture of the Friend screen to check its layout, **after you enter the PIN**, with no plugin and no screen-sharing prompt. It needs a model that can see pictures. Sandbox pages, video and PDFs appear empty in that picture. Pictures are never kept in the conversation.
|
|
351
|
-
- **The assistant has a manual for the screen.** It can read it any time (the `stage.guide` tool): every widget with its props, how to arrange them, the theme, files and ready recipes. It also knows what to do when the screen already has things on it: a short explanation goes **on top** as an overlay (it floats over a dimmed screen, moves nothing underneath, and leaves by itself after 30 seconds, or when you click away); something **important** clears the screen first (your pinned widgets stay) and is shown alone; a new topic replaces the old one; more of the same topic updates what is there.
|
|
352
|
-
- **The theme.** Friend is a HUD: a near-black blue background, glass panels with a thin glowing edge, one accent colour, small letter-spaced labels and monospace numbers. The assistant is told the exact colours and your current accent, and the pages it draws in a sandbox use your colours automatically (`var(--accent)`, `var(--ink)` and so on).
|
|
353
|
-
|
|
354
|
-
## Telegram, WhatsApp and SMS (plugins)
|
|
355
|
-
|
|
356
|
-
These are **plugins**: Esc → **Plugins**. **Telegram** and **WhatsApp and SMS (Twilio)** are listed under *Available*; press **Install** (PIN). Once installed they move to *Installed* with **Configure** (the steps left, and the form for the token, numbers and linking), **Turn on / Turn off** and **Remove** (which forgets the tokens). You can also just ask Friend: "set up Telegram for me". It can install the plugin (you approve with your PIN), tell you exactly which step is next, set what is not secret (a phone number, the on/off switch) and open the Configure page on your screen. A token or password is only ever typed by you, on that page. Two things come out of it: you can **talk to Friend from your phone**, and Friend can **message people for you and read their replies**.
|
|
357
|
-
|
|
358
|
-
- **Telegram** needs no public address. Create a bot with **@BotFather** (`/newbot`), paste the token, switch it on and save. Then press **Get a link code** (needs your PIN) and send `/link CODE` to your bot from your own Telegram. That chat is now yours: what you write there is answered like on your PC, in the same chat.
|
|
359
|
-
- **SMS and WhatsApp** use one **Twilio** account (account SID, auth token, your Twilio SMS number and WhatsApp sender, and your own phone number). Twilio delivers incoming messages to `https://your-public-address/api/channels/twilio` (set it in Twilio as the "a message comes in" webhook, HTTP POST), so Friend needs a public address (`friend config set publicUrl https://…`). Every request is checked against Twilio's signature, and a message Twilio sends twice is run once.
|
|
360
|
-
- **Who counts as you.** Only your linked Telegram chat and your own phone number. Everyone else who writes to your bot or number goes to an **inbox** as untrusted mail: nothing runs, nothing is answered, you get a notice on the screen, and you can ask Friend "did anyone reply?" (it reads them as data, never as instructions).
|
|
361
|
-
- **Sending.** "Message Anu on WhatsApp that I am late" uses the same approval rule as everything else (Settings → Approvals): in **manual** you read the recipient and the text and approve; in **auto** it goes without asking. Risky actions asked for from a phone are still decided on the PC.
|
|
362
|
-
- **Safe by design.** Tokens are write-only (never shown again, never sent to the screen), the AI cannot change channel settings, one sender cannot flood you (limits per sender and per minute), and a link code works once, for ten minutes, and dies after five wrong guesses. Calls are not built yet.
|
|
363
|
-
|
|
364
|
-
## Portfolio and brokers (Zerodha)
|
|
365
|
-
|
|
366
|
-
A plugin: Esc → **Plugins** → **Zerodha** → **Install** (PIN) → **Configure**. Friend reads your Zerodha account through Zerodha's Kite Connect API and answers "how is my portfolio doing?", on screen or by voice, or sends a **report** to Telegram or WhatsApp at the times you choose (for example 9:30 and 3:45 on weekdays). The full walk-through, including the first live login, is in [docs/guides/zerodha-setup.md](docs/guides/zerodha-setup.md).
|
|
367
|
-
|
|
368
|
-
- **Read only.** Friend can look at holdings, positions, funds and orders. It cannot place, change or cancel orders, never tells you what to buy or sell and never predicts prices. Settings → **Trading** shows *Read only*; the order levels are shown as "later version" and are locked. The assistant cannot change the broker settings or this level, even with your PIN.
|
|
369
|
-
- **Cost.** Nothing extra: no third-party service, Friend talks to Zerodha from your PC. Zerodha's free *Personal* API plan covers everything used here (live streaming and history are on their paid plan, which Friend does not need).
|
|
370
|
-
- **Login.** You sign in on Zerodha's own page, once a day (Zerodha ends the login about 6 am). Your password and 2FA never reach Friend. The API key and secret are write-only; the day's token is kept in a file only you can read. If the login has ended when a report is due, you get the login link on your phone instead, and the report follows once you sign in.
|
|
371
|
-
- **Reports.** Add them on the Configure page (PIN) or ask in chat. Currency sign and word, number format (en-IN, en-US, de-DE...), warning levels, cache time and limits are settings under Report options. Every figure is worked out by Friend from your account, never written by the AI model; a restart never sends one twice. Time zone, market-holiday dates and the login reminder (minutes before the first report) are on the same page. They are also settings: `brokers.timezone`, `brokers.skipDates`, `brokers.loginReminderMinutes`, and `trading.level` (only `read`), all changed from the Settings screen.
|
|
372
|
-
- **Privacy.** The figures you ask about pass through the AI model you chose (Claude from Anthropic, or Ollama on this PC); a report goes to the messaging app you pick (Telegram or WhatsApp). The audit log records that a report was made, never the amounts.
|
|
373
|
-
- **More brokers.** A broker is one file implementing the `BrokerProvider` contract plus the shared contract tests (`runBrokerContract`); reports, tools and screens do not change.
|
|
374
|
-
|
|
375
|
-
## Alexa (plugin)
|
|
376
|
-
|
|
377
|
-
A plugin: Esc → **Plugins** → **Alexa** → **Install** (PIN) → **Configure**. You make a small private skill in your own Amazon developer account (free, left in development mode, never published) and Friend is its server, so "Alexa, ask jarvis assistant how my portfolio is" is answered by Friend, aloud and on the Friend screen if one is open. No AWS account and no paid plan. The full walk-through is in [docs/guides/alexa-setup.md](docs/guides/alexa-setup.md).
|
|
378
|
-
|
|
379
|
-
- **What it does.** Fixed questions (portfolio, weather, tasks, status) are answered straight from Friend's tools. Open questions go to the assistant: start with one of about 30 words ("how", "what", "tell me", "remind me", "can you", "find", "check", "explain", "calculate", "translate"...) and then say anything. By voice the assistant can look things up, answer questions and add reminders; anything beyond that (messages, files, commands, settings, email) is refused or asked on your phone first. English (India) and Hindi (India); Marathi is not available on Alexa.
|
|
380
|
-
- **What it cannot do.** Alexa cannot make an Echo speak on its own (use an Alexa Routine for a scheduled spoken report), and a slow answer is held ("Still working. Ask me if it is ready.") because Alexa waits only about 8 seconds.
|
|
381
|
-
- **Safe by design.** Every request is checked as really from Amazon (certificate, signature, 150-second timestamp), for your skill, from an Echo you allowed with your PIN. The voice can only read: anything that would ask you is sent to your Telegram or WhatsApp for a YES (or skipped), and anything needing your PIN is refused. The assistant cannot change Alexa settings.
|
|
382
|
-
- **Configurable.** Skill name, languages, answer and permission times, request and Echo limits, and extra tools a voice may use are settings on the Configure page (Advanced), with safe ranges; nothing is tied to one person's setup.
|
|
383
|
-
- **Setup.** Friend needs a public HTTPS address with a real certificate (`friend config set publicUrl https://your-address`). The Configure page shows the endpoint, lets you download the skill files (manifest and English and Hindi models) to paste into the console, and lists your Echo devices. If your address changes later, paste the new endpoint into the console again; nothing else changes.
|
|
384
|
-
|
|
385
|
-
## Music player and screen widgets
|
|
386
|
-
|
|
387
|
-
Friend's screen has a media player and four widgets drawn in a HUD style (angled corners, thin lines, your accent colour): a **profile** tag, a **date and time**, **quick-launch buttons** and the **music player**. Esc → **Settings** → **Widgets** (PIN) sets them all.
|
|
388
|
-
|
|
389
|
-
- **Music.** Pick a folder on the PC that runs Friend (sub-folders are searched; the folder is checked when you save). Friend reads the tags and cover art from the files (free, no account) and plays them in the browser, with a playlist, shuffle, repeat, volume and search. The file types, the most tracks, how deep to search, the start volume, repeat, shuffle and the moving bars are all settings. Files are only read from inside the folder; links that point out of it are not followed.
|
|
390
|
-
- **Spotify (plugin).** Connect your own Spotify account with OAuth (Plugins → Spotify): the assistant and the player can then search and play from it next to your folder, and the player's Library tab gets a Spotify choice. You sign in on Spotify's own page; Friend never sees your password. Playing needs Spotify Premium on your account and a free app of your own at developer.spotify.com (the guide walks through it: [docs/guides/spotify-setup.md](docs/guides/spotify-setup.md)). Any plan or approval a service asks for is on your own account; Friend never pays for or shares one. JioSaavn is not supported: it has no public API and its policy forbids unlicensed access.
|
|
391
|
-
- **SoundCloud (plugin).** The same for your own SoundCloud account (Plugins → SoundCloud): you register a free app of your own (SoundCloud decides who gets one), paste its client id and secret (the secret is write-only), and sign in on SoundCloud's own page. Tracks stream through Friend to the screen, or play from the PC through mpv. See `docs/guides/soundcloud-setup.md`.
|
|
392
|
-
- **Files and pictures to your Telegram or WhatsApp.** Ask Friend to send you a photo, a clip, a song or a document that is on the PC (`message.send_file`). You approve every file after seeing its name, every time. Telegram takes up to 50 MB; WhatsApp up to 16 MB and needs Friend's public address (Twilio fetches the file from a link that works for ten minutes). Only to you, never as SMS; programs (.exe, scripts) and Friend's own data folder are never sent.
|
|
393
|
-
- **Voice messages in Telegram and WhatsApp.** Send Friend a voice message from your own linked Telegram chat or your own WhatsApp number and it is understood and answered like a typed one (the reply starts with what it heard). It uses the same voice engine as the PC microphone, so that must be running; if not, you are told. Up to 5 minutes or 8 MB; from anyone else voice messages are ignored.
|
|
394
|
-
- **Audius (plugin).** Free music from Audius, an open music service: no account, no key, no payment. Install it from Plugins and switch it on; the assistant and the player can then search and play it, on the screen or from the PC. See `docs/guides/audius-setup.md`.
|
|
395
|
-
- **Web video (plugin).** Ask Friend to play a video or a song from YouTube or almost any video site: "play lofi hip hop on YouTube", or give it a link. It plays inside Friend, in a card on your Friend screen (a browser, also a phone) or in a window on the PC, as you choose in the plugin's Configure page; Friend can pause, jump to a time, change the volume and stop it, and it never opens YouTube in your Chrome. **Nothing to install**: when you turn the plugin on, Friend downloads the two free programs it needs (**yt-dlp** and **ffmpeg**) by itself from their projects' own release pages, checks them against the published checksums, keeps them in its own folder and keeps yt-dlp up to date. (**mpv** is optional, for a window of its own on the PC; without it a browser window is used.) Safety: only public http and https links, never an address on your own network, a limit on length and an optional list of allowed sites; nothing is saved to your disk. See [docs/guides/web-video.md](docs/guides/web-video.md).
|
|
396
|
-
- **Play from the PC's speakers.** Settings → Widgets → *Where the sound comes out*: the screen's browser (default) or the PC that runs Friend, with no browser open. The folder's music is played by mpv (free; "Check mpv" finds it or shows the install command for your system) and Spotify on a Spotify device you name. The screen then shows what the PC plays and controls it. See [docs/guides/host-output.md](docs/guides/host-output.md).
|
|
397
|
-
- **Control by the assistant.** Say or type "play something by ...", "next", "turn it down", "shuffle", "what's playing". The assistant can play, pause, skip, seek, change volume, shuffle, repeat and edit the queue, and search the library; it cannot change the folder or any widget setting. Over Alexa the music tools are off unless you add them to the voice tools yourself.
|
|
398
|
-
- **Quick launch.** Up to 12 buttons, each opening an address (http or https only), asking the assistant something, opening a panel (chat, tasks, plugins, settings, music) or controlling the music.
|
|
399
|
-
- **Date and time, profile.** 12 or 24 hour, with or without seconds, in any date language; the profile tag shows the assistant's name, a label you choose, and who Friend is talking to.
|
|
400
|
-
- **Animations.** Tabs slide and light up on hover, ripple and flicker "ENGAGED" when pressed; while music plays the dial's needle sweeps, the bars follow the sound and the cover turns. Settings → Animations can reduce them or turn them off, and the device's own "reduce motion" is always respected. Esc → Music and Quick launch hide or show them; `/music` and `/launcher` do the same.
|
|
401
|
-
|
|
402
|
-
## The orbital screen (a heads-up display)
|
|
403
|
-
|
|
404
|
-
Settings -> Widgets -> **Screen layout** switches between **Classic** (the orb with floating cards, the default) and **Orbital**: a clear centre with the orb and a ring of 60 segments that fills with today's usage compared with your busiest day of the last 30, an **orbit** of hexagon nodes (your quick-launch buttons) with data flowing along the links, and live instruments around the edge, each with its own shape and motion.
|
|
405
|
-
|
|
406
|
-
- **Instruments.** System (processor and memory on an arc gauge), Voice (sound bars), Network (speed on a pulse line, or "n/a" on a PC that reports none), Activity (the conversation and what Friend is doing, like a terminal), Devices (a radar of this screen, the PC's agent and the voice; an offline one is dim), Tickets and Budget (empty until hired workers exist) and Approvals (an orange octagon with the PIN pad when one is needed; the old approval card is not drawn as well). The usage ring is the centre; the top bar carries the name, status and time.
|
|
407
|
-
- **Click or tap** any instrument to open it large in the middle; Esc, a click outside or the x closes it. Tab and Enter work too. A click on an orbit node runs that quick-launch button.
|
|
408
|
-
- **Density.** *Calm* (orb, orbit, usage ring and message bar), *Standard*, or *Full*; each instrument also has its own switch. An approval that is waiting is always shown.
|
|
409
|
-
- **A clean home screen, and the assistant brings up what you ask for.** The orb, the orbit of workers and buttons, the clock, the budget ring and the usage line are always there. The six live instruments (system, voice, network, activity, devices, tickets) are not on the screen until Friend brings them up (say "show my system" or "how is the network"), and it puts them away when you ask, or when it clears the screen (`stage.widget`, and `stage.clear` clears them too). They are drawn with the Jarvis components and stay live; **click one** for a bigger view with the basic details and a plain-words explanation (Esc or a click outside closes it). Settings → Widgets still lets you tick an instrument to keep it on the screen always; the approvals box shows only when something waits, unless you tick it.
|
|
410
|
-
- **Sample data.** Until hired workers exist most of the right side is dim and empty. Settings -> Widgets -> *Show sample data* fills it with the approved design's example workers, tickets, budget, feed and approval so you can see the whole look; it is labelled SAMPLE DATA, never mixed with real data, and a real approval always takes over.
|
|
411
|
-
- **Motion.** Settings -> Animations (Full, Reduced, Off) and the device's own "reduce motion" stop every loop; the loops also pause while the tab is hidden. On a phone the orbit becomes a row of chips and the instruments scroll in a strip.
|
|
412
|
-
- The assistant cannot change these settings, even with your PIN (they are on the owner's settings screen only).
|
|
413
|
-
## The Office (hired workers)
|
|
414
|
-
|
|
415
|
-
The Office lets Friend hire **workers**: separate Claude Code sessions that work in your project folders, one ticket at a time, while you keep talking to Friend. It is off until you switch it on, and nothing in it is preset: the roles, projects, limits and rules are all **settings** (Settings -> **Office**, saved with your PIN; the assistant itself cannot change them).
|
|
416
|
-
|
|
417
|
-
- **Set up.** Turn the Office on, add a **project** (a folder, and one line about its goal) and a **role** (an id, a title, optional model and the instructions that worker always starts with; a few starter roles are only editable data, delete or change them). Then ask Friend: "hire a builder on my site project and have them fix the login bug".
|
|
418
|
-
- **How much Friend decides.** Settings -> Office -> *How much Friend decides*. When a worker asks to do something (run a command, change a file), **Low** (the default) asks you for everything not on your let-through list, **Medium** lets Friend answer the ordinary requests and still asks you, with your PIN, about dangerous ones (deleting, installing, force pushes), and **High** lets Friend answer all of them. Whatever the level, a path outside the project folders, the files that control a worker and the commands you list under *Always refuse* are refused, and every answer Friend gives is written to the worker's feed and the audit log. Only you can change this level, on the settings screen; Friend cannot change it for itself.
|
|
419
|
-
- **Tools Friend uses.** `office.status` (workers, tickets, the subscription window), `office.hire`, `office.assign` (give a ticket and start it), `office.say` (a message to a worker), `office.review` (accept a finished ticket or send it back), `office.close` (close a stale or answered ticket with a reason), `office.tidy` (a worker writes where its work stands into `OFFICE_NOTES.md` and its next ticket starts a clean session; you can also press Tidy up on the worker's screen, and Settings → Office sets the context window and when the assistant is reminded) and `office.stop` (one worker or all). Text a worker writes is shown to Friend as untrusted data, never as instructions.
|
|
420
|
-
- **Approvals.** A worker that wants to do something risky asks through Friend's own approval card (the orange octagon on the orbital screen, the card in the classic one), showing the whole command. A path outside the project's folders, and any command that matches one of your **Always refuse** patterns, is refused without asking. Tools on your **Let through without asking** list go ahead inside the folders; everything else asks, and a command that looks dangerous needs your PIN. An unanswered card counts as a no. There is no "always allow" for a worker's question.
|
|
421
|
-
- **Limits.** *Most workers at once* (the others queue), a token limit per worker and in total, a start timeout, and **Pause at N% of the five-hour window**: when your Claude subscription window is that full, workers wait until it resets (0 = never pause). Workers share your Claude subscription with Friend itself, using the program and model chosen under Model.
|
|
422
|
-
- **On the orbital screen** the workers are the orbit nodes (a "+" hires one), Tickets and Budget show the real tickets and token limits, the Activity feed shows what the workers do, and the usage ring shows the real five-hour window with the time it resets. Click a worker to see its live feed, **Stop** it or say something to it. Stop, switching the Office off and closing Friend all end every worker process.
|
|
423
|
-
- **Team.** The **TEAM** button under the name in the middle opens the team as a graph drawn with the Jarvis components: the assistant on the left, each worker to the right of its manager. Friend decides the jobs and who reports to whom when he hires.
|
|
424
|
-
- **Sessions.** A worker keeps its memory between tickets (its Claude Code session is resumed); the process itself ends after each ticket.
|
|
425
|
-
|
|
426
|
-
## Drawing with the Jarvis components
|
|
427
|
-
|
|
428
|
-
Besides the simple widgets, Every component of the Jarvis HUD library that is safe to draw (stat cards, gauges, bar, line and donut charts, tables, status pills, node graphs, tabs and about forty more) is an object type of its own, by its own name (`JStatCard`, `JGaugeChart`, `JTable`, ...), in the same list as the basic widgets, and the best looking: Friend picks them first. Parts inside a card go in `kids` and `slots`; it is data, never code. Every component and prop is checked against an allow-list before it is drawn, so nothing can run or restyle the screen. `stage.guide` lists the components for him.
|
|
429
|
-
|
|
430
|
-
##
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
- **
|
|
435
|
-
- **
|
|
436
|
-
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
- **
|
|
464
|
-
- **
|
|
465
|
-
- **
|
|
466
|
-
- **
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
- **
|
|
476
|
-
-
|
|
477
|
-
-
|
|
478
|
-
-
|
|
479
|
-
|
|
480
|
-
##
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
-
|
|
489
|
-
-
|
|
490
|
-
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
`
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
-
|
|
499
|
-
|
|
500
|
-
-
|
|
501
|
-
-
|
|
502
|
-
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
-
|
|
511
|
-
-
|
|
512
|
-
-
|
|
513
|
-
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
-
|
|
533
|
-
-
|
|
534
|
-
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
-
|
|
545
|
-
-
|
|
546
|
-
- **
|
|
547
|
-
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
-
|
|
555
|
-
-
|
|
556
|
-
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
friend
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
##
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
1
|
+
# Friend
|
|
2
|
+
|
|
3
|
+
A self-hosted personal AI assistant. It runs on your PC, talks to you from any screen over WebSocket, uses tools on your machine with risk-based approvals, and controls a full-screen sci-fi "stage" itself.
|
|
4
|
+
|
|
5
|
+
Phase 1: secure login, agent loop with Claude, CLI device node, approvals with PIN, and a minimal stage with a particle-sphere presence. Phase 2a: chart, gauge, timeline and graph objects, automatic layout, fade-out, orb and ring voice styles and mood intensity. Phase 5a: local voice. Hold Space and speak; Friend answers aloud. Phase 5b: only your voice commands it. Phase 2b: the agent can look through your camera, one approved picture at a time. Also built: memory (notes it keeps about you), tasks and reminders with a heartbeat, free-form pages in an isolated frame, a Docker code sandbox, and a plugin store. Models: Claude, or a local model through Ollama. See `docs/superpowers/specs` and `docs/superpowers/plans`.
|
|
6
|
+
|
|
7
|
+
## Install (npm)
|
|
8
|
+
|
|
9
|
+
Needs only **Node.js 20 or newer**. Everything else is checked, and offered, by the setup wizard.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g friend-assistant
|
|
13
|
+
friend onboard
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
(or without installing: `npx friend-assistant onboard`)
|
|
17
|
+
|
|
18
|
+
`friend onboard` is a guided setup, one step at a time. Press Enter to take the suggestion at any question; run it again and it carries on where it stopped.
|
|
19
|
+
|
|
20
|
+
1. **Welcome**: what is about to happen.
|
|
21
|
+
2. **What you want to use**: pick any of: Claude through your subscription (Claude Code), Claude with an API key, a model on this PC (Ollama), voice, safe code running (built in, nothing to install).
|
|
22
|
+
3. **What this PC needs**: it checks Node.js, plus only what your choices need: Python (voice), Ollama, Claude Code, and whether the port is free. Docker is optional and is not asked for. For each missing one it shows the exact command (`winget` on Windows, `brew` on a Mac, `apt` on Linux, `npm` for Claude Code), asks **before** installing, runs it one by one with the output visible, and checks again. If a program was installed but this terminal cannot see it yet, it tells you to open a new terminal and run `friend onboard` again.
|
|
23
|
+
4. **Your account**: password and PIN (each typed twice) and the assistant's name.
|
|
24
|
+
5. **How Friend thinks**: signs in to Claude if needed (`claude auth login`), asks for an API key, or downloads the local model, and sets the safety net (the local model behind Claude).
|
|
25
|
+
6. **Voice**: a female or male voice, then the speech models (about 250 MB).
|
|
26
|
+
7. **Your workspace folder**, 8. **Who can open Friend** (only this PC, or your network, and the port), 9. **How it looks** (a theme), 10. **Finish**: a summary, and it can start Friend and open the browser.
|
|
27
|
+
|
|
28
|
+
Handy options: `friend onboard --no-install` (never installs anything, only tells you what to do), `--yes` (take every suggestion), `--redo <step>` (run one step again, for example `--redo look`), `--reset` (start from the beginning). `friend doctor` shows what this PC has and how to fix what is missing, and changes nothing. Progress is kept in `onboarding.json` in the data folder; it never contains a password, PIN or key.
|
|
29
|
+
|
|
30
|
+
If `npm install` fails on `better-sqlite3` (it builds a small native part when no ready-made one fits your system), install the compiler tools it names (on Windows: the "Desktop development with C++" part of Visual Studio Build Tools) and run it again.
|
|
31
|
+
|
|
32
|
+
## Command reference
|
|
33
|
+
|
|
34
|
+
Every command starts with `friend`. If you run Friend from the source code, write `pnpm friend ...` instead. `friend` on its own prints the short list. Most things can also be done inside the app (press Esc, then Settings), and a few have their own commands there (see "Commands inside the app" below).
|
|
35
|
+
|
|
36
|
+
### Set up and check
|
|
37
|
+
|
|
38
|
+
| Command | What it does | Use it when |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `friend onboard` | The guided setup in ten steps: asks what you want to use, checks this PC, offers to install what is missing (asking first), creates your account, then the model, voice, workspace, network and look. | The first time, or to finish something you skipped. It is safe to run again: it carries on where it stopped. |
|
|
41
|
+
| `friend onboard --no-install` | The same, but never installs anything; it only tells you what to install. | You manage software yourself, or this is a work PC. |
|
|
42
|
+
| `friend onboard --yes` | Takes every suggestion without asking (passwords and keys are still asked). | You want the defaults quickly. |
|
|
43
|
+
| `friend onboard --redo <step>` | Runs one step again. Steps: welcome, features, prereqs, account, model, voice, workspace, network, look, finish. | You want to change one thing, for example `friend onboard --redo look` or `--redo network`. |
|
|
44
|
+
| `friend onboard --reset` | Forgets what the wizard has done so far and starts over. Your account and settings stay. | The wizard's memory of its steps is wrong. |
|
|
45
|
+
| `friend doctor` | Shows what this PC has (Node.js, Python, Docker (optional), Ollama, Claude Code, the port) and the exact command to fix what is missing. Changes nothing. | Something does not work, or before asking for help. |
|
|
46
|
+
| `friend setup` | Only creates the owner account: password, PIN, assistant name, workspace folder, API key, voice. | You want the plain version without the wizard. |
|
|
47
|
+
| `friend status` | Prints the saved settings: data folder, owner, address, public URL, workspace, model, whether an API key is set. | A quick look at how Friend is set up. |
|
|
48
|
+
| `friend version` | Prints the version. | Reporting a problem, or checking an update. |
|
|
49
|
+
|
|
50
|
+
### Run Friend and other PCs
|
|
51
|
+
|
|
52
|
+
| Command | What it does | Use it when |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `friend start` | Starts Friend: the web app, the assistant, the speech engine if installed, and your connectors. Prints the address (and your network address when that is on). Ctrl+C stops it. Friend's screen works in one browser window at a time: open it in a second place and that window shows "Use here", which moves Friend there and stops the first. | Every day. Open the address in a browser and sign in. |
|
|
55
|
+
| `friend pair` | Prints a one-time pairing code, valid for 5 minutes, and the command to run on the other PC. | You want Friend to also work on a second PC. |
|
|
56
|
+
| `friend node --url ws://HOST:8787/device --code CODE` | Run on the other PC: connects it to your Friend. Add `--roots C:/work,D:/files` for the folders it may use freely and `--name laptop` to name it. | The second step after `friend pair`. |
|
|
57
|
+
| `friend devices list` | Lists the paired PCs and when each was last seen. | Checking what is connected. |
|
|
58
|
+
| `friend devices revoke <id>` | Cuts a paired PC off at once. | A PC is lost, sold or no longer yours. |
|
|
59
|
+
|
|
60
|
+
### Choose the model
|
|
61
|
+
|
|
62
|
+
| Command | What it does | Use it when |
|
|
63
|
+
|---|---|---|
|
|
64
|
+
| `friend claude status` | Shows whether Claude Code is installed and signed in, and the model and fallback in use. | Checking the Claude subscription route. |
|
|
65
|
+
| `friend claude setup` | Checks that Claude Code is installed and signed in, and tells you what to fix. | You have a Claude plan and want to use it. |
|
|
66
|
+
| `friend claude setup --use` | The same, and switches Friend to your Claude subscription (restart `friend start`). | You want Friend to answer through your plan, with no API key. |
|
|
67
|
+
| `friend ollama status` | Shows whether Ollama is running, which models are installed, and which one Friend uses. | Checking the local model. |
|
|
68
|
+
| `friend ollama setup [model]` | Starts Ollama if needed (in Docker when it is not installed), then downloads the model (default qwen2.5:7b). | You want a free, private model on this PC. |
|
|
69
|
+
| `friend ollama setup [model] --use` | The same, and switches Friend to it. | Make the local model the main one. |
|
|
70
|
+
| `friend config set provider claude` | Chooses the model by hand: `claude` (API key), `claude-code` (your subscription) or `ollama` (this PC). | You prefer a command to the Settings screen. |
|
|
71
|
+
| `friend config set apiKey <key>` | Saves an Anthropic API key. | You use the API route. |
|
|
72
|
+
|
|
73
|
+
### Voice
|
|
74
|
+
|
|
75
|
+
| Command | What it does | Use it when |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| `friend voice setup` | Installs speech (a private Python environment, Whisper for listening, Piper for speaking), asks which voice you want (female or male) and downloads about 250 MB. | You want to talk to Friend and hear it. |
|
|
78
|
+
| `friend voice setup --female` | The same without the question: the first female voice (Amy). `--male` gives Ryan. | You know which kind you want. |
|
|
79
|
+
| `friend voice setup --voice jenny` | The same with a voice by name or by its number in the list (`--voice 4`), or any other Piper voice name such as `hi_IN-pratham-medium`. | You want a specific voice. |
|
|
80
|
+
| `friend voice list` | Shows the twelve voices (six female, six male), numbered, with the current one marked. | Choosing a voice. |
|
|
81
|
+
| `friend voice status` | Shows whether speech is installed, which models it uses, and whether your own voice is enrolled. | Voice does not work, or you want to check. |
|
|
82
|
+
| `friend voice forget` | Deletes your saved voice (asks for your PIN). Afterwards every voice is treated as yours until you enrol again. | You want to re-enrol, or switch recognition off. |
|
|
83
|
+
|
|
84
|
+
### Network and port
|
|
85
|
+
|
|
86
|
+
| Command | What it does | Use it when |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `friend password` | Sets a new sign-in password (asks twice, nothing is shown while you type). The old one is not needed, because you are at this PC, so it is also the way back in if you forgot it. Every browser and phone is signed out. | You forgot the password, or want a new one. From the screen: Esc → Settings → Security. |
|
|
89
|
+
| `friend pin` | Sets a new PIN, the number Friend asks for before risky actions. | You forgot the PIN, or want a new one. |
|
|
90
|
+
| `friend daemon start` | Runs Friend in the background, with no terminal window needed. Prints the address, keeps a log in the data folder (`friend.log`). | You want Friend always available, even after you close the terminal. |
|
|
91
|
+
| `friend daemon stop` | Stops the background Friend and the speech engine with it. | Shutting it down. |
|
|
92
|
+
| `friend daemon restart` | Stops it and starts it again. | After changing a setting such as `friend lan on` or a different model. |
|
|
93
|
+
| `friend daemon status` | Says whether the background Friend is running, for how long, and at which address. Exit code 0 when running, 1 when not. | Checking, or in a script. |
|
|
94
|
+
| `friend upgrade` | Updates Friend in one go: checks npm for the newest version, stops the background Friend, installs it, and starts it again. Add `--force` to reinstall the same version. If Friend runs in a terminal instead, it asks you to press Ctrl+C there first. (`--auto` is what Friend itself runs to update itself; it writes what happened to `update.log` in the data folder.) | A new version is out. |
|
|
95
|
+
| `friend usage [--days N]` / `clear` | Shows the tokens Friend used, day by day (default 7 days), split by model and by where the request came from (voice, chat, scheduled tasks, messages). Only numbers are kept, never what was said; `clear` removes the saved counts. Counts older than a year go by themselves. | You want to see how much of your plan Friend is using. (Settings → Usage shows the same.) |
|
|
96
|
+
| `friend audit list [--since 2h] [--who ...] [--group ...] [--result ...] [--q text]` | Lists what you, your assistant and your workers did, newest first, with filters. Asks for your PIN and gives it to the running Friend (from this PC only). | You want to see what happened, for example `friend audit list --since 1d --who "Dev (be8d8dca)"`. |
|
|
97
|
+
| `friend audit show <request-id>` | Prints everything one request caused, in order: your request, the tool calls, the approvals, the workers' actions. | You found an entry and want its whole story. |
|
|
98
|
+
| `friend audit verify [--seal "..."]` | Checks that the log has not been changed (every entry is chained to the one before). With `--seal` it checks one of the daily seals sent to your phone. | Something looks wrong, or you want to be sure. |
|
|
99
|
+
| `friend audit export --format json\|csv\|html [--since 7d]` | Saves a report in the current folder (JSON with the chain fields, CSV, or a printable HTML page). It contains private content. | You want to keep or hand over a record. |
|
|
100
|
+
| `friend audit seal` | Prints the current seal: a one-line fingerprint of the log so far (also sent to your phone once a day). | You want to note the log's state yourself. |
|
|
101
|
+
| `friend autostart on` / `off` / `status` | Starts Friend by itself in the background when you sign in to this computer, so you never start it by hand after a restart. Windows: a hidden entry in your sign-in list; macOS: a launch agent; Linux: a user service (or an autostart entry when there is no user systemd). Only your own account's files are touched. `on` can be undone with `off`. | You want Friend always there after a restart. (Settings → Startup and updates does the same.) |
|
|
102
|
+
| `friend lan` (or `friend lan status`) | Shows what Friend listens on and the addresses to open. | Checking, or finding the address for your phone. |
|
|
103
|
+
| `friend lan on` | Lets other devices on your network open Friend. Prints the addresses and the things to know (plain http, no microphone on other devices, firewall prompt). | Using Friend from a phone or another PC. |
|
|
104
|
+
| `friend lan on --https` | The same, with a secure `https://` address (Friend makes its own certificate), so a phone may use the microphone and camera. | Talking to Friend from a phone. |
|
|
105
|
+
| `friend lan https on` (or `off`) | Turns the secure address on or off by itself. | You already ran `friend lan on`, or want plain http back. |
|
|
106
|
+
| `friend lan on --port 9100` | The same on another port. | Port 8787 is taken. |
|
|
107
|
+
| `friend lan port 9100` | Changes only the port. | Another program uses 8787. |
|
|
108
|
+
| `friend lan off` | Back to this PC only. | Closing it again. |
|
|
109
|
+
|
|
110
|
+
Restart `friend start` after any of these.
|
|
111
|
+
|
|
112
|
+
### Your data and what Friend may do
|
|
113
|
+
|
|
114
|
+
| Command | What it does | Use it when |
|
|
115
|
+
|---|---|---|
|
|
116
|
+
| `friend memory list` | Shows the tree of notes Friend keeps about you, folder by folder (the older flat list if the tree is not there yet). | Seeing what it remembers. |
|
|
117
|
+
| `friend memory show <path>` | Prints one note, or a folder's index (for example `family/priya.md` or `family`). | Reading what it wrote. |
|
|
118
|
+
| `friend memory forget <path or number>` | Deletes one note, a whole folder (by path), or an older numbered note. | A note is wrong or private. |
|
|
119
|
+
| `friend memory clear` | Deletes all notes (asks for your PIN). | Starting fresh. |
|
|
120
|
+
| `friend rules list` | Lists the "always allow" rules you created by choosing *Always allow* on an approval card. | Reviewing what Friend may do without asking. |
|
|
121
|
+
| `friend rules remove <id>` | Removes a rule, so Friend asks again. | You trust something less now. |
|
|
122
|
+
|
|
123
|
+
### Plugins
|
|
124
|
+
|
|
125
|
+
**Day trader (India)** is a bundled plugin with ten skills (focus list, scan for setups, news, entry, exit, budget, risk, replay, analyst, smart money). Ask "what should I trade today" and Friend scans the market (the most active stocks, volume spurts and the biggest F&O movers), checks the news, simulates each setup and gives a ranked focus list with entry, stop, target and odds and an exact sizing tool (`trade-plan`). It reads Indian market data through three built-in tools, `market.get` (candles, quotes, NSE announcements, results, insider trades, bulk and block deals, shareholding, top movers, most active, volume spurts), `market.scan` (finds opening-range breakouts and bounces across the market and ranks them) and `market.replay` (replays the rest of the session from the stock's own recent candles). Both use free public feeds (Yahoo Finance and the NSE, no key), follow the Web switch, and work in IST and rupees. Your limits (max loss, money, leverage) are asked each session, never assumed. It is analysis only: it never places an order, you place it in your broker app.
|
|
126
|
+
|
|
127
|
+
| Command | What it does | Use it when |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| `friend plugin catalog` | Lists the plugins that come with Friend. | Looking for something to add. |
|
|
130
|
+
| `friend plugin list` | Lists the installed plugins and whether each is on. | Checking what is installed. |
|
|
131
|
+
| `friend plugin install <name or folder>` | Shows exactly what a plugin contains and asks before installing (add `--yes` to skip the question). A folder path installs your own plugin. | Adding a skill or a sandboxed tool. |
|
|
132
|
+
| `friend plugin enable <id>` and `friend plugin disable <id>` | Switches a plugin on or off without removing it. | Pausing a plugin. |
|
|
133
|
+
| `friend plugin remove <id>` | Deletes a plugin. | You no longer want it. |
|
|
134
|
+
|
|
135
|
+
Connectors (Gmail, Chrome control, any MCP service) are managed inside the app, not on the command line: Esc, then Connectors, or `/connectors`.
|
|
136
|
+
|
|
137
|
+
### Settings by command
|
|
138
|
+
|
|
139
|
+
`friend config set <key> <value>` changes one setting; `friend config keys` prints the list with a line about each. Anything on the Settings screen can be changed there instead, with the same effect. The keys:
|
|
140
|
+
|
|
141
|
+
| Key | What it is |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `provider` | Which model answers: `claude` (API key), `claude-code` (your subscription), `ollama` (this PC) or `openai` (any OpenAI-compatible server, such as OmniRoute). |
|
|
144
|
+
| `approvals` | How much Friend asks before acting: `manual` (asks every time, the default), `edits` (file work and the sandboxed code runner go ahead) or `auto` (commands and tools go ahead too). Risky commands (they need your PIN), the camera (unless you switched the eye on and are talking at the screen, see "The eye"), adding connectors or plugins, and Friend's own data folder always ask, in every mode. The AI cannot change this. Easier: Esc → Settings → Approvals. |
|
|
145
|
+
| `ownerName` | Your name, shown on the profile badge (a shield in the corner) while you are signed in; it shows whoever Friend just recognized when they speak. Empty shows "Owner". |
|
|
146
|
+
| `apiKey`, `model` | The Anthropic API key and the Claude model used with it. |
|
|
147
|
+
| `claudeCode.model`, `claudeCode.command`, `claudeCode.fallback` | The subscription route: model (`sonnet`, `haiku`, `opus`), the command that starts Claude Code, and `ollama` or `none` for what to use when Claude is unavailable. |
|
|
148
|
+
| `claudeCode.webSearch` | With Claude Code, lets Claude search the web with its own WebSearch tool (on by default), so questions about today (prices, news, scores) are answered from what it finds, with the source, instead of from memory. Only searching: Claude gets no other built-in tool, and a guest never gets it. Off: Claude answers from memory only. |
|
|
149
|
+
| `web.enabled` | Gives every model the tools `web.search` (a list of results) and `web.read` (the text of one page) so it can answer about today (prices, news, scores) from the web instead of from memory. They run on this PC with no browser. A page can never give Friend orders, and Friend will not open addresses on this PC or your network. Off: neither tool exists. |
|
|
150
|
+
| `web.provider` | Where `web.search` asks: `duckduckgo` (default, free, no key), `brave` or `tavily` (your own key), or `searxng` (your own server). If the chosen source cannot answer, Friend tries DuckDuckGo once and says so. |
|
|
151
|
+
| `web.searxngUrl` | The address of your own SearXNG server (http or https, no login in it), used when `web.provider` is `searxng`. It must allow the JSON format. |
|
|
152
|
+
| `web.braveKey`, `web.tavilyKey` | Your keys for Brave Search and Tavily. Write-only: never shown again, and an empty box leaves the saved key alone. Only the owner can change them, on the Settings screen. |
|
|
153
|
+
| `ollama.url`, `ollama.model`, `ollama.vision`, `ollama.contextTokens` | The local model: server address, model name, whether it can see pictures, and how much it remembers at once. |
|
|
154
|
+
| `openai.url`, `openai.model`, `openai.apiKey`, `openai.vision` | An OpenAI-compatible server: its address (ending in `/v1`), the model name it knows, its API key (or empty), and whether the model can see pictures. For OmniRoute (https://github.com/diegosouzapw/OmniRoute) run `npm install -g omniroute` and `omniroute`, then `friend config set provider openai` (the defaults are OmniRoute's: `http://localhost:20128/v1` and model `auto`). Also works with LM Studio, LiteLLM, vLLM and OpenRouter. |
|
|
155
|
+
| `voice.hindiVoice`, `voice.marathiVoice` | The voices that read Hindi and Marathi (Devanagari) text: `hi_IN-priyamvada-medium`, `hi_IN-pratham-medium`, `hi_IN-rohan-medium`, `mr_IN-google-medium`. Empty makes the main voice read that language. See "Hindi, Marathi and English together". |
|
|
156
|
+
| `updates.auto` | Look for a newer Friend shortly after it starts and every few hours, and install it by itself while Friend is not busy (only a Friend running in the background restarts itself). Off: Friend only tells you a new version is out, and you run `friend upgrade` or press Update now in Settings → Startup. |
|
|
157
|
+
| `session.autoCompact` | With Claude Code, Friend keeps one long conversation and re-reads all of it for every answer. On (default): when it grows past `session.compactAtTokens`, Friend writes short notes on it and starts a fresh conversation from them before the next answer. Off: it only tidies when you press Tidy up now. |
|
|
158
|
+
| `session.compactAtTokens` | How big the conversation may grow before it is tidied up by itself, in tokens (50000 to 800000, default 100000). A fresh conversation already starts near 36000. |
|
|
159
|
+
| `voice.enabled`, `voice.sttModel`, `voice.ttsVoice`, `voice.language`, `voice.speakTyped`, `voice.duck`, `voice.duckPercent`, `voice.resumeSilenceSeconds`, `voice.accept`, `voice.challenge` | Speech on or off, the listening model, the speaking voice, a forced language, speaking typed replies, turning music and video down while you talk and while Friend speaks (and how far, in percent), how long a presentation you interrupted waits in silence before it goes on by itself (0: it waits until you say continue), and the two thresholds for recognising your voice. |
|
|
160
|
+
| `eye.autoOffMinutes` | Minutes until the camera eye switches itself off (0 to 1440, default 120; 0 means only when you switch it off). The eye itself (Friend looks through the camera without asking each time, only when you talk to it at the screen) is switched on, with your PIN, in Esc → Settings → Approvals, and is always off after a restart or sign-out. |
|
|
161
|
+
| `codeRunner` | Where the code the assistant writes runs: `auto` (the default: Docker when it is installed and running, otherwise the sandbox built into Friend), `sandbox` (always the built-in one, nothing to install) or `docker` (always Docker). Easier: Esc → Settings → Approvals. Changing it needs your PIN. |
|
|
162
|
+
| `phoneApprovals.enabled`, `phoneApprovals.channel`, `phoneApprovals.delaySec`, `phoneApprovals.buttons`, `phoneApprovals.allowRisky`, `phoneApprovals.batchSec` | Approving from your phone when you are away from the screen: on or off, which linked app is asked (`auto`, `telegram`, `whatsapp`), how many seconds to wait for the screen first (0 to 110), Telegram Allow / Deny buttons, whether the camera and the Office's requests may also be answered there, and how many seconds (0 to 30) questions that pile up are gathered into one message. See `docs/guides/phone-approvals.md`. |
|
|
163
|
+
| `audit.keepDays`, `audit.archive`, `audit.sealAt`, `audit.unlockMinutes` | The audit trail: days kept before older entries are archived and removed (90; 0 keeps everything), whether a verifiable archive is kept, the time the daily seal goes to your phone (09:00; empty turns it off), and how many minutes the audit screen stays open after your PIN (10). |
|
|
164
|
+
| `bind`, `port` | Where Friend listens (easier: `friend lan`). |
|
|
165
|
+
| `https` | `true` serves a secure `https://` address with a certificate Friend makes for itself, so a phone may use the microphone (easier: `friend lan https on`). |
|
|
166
|
+
| `publicUrl`, `allowedOrigins`, `allowedHosts`, `trustProxy` | For running behind your own domain or reverse proxy (see "Using your own domain later"). |
|
|
167
|
+
| `roots` | The workspace folders Friend may use freely, separated by commas. |
|
|
168
|
+
|
|
169
|
+
Example: `friend config set voice.speakTyped false` keeps typed messages silent.
|
|
170
|
+
|
|
171
|
+
### Environment variables
|
|
172
|
+
|
|
173
|
+
| Variable | Meaning |
|
|
174
|
+
|---|---|
|
|
175
|
+
| `FRIEND_HOME` | The folder where Friend keeps its data (default: `.friend` in your home folder). Use another folder to keep a separate test copy. |
|
|
176
|
+
| `FRIEND_DAEMON` | Set to `1` by `friend daemon start` for the Friend it starts in the background. Only a background Friend may restart itself to install an update; one running in a terminal never does. You do not set it yourself. |
|
|
177
|
+
| `FRIEND_SECRET_KEY` | A passphrase to lock the saved keys, tokens and passwords with, instead of the `secret.key` file Friend makes in its data folder. Keys in `config.json` are always stored encrypted (on every system); with this set, the unlocking key is not on the disk at all. Set the same value on every start; if it is lost, those keys must be entered again. |
|
|
178
|
+
| `FRIEND_ANTHROPIC_KEY` | An API key to use when none is saved. |
|
|
179
|
+
| `FRIEND_PYTHON` | The Python program to use for voice, if the usual ones are not the right version. |
|
|
180
|
+
| `FRIEND_WEB_DIR`, `FRIEND_PLUGIN_CATALOG`, `FRIEND_VOICE_DIR`, `FRIEND_CHROME_CONTROL` | Where the web app, the bundled plugins, the Python voice code and the Chrome control program (its `index.js`) are, for unusual installs. |
|
|
181
|
+
| `CHROME_BRIDGE_PORT`, `CHROME_BRIDGE_HTTP_PORT` | Where Chrome control itself listens on this PC (its extension port, default 8765, and its MCP port, default 8766). Friend reaches both for you: other PCs only need Friend's own address. |
|
|
182
|
+
| `FRIEND_DEMO_PORT` | The port `pnpm demo` listens on (default 8788). |
|
|
183
|
+
|
|
184
|
+
### From the source code
|
|
185
|
+
|
|
186
|
+
| Command | What it does |
|
|
187
|
+
|---|---|
|
|
188
|
+
| `pnpm friend ...` | Runs any command above from the repository. |
|
|
189
|
+
| `pnpm demo` | A scripted demo with no network and no key; open the printed address. |
|
|
190
|
+
| `pnpm test`, `pnpm typecheck`, `pnpm build` | The checks and the web build. |
|
|
191
|
+
| `pnpm package` | Builds the npm package in `packages/friend` (then `npm publish` from there). |
|
|
192
|
+
|
|
193
|
+
### Commands inside the app
|
|
194
|
+
|
|
195
|
+
Type `/` in the message bar for a list that narrows as you type; they run on the screen and never go to the AI. `/help` opens the same list with a line about each.
|
|
196
|
+
|
|
197
|
+
| Command | What it does |
|
|
198
|
+
|---|---|
|
|
199
|
+
| `/settings` | Opens the settings. |
|
|
200
|
+
| `/look` | Opens the settings on the voice presence tab (themes, colour, size, captions). |
|
|
201
|
+
| `/view minimal`, `/view companion`, `/view workspace` | Chooses how much is on the screen besides the AI's pictures. |
|
|
202
|
+
| `/chat`, `/tasks` | Shows or hides the conversation and the schedule (add `on` or `off`). |
|
|
203
|
+
| `/layout reset` | Puts every panel back where it started. |
|
|
204
|
+
| `/connectors` | Opens the connectors (Gmail, Chrome control, any MCP service). |
|
|
205
|
+
| `/plugins` | Opens the plugins. |
|
|
206
|
+
| `/voice` | Opens voice enrolment. |
|
|
207
|
+
| `/camera on`, `/camera off` | Switches the camera. It only takes a picture when you approve. |
|
|
208
|
+
| `/mute`, `/unmute` | Hides or shows everything on the stage. Remembered on this device. |
|
|
209
|
+
| `/quiet`, `/speak` | Stops Friend speaking aloud (it still writes its answers, so you read the captions and the chat), or lets it speak again. Instant, no restart, remembered on this device. |
|
|
210
|
+
| `/clear` | Takes everything off the screen. |
|
|
211
|
+
| `/status` | Says what Friend is doing right now. |
|
|
212
|
+
| `/logout` | Signs out on this screen. |
|
|
213
|
+
| `/lock` | Emergency lock: ends every session and stops the agent. |
|
|
214
|
+
| `/help` | Lists the commands. |
|
|
215
|
+
|
|
216
|
+
## Quick start (from the source code)
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
pnpm install
|
|
220
|
+
pnpm build # builds the web client
|
|
221
|
+
pnpm friend setup # password, PIN, assistant name, workspace folder, API key
|
|
222
|
+
pnpm friend start # gateway + local device node, http://127.0.0.1:8787
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Sign-in is guarded against guessing: after **three wrong passwords** (or PINs) from one address, that address is locked for a minute, and every wrong try after that doubles the wait (up to an hour). The sign-in screen shows the tries left and a countdown, and even the right password waits out a lock. Many addresses together are limited too. A refresh never shows any part of the home screen before sign-in: the page asks the server first and draws only the sign-in screen until you are in.
|
|
226
|
+
|
|
227
|
+
Open the address in a browser, sign in, and press any key to talk. Press `Esc` (or long-press the top-left corner) for the owner menu: voice on/off, mute stage, log out, emergency lock.
|
|
228
|
+
|
|
229
|
+
Preview the whole look with no API key and no network: `pnpm build && pnpm demo`, then open the printed address. Each message you send shows the next scene (gauges and charts, a timeline, a graph, the orb and ring voice styles, a warm mood).
|
|
230
|
+
|
|
231
|
+
Other commands: `friend rules list|remove <id>`, `friend devices list|revoke <id>`, `friend status`, `friend config set <key> <value>`, `friend pair` (code to connect another PC), `friend node --url <ws-url> --code <code>`.
|
|
232
|
+
|
|
233
|
+
## Use your Claude subscription (Claude Code)
|
|
234
|
+
|
|
235
|
+
Instead of an API key you can let Friend think through the Claude Code app you already have signed in with your Claude plan. To the rest of Friend it is just another model: same tools, same approvals, same screen. Nothing else changes.
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
claude # once: sign in with your Claude account (if you have not already)
|
|
239
|
+
pnpm friend claude setup --use # checks it works and switches Friend over; restart `friend start`
|
|
240
|
+
pnpm friend claude status
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
- One Claude Code process stays running, so replies start in about a second after the first message (a fresh start takes 3 to 9 seconds). Friend's conversation is remembered across restarts.
|
|
244
|
+
- Claude Code has no tools of its own here. Friend's tools reach it through a private local bridge (127.0.0.1, random token), and every call still goes through Friend's own approval and PIN rules and audit log.
|
|
245
|
+
- Unrecognized voices (guests) get a separate, tool-less, nothing-saved session.
|
|
246
|
+
- If your plan's usage limit runs out, Claude Code is signed out or missing, Friend answers with the local Ollama model and tells you once on screen (`friend config set claudeCode.fallback none` to see errors instead). Other settings: `claudeCode.model` (default sonnet), `claudeCode.command`.
|
|
247
|
+
- Caveats: it uses your plan's limits; using a subscription this way is a grey area in Anthropic's terms, so treat it as experimental; if Friend answered through the fallback, Claude does not know about that exchange.
|
|
248
|
+
- Opt-in live test against the real CLI: `FRIEND_LIVE_CLAUDE=1 pnpm exec vitest run packages/server/src/provider/claude-code/live.test.ts`.
|
|
249
|
+
|
|
250
|
+
## Connectors (Gmail, Chrome control, any MCP service)
|
|
251
|
+
|
|
252
|
+
A connector gives Friend the tools of an outside program or service through the MCP standard. Open **Esc, then Connectors** (or type `/connectors`). Ready-made entries:
|
|
253
|
+
|
|
254
|
+
- **Chrome control** is a plugin that comes with Friend, so there is nothing else to install (no npm package, no `claude mcp add`). Open **Plugins**, install **Chrome control** (PIN), and Friend sets it up by itself from the copy inside it: the small helper Chrome needs and the extension folder. The one step only you can do is loading that folder in Chrome (chrome://extensions, Developer mode, Load unpacked; Configure shows the folder with a Copy button) and switching the extension on from its icon. Then switch the plugin on (PIN); Friend connects, and the plugin page shows whether the extension is linked. Every browser action still asks for your approval. Removing the plugin only removes Friend's connection; the helper and the extension stay, because other programs on your PC may use them. See [docs/guides/chrome-control.md](docs/guides/chrome-control.md). **From another PC** it needs no extra port: switch on *Allow other PCs* in Configure and Friend serves Chrome control on its own address (`/chrome/mcp` for apps, `/chrome/ws` for the extension), with a download link for the extension and the key shown only after your PIN.
|
|
255
|
+
- **Gmail**: a community Gmail MCP server (`@gongrzhe/server-gmail-autoauth-mcp`). You create the Google OAuth credentials and sign in on Google's own page; **Friend never sees your Google password**. More mail and calendar connectors can be added the same way ("Something else": any program or any server by address).
|
|
256
|
+
|
|
257
|
+
How it is kept safe:
|
|
258
|
+
- **Adding or switching one on needs your PIN**, and the screen shows exactly which program will start (no shell is ever used) or which address it will reach. Plain `http://` is only allowed for a server on this PC.
|
|
259
|
+
- **Every call to a connector's tool asks for your approval** (the usual card; "Always allow" works for the ones you trust). Tools appear to the AI as `mcp.<connector>.<tool>`.
|
|
260
|
+
- **Secrets** (tokens, keys) are typed on the screen only. They are saved in `connectors.json` next to the database (readable only by you) and are never shown again, never put in the AI's context, never in the audit log. The AI cannot supply or change secrets.
|
|
261
|
+
- **What comes back is data, not orders.** The AI is told that email, web pages and documents from a connector are untrusted and that it must never send or delete anything unless you asked for exactly that.
|
|
262
|
+
- A connector that stops working shows why; it is started again on the next use. Friend does not wait for connectors when it starts.
|
|
263
|
+
- Turning one off removes its tools at once. Removing deletes its saved secrets.
|
|
264
|
+
|
|
265
|
+
**The AI can manage connectors too.** Ask it to "connect X", "switch Gmail off", "reload Chrome control" or "remove it". Adding or switching on shows the same PIN card with the exact program; turning off and reloading need nothing; removing asks. Opt-in live check of the real chrome-control: `FRIEND_LIVE_CHROME=1 pnpm exec vitest run packages/server/src/connectors/live.test.ts`.
|
|
266
|
+
|
|
267
|
+
## The AI writes its own skills and plugins
|
|
268
|
+
|
|
269
|
+
When it notices something you repeat, the AI may suggest a **skill** (instructions it loads later) or a **plugin tool** (a small python, node or shell program that runs in the code sandbox: no network, no access to your files, approval on every call). If you agree it calls `plugins.create`: the approval card shows **everything it wrote, untruncated**, and needs your PIN. It is then checked like any plugin, switched on and loaded straight away (`plugins.reload` re-reads everything; the Plugins panel has a **Reload plugins** button too). Creating the same id again installs a newer version. The AI can also list, switch off or on, and delete plugins.
|
|
270
|
+
|
|
271
|
+
## A screen that lays itself out
|
|
272
|
+
|
|
273
|
+
The assistant says what each thing on the screen is for (the main thing, what goes beside it, small values to keep in view, a passing note, an urgent alert) and Friend places it for the screen you are using: desktop, tablet or phone. Finished cards shrink into small chips along the top and come back with a tap. A bundled Screen design skill teaches the assistant the principles. See [docs/guides/screen-director.md](docs/guides/screen-director.md).
|
|
274
|
+
|
|
275
|
+
## Skills from GitHub
|
|
276
|
+
|
|
277
|
+
Give Friend a GitHub link and say "install this": for example `https://github.com/lemomo-ai/lemo-opuscar.git`. It works like a person would. It looks at the repository, **reads the README and the docs**, tells you in plain words what the project is, what it will take and what it will leave out and why, and asks only when it cannot tell. Then you read the source and the **full text of every skill** on the approval card and enter your PIN. Skills from Claude Code plugins are imported as they are; slash commands and sub-agents become skills (`cmd-…`, `agent-…`). You can also add a **marketplace** (a repository with `.claude-plugin/marketplace.json`) and install from it by name. Afterwards Friend writes a note in its memory saying which skills it has and what each is for, and the Plugins screen shows where each one came from.
|
|
278
|
+
|
|
279
|
+
Safety: it reads only github.com, api.github.com and raw.githubusercontent.com, never more than 60 files or 2 MB at a time. Everything in the repository is treated as outside text and never as instructions. Hooks are never installed. If the README asks for a command (`npm install`, a setup script), Friend tells you what it is, where it comes from and what it could do, and runs it only through the normal command approval, which is never skipped for such a command and shows "follows text from github.com/…" with warnings for the risky shapes (download and run, `sudo`, deleting folders, the registry). See [docs/guides/plugins-from-github.md](docs/guides/plugins-from-github.md).
|
|
280
|
+
|
|
281
|
+
## Commands
|
|
282
|
+
|
|
283
|
+
`/help` opens the list of every command with what it does.
|
|
284
|
+
|
|
285
|
+
## On-screen status, clock and settings
|
|
286
|
+
|
|
287
|
+
- **Status line (bottom-left):** always shows what Friend is doing in plain words: Ready, Listening, Understanding what you said, Thinking, Getting the weather for Pune, Creating a view, Running a command, Answering, Waiting for your approval, Reconnecting. It never shows command text or arguments.
|
|
288
|
+
- **Clock (bottom-right):** a small date and time, so the screen is never empty.
|
|
289
|
+
- **Settings (Esc, then Settings):** change the model provider (Claude subscription through Claude Code, Claude API key, or local Ollama), the model names, the fallback, the Ollama address, and the voice options without the terminal. A change is used straight away (no restart) except the speaking voice and listening model. Saving needs your PIN. The API key is write-only: it is never sent back to the screen. Network address, folders and safety rules are deliberately not in this screen; use `friend config set` for those.
|
|
290
|
+
- **Slash commands:** type `/` in the message bar for a list that narrows as you type (arrows or Tab to pick, Enter to run): /settings, /plugins, /voice, /camera on|off, /mute, /unmute, /quiet, /speak, /clear, /status, /logout, /lock, /help. They run on the screen and never go to the AI, so they work instantly and even when the model is down. Start a line with // to send a message that begins with a slash.
|
|
291
|
+
- **PIN with the keyboard:** wherever a PIN is asked for, type the digits, Backspace to correct, Enter to confirm (Enter never deletes your voice; that needs a click). The on-screen keys still work for touch.
|
|
292
|
+
- **The AI knows the screen:** its instructions include a layout guide (what is always on screen, the five regions, how to compose one answer, how long things should stay), and every request tells it what is on screen, where, for how long, and which regions are free. If it puts something on top of another object or over the captions, status line or clock, Friend moves it to a free spot (or the tidy auto grid) and tells it why, so it learns within the conversation. Nothing is refused.
|
|
293
|
+
- **Voice presence look (Settings, tab "Voice presence", or `/look`):** the settings dialog is wide and has tabs: *Model*, *Voice* and *Voice presence*. On the last one you choose a **theme** (Aurora, Ocean, Ember, Violet storm, Matrix, Rose, Ghost) with one click, or set everything yourself: the **shape** (sphere, orb, ring), the **colour** (swatches or any colour), **brightness**, **size**, how strongly it **reacts to the voice**, the soft **glow** behind everything, whether the live **captions** show and how big they are, and the **view**. A live preview shows the result before you save. Saving a change of look needs **no PIN**, and every open screen changes at once. *Let the AI change the shape, colour and brightness to suit a topic* can be switched off to keep exactly the look you chose (you can still ask it "make it purple" yourself). Pressing the colour box also works; the colour must be a plain #rrggbb.
|
|
294
|
+
- **Views and panels:** Esc, then **View** (or `/view minimal|companion|workspace`, or Settings) chooses how much is on the screen besides the AI's pictures. *Minimal*: only the voice presence (this hides the status line and the clock too; the Esc menu's View button never switches to it by accident, only Settings or `/view minimal` do, and Friend tells you once when the view is Minimal). *Companion*: plus the status line and clock. *Workspace*: also a **Chat** panel (what was said and answered, with a box to type in) and a **Schedule** panel (open tasks and reminders, soonest first, late ones in red). Turn any panel on or off from the Esc menu or with `/chat`, `/tasks`. **Drag a panel by its title bar** (or the status line and clock anywhere on them) to move it; arrow keys nudge it, double-click puts it back, `/layout reset` puts all back. Panels remember their place in this browser. Changing the view starts from that view's own set of panels.
|
|
295
|
+
- **The AI can change settings too:** ask it to switch the model, the fallback or the voice options, or to show a cleaner or fuller screen. Changing settings is a PIN-approval action (the same card as for any risky action); changing only the view needs no PIN. It can never change the API key or the Claude Code command (those stay on the settings screen), and a change of model takes effect after its current reply. The AI is also told which panels you have open and keeps its pictures out of their way.
|
|
296
|
+
|
|
297
|
+
## Voice (local, optional)
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
pnpm friend voice setup # one time: private Python environment + speech models (about 250 MB)
|
|
301
|
+
pnpm friend start # starts the speech engine too
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Hold **Space** (or long-press the screen) and speak; release to send. Friend answers in captions and aloud, and the sphere follows the real audio. Pressing Space while it talks interrupts it. Typed messages are answered silently.
|
|
305
|
+
|
|
306
|
+
- **Female or male voice.** Twelve voices to choose from, six female and six male, American, British and Scottish (Amy, Kristin, Hannah, Jenny, Alba, Kathleen; Ryan, Joe, Norman, Henry, Alan, Tom), plus the original voice (Lessac), which stays the default until you choose. You are asked at `friend setup` ("female or male") and again at `friend voice setup` (a number, `female` or `male`; or skip the question with `--female`, `--male` or `--voice jenny`). `friend voice list` shows them. Later, in **Settings, Voice tab**, pick one from the list and press **Hear it** to listen before you decide; the change needs no restart: the voice loads in the background (the first time a voice is used it downloads about 60 MB, then it works offline), you get a message when it is ready, and if it cannot be loaded Friend goes back to the previous voice instead of going silent. Any other Piper voice works too: `friend voice setup --voice hi_IN-pratham-medium`.
|
|
307
|
+
- Everything runs on your PC: speech to text with faster-whisper, text to speech with Piper. Recordings are never stored or sent anywhere else.
|
|
308
|
+
- Needs Python 3.10 or newer. `friend voice status` shows the state; `friend config set voice.sttModel small` (or `voice.language hi`, `voice.enabled false`) changes it, then run `friend voice setup` again for new models. The speaking voice is chosen as described above.
|
|
309
|
+
- Recordings are limited to 90 seconds and 4 MB. While Friend is busy with a request, a new recording is refused (409) instead of being dropped silently. Emergency lock also cancels a recording that is still being transcribed.
|
|
310
|
+
- The browser needs microphone permission and a secure origin (localhost, or HTTPS through your domain).
|
|
311
|
+
- **Until you enroll your voice, anyone who can press Space on a logged-in browser speaks as you.** The PIN still guards risky actions.
|
|
312
|
+
|
|
313
|
+
### Only your voice commands Friend (speaker verification)
|
|
314
|
+
|
|
315
|
+
Press **Esc** (or long-press the top-left corner), choose **Enroll my voice**, read the phrases aloud and enter your PIN. Friend keeps only an averaged 256-number voiceprint, encrypted on disk (AES-256-GCM, key in `voice.key` next to the database). Recordings are never kept. After that every spoken request is scored against your voiceprint:
|
|
316
|
+
|
|
317
|
+
| Match | What happens |
|
|
318
|
+
|---|---|
|
|
319
|
+
| Your voice (0.72 or higher) | Runs as you, as before. |
|
|
320
|
+
| Close, or too short to tell (0.58 to 0.72) | Nothing runs. A card asks "Was that you?"; the right PIN runs the words, a wrong PIN (3 tries), Dismiss or 60 seconds drops them. |
|
|
321
|
+
| Another voice (below 0.58) | A guest: polite answer, no tools, none of your conversation or screen, nothing saved. You get a warning with what was said. |
|
|
322
|
+
|
|
323
|
+
- `friend voice status` shows whether a voice is enrolled; `friend voice forget` deletes it after the PIN (so does the enrollment panel). `friend config set voice.accept 0.75` and `voice.challenge 0.6` tune the two thresholds.
|
|
324
|
+
- **Family voices.** Once your own voice is saved, press **Esc**, then **Family voices**, to add your wife, son, daughter or anyone at home (up to eight people). Hand the device to them: they read a few sentences, you enter your PIN. From then on Friend knows who is talking, calls them by name, and keeps a short conversation with each of them. A recognized person can chat, get help, ask for the weather and have pictures shown. They cannot use your PC, files, camera, messages, settings, notes or schedule, never see your private things, and nothing they say is stored or logged. If two voices sound too alike to tell apart, Friend asks for your PIN instead of guessing. You can remove a person any time (PIN needed).
|
|
325
|
+
- Emergency lock drops any pending challenge and any enrollment in progress.
|
|
326
|
+
- A voice match is a convenience, not a lock: a recording or a cloned voice can fool any speaker model. That is why a borderline match needs the PIN and risky actions always ask for it.
|
|
327
|
+
- Python tests for the speech engine: `cd packages/voice && python -m venv .venv && .venv/Scripts/pip install -e .[dev] && .venv/Scripts/python -m pytest`.
|
|
328
|
+
|
|
329
|
+
## Hindi, Marathi and English together
|
|
330
|
+
|
|
331
|
+
Speak or type in English, Hindi, Marathi, or a mix of them in one sentence ("आज का weather बताओ"). Friend answers in the language you used.
|
|
332
|
+
|
|
333
|
+
- **Understanding you.** Leave `voice.language` empty so each request is understood in the language you spoke. When it hears Hindi or Marathi it listens a second time with a hint that writes those in Devanagari and keeps English words in Latin letters. The default listening model (`base`) mishears Hindi and Marathi a lot: use `friend config set voice.sttModel small` (about 460 MB, a bit slower), run `friend voice setup` once, and restart.
|
|
334
|
+
- **Answering you.** The assistant is told to write Hindi and Marathi in Devanagari and English in Latin letters. Friend then says each piece with the right voice: Hindi with `voice.hindiVoice` (Priyamvada by default, or Pratham or Rohan), Marathi with `voice.marathiVoice`, English words with your main voice. Hindi or Marathi is told apart by the words used. The first time a voice is used it downloads about 64 MB (Settings → Voice picks them and starts the download). If one cannot be loaded, the main voice reads that language instead of staying silent.
|
|
335
|
+
- **Typed text** works the same: Devanagari in, Devanagari out, spoken with the Hindi or Marathi voice. Roman-letter Hindi ("kya haal hai") is understood by the model but is read by the English voice, so ask for Devanagari when you want it spoken well.
|
|
336
|
+
- Notes: the Hindi voices Priyamvada and Pratham are free for personal use but not for commercial use. A small local model (Ollama) writes Hindi and especially Marathi much worse than Claude does.
|
|
337
|
+
- Other languages are not set up with voices yet: the assistant may answer in them, but they are spoken by the English voice.
|
|
338
|
+
|
|
339
|
+
## Your screen: it knows what it draws on, and you can keep widgets
|
|
340
|
+
|
|
341
|
+
- **Friend knows the screen.** Your browser tells Friend the size and kind of its screen (phone, tablet or desktop, portrait or landscape) when it connects and whenever you resize or turn it. The assistant lays things out for that screen: on a phone it shows one or two short pictures in a column, on a wide desktop it uses the whole stage. It also knows which view you chose and which pictures and widgets are showing.
|
|
342
|
+
- **Temporary pictures and widgets.** What Friend shows while it works is temporary: it takes it off the screen when the task is done, and the screen goes back to how you keep it. To keep something, press the pin on its corner, or ask "keep this on screen". A pinned widget is a widget: it stays across refreshes, signing out and in, and restarts, in the place you gave it. "Clear the screen" leaves your widgets alone; the **×** on a widget removes it for good (the assistant never removes or unpins your widgets unless you ask).
|
|
343
|
+
- **Move and resize.** On a computer or tablet, drag an object by the bar at its top and resize it by its bottom-right corner (or focus the bar and use the arrow keys; hold Shift to resize). Objects stay inside the part of the screen that is free of the menu, captions, status line and clock.
|
|
344
|
+
- **The profile badge.** A shield in the corner shows your name (`friend config set ownerName "Your name"`, or Settings → Voice presence) while you are signed in. When Friend recognizes a family member's voice the badge shows their name; an unrecognized voice shows Guest. Drag it where you like; it is hidden in the Minimal view.
|
|
345
|
+
|
|
346
|
+
## Showing files, and looking at its own screen
|
|
347
|
+
|
|
348
|
+
- **Widgets.** Besides card, stat, gauge, list, table, code, chart, timeline, graph and sandbox, Friend can show **markdown** (formatted text with tables), **progress** bars, **checklists**, **key-value** lists, a **countdown**, **image**, **video** (sound too), **pdf** and a **gallery** of pictures and clips. A **group** puts several of them into one object (a dashboard) and **tabs** put several views into one, so it does not need a card per fact.
|
|
349
|
+
- **Your files.** Ask "show me C:\\Users\\me\\Pictures\\trip.jpg" or "open my notes.md". Friend shows images and GIFs, video and sound, PDFs, Markdown, text, CSV (as a table) and code. **Every file needs your PIN**, and the approval card shows the full path. The file is served only to your signed-in browser, under a random address; nothing inside Friend's own data folder can be shown. A web address can never be used as a picture or clip, so a page or file cannot make Friend send data out through an image link.
|
|
350
|
+
- **Looking at its own screen.** The assistant can take a picture of the Friend screen to check its layout, **after you enter the PIN**, with no plugin and no screen-sharing prompt. It needs a model that can see pictures. Sandbox pages, video and PDFs appear empty in that picture. Pictures are never kept in the conversation.
|
|
351
|
+
- **The assistant has a manual for the screen.** It can read it any time (the `stage.guide` tool): every widget with its props, how to arrange them, the theme, files and ready recipes. It also knows what to do when the screen already has things on it: a short explanation goes **on top** as an overlay (it floats over a dimmed screen, moves nothing underneath, and leaves by itself after 30 seconds, or when you click away); something **important** clears the screen first (your pinned widgets stay) and is shown alone; a new topic replaces the old one; more of the same topic updates what is there.
|
|
352
|
+
- **The theme.** Friend is a HUD: a near-black blue background, glass panels with a thin glowing edge, one accent colour, small letter-spaced labels and monospace numbers. The assistant is told the exact colours and your current accent, and the pages it draws in a sandbox use your colours automatically (`var(--accent)`, `var(--ink)` and so on).
|
|
353
|
+
|
|
354
|
+
## Telegram, WhatsApp and SMS (plugins)
|
|
355
|
+
|
|
356
|
+
These are **plugins**: Esc → **Plugins**. **Telegram** and **WhatsApp and SMS (Twilio)** are listed under *Available*; press **Install** (PIN). Once installed they move to *Installed* with **Configure** (the steps left, and the form for the token, numbers and linking), **Turn on / Turn off** and **Remove** (which forgets the tokens). You can also just ask Friend: "set up Telegram for me". It can install the plugin (you approve with your PIN), tell you exactly which step is next, set what is not secret (a phone number, the on/off switch) and open the Configure page on your screen. A token or password is only ever typed by you, on that page. Two things come out of it: you can **talk to Friend from your phone**, and Friend can **message people for you and read their replies**.
|
|
357
|
+
|
|
358
|
+
- **Telegram** needs no public address. Create a bot with **@BotFather** (`/newbot`), paste the token, switch it on and save. Then press **Get a link code** (needs your PIN) and send `/link CODE` to your bot from your own Telegram. That chat is now yours: what you write there is answered like on your PC, in the same chat.
|
|
359
|
+
- **SMS and WhatsApp** use one **Twilio** account (account SID, auth token, your Twilio SMS number and WhatsApp sender, and your own phone number). Twilio delivers incoming messages to `https://your-public-address/api/channels/twilio` (set it in Twilio as the "a message comes in" webhook, HTTP POST), so Friend needs a public address (`friend config set publicUrl https://…`). Every request is checked against Twilio's signature, and a message Twilio sends twice is run once.
|
|
360
|
+
- **Who counts as you.** Only your linked Telegram chat and your own phone number. Everyone else who writes to your bot or number goes to an **inbox** as untrusted mail: nothing runs, nothing is answered, you get a notice on the screen, and you can ask Friend "did anyone reply?" (it reads them as data, never as instructions).
|
|
361
|
+
- **Sending.** "Message Anu on WhatsApp that I am late" uses the same approval rule as everything else (Settings → Approvals): in **manual** you read the recipient and the text and approve; in **auto** it goes without asking. Risky actions asked for from a phone are still decided on the PC.
|
|
362
|
+
- **Safe by design.** Tokens are write-only (never shown again, never sent to the screen), the AI cannot change channel settings, one sender cannot flood you (limits per sender and per minute), and a link code works once, for ten minutes, and dies after five wrong guesses. Calls are not built yet.
|
|
363
|
+
|
|
364
|
+
## Portfolio and brokers (Zerodha)
|
|
365
|
+
|
|
366
|
+
A plugin: Esc → **Plugins** → **Zerodha** → **Install** (PIN) → **Configure**. Friend reads your Zerodha account through Zerodha's Kite Connect API and answers "how is my portfolio doing?", on screen or by voice, or sends a **report** to Telegram or WhatsApp at the times you choose (for example 9:30 and 3:45 on weekdays). The full walk-through, including the first live login, is in [docs/guides/zerodha-setup.md](docs/guides/zerodha-setup.md).
|
|
367
|
+
|
|
368
|
+
- **Read only.** Friend can look at holdings, positions, funds and orders. It cannot place, change or cancel orders, never tells you what to buy or sell and never predicts prices. Settings → **Trading** shows *Read only*; the order levels are shown as "later version" and are locked. The assistant cannot change the broker settings or this level, even with your PIN.
|
|
369
|
+
- **Cost.** Nothing extra: no third-party service, Friend talks to Zerodha from your PC. Zerodha's free *Personal* API plan covers everything used here (live streaming and history are on their paid plan, which Friend does not need).
|
|
370
|
+
- **Login.** You sign in on Zerodha's own page, once a day (Zerodha ends the login about 6 am). Your password and 2FA never reach Friend. The API key and secret are write-only; the day's token is kept in a file only you can read. If the login has ended when a report is due, you get the login link on your phone instead, and the report follows once you sign in.
|
|
371
|
+
- **Reports.** Add them on the Configure page (PIN) or ask in chat. Currency sign and word, number format (en-IN, en-US, de-DE...), warning levels, cache time and limits are settings under Report options. Every figure is worked out by Friend from your account, never written by the AI model; a restart never sends one twice. Time zone, market-holiday dates and the login reminder (minutes before the first report) are on the same page. They are also settings: `brokers.timezone`, `brokers.skipDates`, `brokers.loginReminderMinutes`, and `trading.level` (only `read`), all changed from the Settings screen.
|
|
372
|
+
- **Privacy.** The figures you ask about pass through the AI model you chose (Claude from Anthropic, or Ollama on this PC); a report goes to the messaging app you pick (Telegram or WhatsApp). The audit log records that a report was made, never the amounts.
|
|
373
|
+
- **More brokers.** A broker is one file implementing the `BrokerProvider` contract plus the shared contract tests (`runBrokerContract`); reports, tools and screens do not change.
|
|
374
|
+
|
|
375
|
+
## Alexa (plugin)
|
|
376
|
+
|
|
377
|
+
A plugin: Esc → **Plugins** → **Alexa** → **Install** (PIN) → **Configure**. You make a small private skill in your own Amazon developer account (free, left in development mode, never published) and Friend is its server, so "Alexa, ask jarvis assistant how my portfolio is" is answered by Friend, aloud and on the Friend screen if one is open. No AWS account and no paid plan. The full walk-through is in [docs/guides/alexa-setup.md](docs/guides/alexa-setup.md).
|
|
378
|
+
|
|
379
|
+
- **What it does.** Fixed questions (portfolio, weather, tasks, status) are answered straight from Friend's tools. Open questions go to the assistant: start with one of about 30 words ("how", "what", "tell me", "remind me", "can you", "find", "check", "explain", "calculate", "translate"...) and then say anything. By voice the assistant can look things up, answer questions and add reminders; anything beyond that (messages, files, commands, settings, email) is refused or asked on your phone first. English (India) and Hindi (India); Marathi is not available on Alexa.
|
|
380
|
+
- **What it cannot do.** Alexa cannot make an Echo speak on its own (use an Alexa Routine for a scheduled spoken report), and a slow answer is held ("Still working. Ask me if it is ready.") because Alexa waits only about 8 seconds.
|
|
381
|
+
- **Safe by design.** Every request is checked as really from Amazon (certificate, signature, 150-second timestamp), for your skill, from an Echo you allowed with your PIN. The voice can only read: anything that would ask you is sent to your Telegram or WhatsApp for a YES (or skipped), and anything needing your PIN is refused. The assistant cannot change Alexa settings.
|
|
382
|
+
- **Configurable.** Skill name, languages, answer and permission times, request and Echo limits, and extra tools a voice may use are settings on the Configure page (Advanced), with safe ranges; nothing is tied to one person's setup.
|
|
383
|
+
- **Setup.** Friend needs a public HTTPS address with a real certificate (`friend config set publicUrl https://your-address`). The Configure page shows the endpoint, lets you download the skill files (manifest and English and Hindi models) to paste into the console, and lists your Echo devices. If your address changes later, paste the new endpoint into the console again; nothing else changes.
|
|
384
|
+
|
|
385
|
+
## Music player and screen widgets
|
|
386
|
+
|
|
387
|
+
Friend's screen has a media player and four widgets drawn in a HUD style (angled corners, thin lines, your accent colour): a **profile** tag, a **date and time**, **quick-launch buttons** and the **music player**. Esc → **Settings** → **Widgets** (PIN) sets them all.
|
|
388
|
+
|
|
389
|
+
- **Music.** Pick a folder on the PC that runs Friend (sub-folders are searched; the folder is checked when you save). Friend reads the tags and cover art from the files (free, no account) and plays them in the browser, with a playlist, shuffle, repeat, volume and search. The file types, the most tracks, how deep to search, the start volume, repeat, shuffle and the moving bars are all settings. Files are only read from inside the folder; links that point out of it are not followed.
|
|
390
|
+
- **Spotify (plugin).** Connect your own Spotify account with OAuth (Plugins → Spotify): the assistant and the player can then search and play from it next to your folder, and the player's Library tab gets a Spotify choice. You sign in on Spotify's own page; Friend never sees your password. Playing needs Spotify Premium on your account and a free app of your own at developer.spotify.com (the guide walks through it: [docs/guides/spotify-setup.md](docs/guides/spotify-setup.md)). Any plan or approval a service asks for is on your own account; Friend never pays for or shares one. JioSaavn is not supported: it has no public API and its policy forbids unlicensed access.
|
|
391
|
+
- **SoundCloud (plugin).** The same for your own SoundCloud account (Plugins → SoundCloud): you register a free app of your own (SoundCloud decides who gets one), paste its client id and secret (the secret is write-only), and sign in on SoundCloud's own page. Tracks stream through Friend to the screen, or play from the PC through mpv. See `docs/guides/soundcloud-setup.md`.
|
|
392
|
+
- **Files and pictures to your Telegram or WhatsApp.** Ask Friend to send you a photo, a clip, a song or a document that is on the PC (`message.send_file`). You approve every file after seeing its name, every time. Telegram takes up to 50 MB; WhatsApp up to 16 MB and needs Friend's public address (Twilio fetches the file from a link that works for ten minutes). Only to you, never as SMS; programs (.exe, scripts) and Friend's own data folder are never sent.
|
|
393
|
+
- **Voice messages in Telegram and WhatsApp.** Send Friend a voice message from your own linked Telegram chat or your own WhatsApp number and it is understood and answered like a typed one (the reply starts with what it heard). It uses the same voice engine as the PC microphone, so that must be running; if not, you are told. Up to 5 minutes or 8 MB; from anyone else voice messages are ignored.
|
|
394
|
+
- **Audius (plugin).** Free music from Audius, an open music service: no account, no key, no payment. Install it from Plugins and switch it on; the assistant and the player can then search and play it, on the screen or from the PC. See `docs/guides/audius-setup.md`.
|
|
395
|
+
- **Web video (plugin).** Ask Friend to play a video or a song from YouTube or almost any video site: "play lofi hip hop on YouTube", or give it a link. It plays inside Friend, in a card on your Friend screen (a browser, also a phone) or in a window on the PC, as you choose in the plugin's Configure page; Friend can pause, jump to a time, change the volume and stop it, and it never opens YouTube in your Chrome. **Nothing to install**: when you turn the plugin on, Friend downloads the two free programs it needs (**yt-dlp** and **ffmpeg**) by itself from their projects' own release pages, checks them against the published checksums, keeps them in its own folder and keeps yt-dlp up to date. (**mpv** is optional, for a window of its own on the PC; without it a browser window is used.) Safety: only public http and https links, never an address on your own network, a limit on length and an optional list of allowed sites; nothing is saved to your disk. See [docs/guides/web-video.md](docs/guides/web-video.md).
|
|
396
|
+
- **Play from the PC's speakers.** Settings → Widgets → *Where the sound comes out*: the screen's browser (default) or the PC that runs Friend, with no browser open. The folder's music is played by mpv (free; "Check mpv" finds it or shows the install command for your system) and Spotify on a Spotify device you name. The screen then shows what the PC plays and controls it. See [docs/guides/host-output.md](docs/guides/host-output.md).
|
|
397
|
+
- **Control by the assistant.** Say or type "play something by ...", "next", "turn it down", "shuffle", "what's playing". The assistant can play, pause, skip, seek, change volume, shuffle, repeat and edit the queue, and search the library; it cannot change the folder or any widget setting. Over Alexa the music tools are off unless you add them to the voice tools yourself.
|
|
398
|
+
- **Quick launch.** Up to 12 buttons, each opening an address (http or https only), asking the assistant something, opening a panel (chat, tasks, plugins, settings, music) or controlling the music.
|
|
399
|
+
- **Date and time, profile.** 12 or 24 hour, with or without seconds, in any date language; the profile tag shows the assistant's name, a label you choose, and who Friend is talking to.
|
|
400
|
+
- **Animations.** Tabs slide and light up on hover, ripple and flicker "ENGAGED" when pressed; while music plays the dial's needle sweeps, the bars follow the sound and the cover turns. Settings → Animations can reduce them or turn them off, and the device's own "reduce motion" is always respected. Esc → Music and Quick launch hide or show them; `/music` and `/launcher` do the same.
|
|
401
|
+
|
|
402
|
+
## The orbital screen (a heads-up display)
|
|
403
|
+
|
|
404
|
+
Settings -> Widgets -> **Screen layout** switches between **Classic** (the orb with floating cards, the default) and **Orbital**: a clear centre with the orb and a ring of 60 segments that fills with today's usage compared with your busiest day of the last 30, an **orbit** of hexagon nodes (your quick-launch buttons) with data flowing along the links, and live instruments around the edge, each with its own shape and motion.
|
|
405
|
+
|
|
406
|
+
- **Instruments.** System (processor and memory on an arc gauge), Voice (sound bars), Network (speed on a pulse line, or "n/a" on a PC that reports none), Activity (the conversation and what Friend is doing, like a terminal), Devices (a radar of this screen, the PC's agent and the voice; an offline one is dim), Tickets and Budget (empty until hired workers exist) and Approvals (an orange octagon with the PIN pad when one is needed; the old approval card is not drawn as well). The usage ring is the centre; the top bar carries the name, status and time.
|
|
407
|
+
- **Click or tap** any instrument to open it large in the middle; Esc, a click outside or the x closes it. Tab and Enter work too. A click on an orbit node runs that quick-launch button.
|
|
408
|
+
- **Density.** *Calm* (orb, orbit, usage ring and message bar), *Standard*, or *Full*; each instrument also has its own switch. An approval that is waiting is always shown.
|
|
409
|
+
- **A clean home screen, and the assistant brings up what you ask for.** The orb, the orbit of workers and buttons, the clock, the budget ring and the usage line are always there. The six live instruments (system, voice, network, activity, devices, tickets) are not on the screen until Friend brings them up (say "show my system" or "how is the network"), and it puts them away when you ask, or when it clears the screen (`stage.widget`, and `stage.clear` clears them too). They are drawn with the Jarvis components and stay live; **click one** for a bigger view with the basic details and a plain-words explanation (Esc or a click outside closes it). Settings → Widgets still lets you tick an instrument to keep it on the screen always; the approvals box shows only when something waits, unless you tick it.
|
|
410
|
+
- **Sample data.** Until hired workers exist most of the right side is dim and empty. Settings -> Widgets -> *Show sample data* fills it with the approved design's example workers, tickets, budget, feed and approval so you can see the whole look; it is labelled SAMPLE DATA, never mixed with real data, and a real approval always takes over.
|
|
411
|
+
- **Motion.** Settings -> Animations (Full, Reduced, Off) and the device's own "reduce motion" stop every loop; the loops also pause while the tab is hidden. On a phone the orbit becomes a row of chips and the instruments scroll in a strip.
|
|
412
|
+
- The assistant cannot change these settings, even with your PIN (they are on the owner's settings screen only).
|
|
413
|
+
## The Office (hired workers)
|
|
414
|
+
|
|
415
|
+
The Office lets Friend hire **workers**: separate Claude Code sessions that work in your project folders, one ticket at a time, while you keep talking to Friend. It is off until you switch it on, and nothing in it is preset: the roles, projects, limits and rules are all **settings** (Settings -> **Office**, saved with your PIN; the assistant itself cannot change them).
|
|
416
|
+
|
|
417
|
+
- **Set up.** Turn the Office on, add a **project** (a folder, and one line about its goal) and a **role** (an id, a title, optional model and the instructions that worker always starts with; a few starter roles are only editable data, delete or change them). Then ask Friend: "hire a builder on my site project and have them fix the login bug".
|
|
418
|
+
- **How much Friend decides.** Settings -> Office -> *How much Friend decides*. When a worker asks to do something (run a command, change a file), **Low** (the default) asks you for everything not on your let-through list, **Medium** lets Friend answer the ordinary requests and still asks you, with your PIN, about dangerous ones (deleting, installing, force pushes), and **High** lets Friend answer all of them. Whatever the level, a path outside the project folders, the files that control a worker and the commands you list under *Always refuse* are refused, and every answer Friend gives is written to the worker's feed and the audit log. Only you can change this level, on the settings screen; Friend cannot change it for itself.
|
|
419
|
+
- **Tools Friend uses.** `office.status` (workers, tickets, the subscription window), `office.hire`, `office.assign` (give a ticket and start it), `office.say` (a message to a worker), `office.review` (accept a finished ticket or send it back), `office.close` (close a stale or answered ticket with a reason), `office.tidy` (a worker writes where its work stands into `OFFICE_NOTES.md` and its next ticket starts a clean session; you can also press Tidy up on the worker's screen, and Settings → Office sets the context window and when the assistant is reminded) and `office.stop` (one worker or all). Text a worker writes is shown to Friend as untrusted data, never as instructions.
|
|
420
|
+
- **Approvals.** A worker that wants to do something risky asks through Friend's own approval card (the orange octagon on the orbital screen, the card in the classic one), showing the whole command. A path outside the project's folders, and any command that matches one of your **Always refuse** patterns, is refused without asking. Tools on your **Let through without asking** list go ahead inside the folders; everything else asks, and a command that looks dangerous needs your PIN. An unanswered card counts as a no. There is no "always allow" for a worker's question.
|
|
421
|
+
- **Limits.** *Most workers at once* (the others queue), a token limit per worker and in total, a start timeout, and **Pause at N% of the five-hour window**: when your Claude subscription window is that full, workers wait until it resets (0 = never pause). Workers share your Claude subscription with Friend itself, using the program and model chosen under Model.
|
|
422
|
+
- **On the orbital screen** the workers are the orbit nodes (a "+" hires one), Tickets and Budget show the real tickets and token limits, the Activity feed shows what the workers do, and the usage ring shows the real five-hour window with the time it resets. Click a worker to see its live feed, **Stop** it or say something to it. Stop, switching the Office off and closing Friend all end every worker process.
|
|
423
|
+
- **Team.** The **TEAM** button under the name in the middle opens the team as a graph drawn with the Jarvis components: the assistant on the left, each worker to the right of its manager. Friend decides the jobs and who reports to whom when he hires.
|
|
424
|
+
- **Sessions.** A worker keeps its memory between tickets (its Claude Code session is resumed); the process itself ends after each ticket.
|
|
425
|
+
|
|
426
|
+
## Drawing with the Jarvis components
|
|
427
|
+
|
|
428
|
+
Besides the simple widgets, Every component of the Jarvis HUD library that is safe to draw (stat cards, gauges, bar, line and donut charts, tables, status pills, node graphs, tabs and about forty more) is an object type of its own, by its own name (`JStatCard`, `JGaugeChart`, `JTable`, ...), in the same list as the basic widgets, and the best looking: Friend picks them first. Parts inside a card go in `kids` and `slots`; it is data, never code. Every component and prop is checked against an allow-list before it is drawn, so nothing can run or restyle the screen. `stage.guide` lists the components for him.
|
|
429
|
+
|
|
430
|
+
## Presentations: it makes a deck and presents it live
|
|
431
|
+
|
|
432
|
+
Say "make a presentation on hacking". The assistant writes a whole deck (slides, each with items that appear one by one, a spoken line for every item, and an animation per item), saves it, and can present it on your screen: each item appears with its animation and is spoken, slide after slide, like a teacher in class. It does not call the model while a slide plays, so playing is fast and costs nothing extra.
|
|
433
|
+
|
|
434
|
+
- **Talk while it presents.** Speak or type and it stops where it is (the speech stops at once). The assistant answers, then says "continue" and the interrupted item is said again from its start. If you stay silent after the answer, it goes on by itself after a while: `voice.resumeSilenceSeconds` (default 20; `0` means it always waits until you say continue). Settings: Voice.
|
|
435
|
+
- **Controls.** A small bar on the slide: previous, pause or continue, next, stop, and "3 / 12". By voice: "next slide", "go back", "go to slide 5", "stop".
|
|
436
|
+
- **Limits.** Up to 40 slides. How many items fit a slide depends on the layout (5 bullets on a bullets slide, 1 on a visual slide, 8 in two columns); a bigger slide is refused with "split it in two". A spoken line is at most 400 characters.
|
|
437
|
+
- **Items** are text (a heading, a bullet or a quote) or any picture the stage can draw: chart, table, stat, graph, timeline, code, the Jarvis components. Animations: fade, slide-left, slide-up, grow, type, draw, none; people who ask for less motion see no animation.
|
|
438
|
+
- **Edit it.** "Add a slide on phishing", "change slide 3", "move slide 5 to the start". `deck.list` and `deck.show` read saved decks.
|
|
439
|
+
- **Export.** "Save it as a PowerPoint" or "as a web page". A `.pptx` opens and edits in PowerPoint, Keynote or Google Slides (titles, points, tables, and the notes and spoken lines in each slide's notes; animations are not carried over). A `.html` is one file that plays alone in any browser with the same reveals and animations, and shows the spoken lines as captions. Both go to `Presentations` in your first workspace folder, and saving asks you first.
|
|
440
|
+
- Only the owner makes, changes, presents and deletes decks. A pending approval card pauses the presentation and it goes on afterwards. Without a voice it only shows the items, for the time it takes to read them.
|
|
441
|
+
|
|
442
|
+
## Pictures first: weather, stats and graphics
|
|
443
|
+
|
|
444
|
+
Friend is meant to show answers, not only say them. It controls the whole screen and picks the object that fits (gauge, chart, table, timeline, graph, or its own animated page).
|
|
445
|
+
|
|
446
|
+
- **Weather:** "what is the weather in Pune?" gets live data from Open-Meteo (no account or key) and puts temperature, humidity, wind and a 24-hour chart on screen.
|
|
447
|
+
- **Computer stats:** "how is my computer doing?" puts CPU load, memory and disk gauges, uptime and CPU on screen.
|
|
448
|
+
- For these two, Friend calls the tools **itself** as soon as the request is clear (a named city, or a computer word plus a status word), so the graphs appear immediately even with a small local model; the model then only says a short summary. Asked together, both sets stay on screen. Anything else is decided by the model, which is told never to invent numbers and never to announce an action without doing it (if a small model does, Friend asks it once to actually call the tool).
|
|
449
|
+
|
|
450
|
+
## Voice replies
|
|
451
|
+
|
|
452
|
+
Friend answers aloud to **both** spoken and typed messages (`friend config set voice.speakTyped false` to keep typed ones silent). The voice follows the text: each sentence is spoken as soon as it is written, and code blocks are never read aloud.
|
|
453
|
+
|
|
454
|
+
Browsers keep sound blocked until the page has had a click, tap or key press. Friend unlocks sound on the first one anywhere on the page, and shows a one-time hint if sound is still blocked. Needs `friend voice setup` once, and a restart of `friend start` afterwards.
|
|
455
|
+
|
|
456
|
+
## Memory
|
|
457
|
+
|
|
458
|
+
Friend keeps what it knows about you as a **tree of small Markdown notes** in your data folder (`memory/`), not one long list. There is one entry point, `memory/INDEX.md`, and every folder has its own `INDEX.md` that lists what is inside. The program fixes no branch names: Friend makes the folders it wants (`family/`, `projects/friend/`, `trading/`, and deeper as a topic grows) and keeps every folder listed from the root, so everything can be found by walking down from the entry point.
|
|
459
|
+
|
|
460
|
+
- **What Friend reads.** Only the root index goes into each prompt (a few hundred tokens, however much memory there is). Friend opens a branch with `memory.read` when a question needs it, and finds notes by words with `memory.search`.
|
|
461
|
+
- **What Friend writes.** `memory.write` (a note at a path it chooses, folders made as needed), `memory.move` (group notes into sub-folders when a folder gets crowded) and `memory.forget`. A quick fact with no clear place goes to `inbox/` with `memory.remember`. Notes are short; a long one or a crowded folder is flagged so Friend splits it. A note is at most 6,000 characters, a path at most 6 folders deep, up to 2,000 notes.
|
|
462
|
+
- **Saving by itself.** Friend does not rely on remembering to call a memory tool. Once you have been quiet for a while (2 minutes by default, or after 8 turns in a row), a separate pass reads what was said, with the memory index and a few related notes, and decides what is worth keeping: facts you stated about yourself, family, work and habits, decisions, corrections, commitments and where your projects stand. Small talk, one-off questions, things easy to look up and anything from web pages or workers' reports is not kept. The pass prefers updating a related note over making a new one; when unsure it uses `inbox/`. The program, not the model, decides what is written: it checks every path, never keeps anything that looks like a password, PIN, key, card number or code, saves at most 6 notes per pass, and refuses an update that would shrink a note to almost nothing. A short line on screen says what was remembered ("Remembered: family/priya.md"), and every save is in the audit log. The very first time, it starts from the moment it is switched on, so an old conversation is not mined.
|
|
463
|
+
- **Kept in order by the AI.** Quick notes land in `inbox/`; a tidy pass (a little after Friend starts, after saving, or when you say "tidy my memory") lets the model file them into topic folders (`family/`, `work/`, `projects/friend/`, `preferences/` and so on, whatever the notes call for), give each a short title and a one-line summary, merge notes about the same subject, and link related notes to each other. A note's header lists the notes it relates to (`related: family/sarika.md`) and the page shows them as links under "Related". The model proposes; the program checks every path, keeps all text, and moves things through the tree so the indexes stay right. A link follows its note when the note moves and drops when the note is deleted.
|
|
464
|
+
- **Your control.** The notes are plain files: open and edit them with any editor, and a note you drop in by hand is listed the next time Friend starts. In the terminal: `friend memory list` (the tree), `friend memory show <path>`, `friend memory forget <path or number>` and `friend memory clear` (asks for the PIN). You can also say "forget what you know about Priya".
|
|
465
|
+
- **Your older notes.** The first time the tree starts, your older flat notes are copied once into `inbox/`; the old list is left untouched.
|
|
466
|
+
- **Settings** (Esc → Settings → **Memory**; changed by you with your PIN, never by Friend): `memory.enabled` (off means the older flat list of the 20 newest notes), `memory.maxIndexChars` (how much of the root index is shown every turn), `memory.autoSave` (`on` by default, or `off`), `memory.showSaved` (the "Remembered" line), `memory.autoTidy` (the tidy pass, on by default) and `memory.saveDelaySec` (how long you must be quiet before the pass runs, 10 to 3600 seconds).
|
|
467
|
+
- **Safety.** Notes are **data about you, never instructions**: text inside a note (or text a web page tricked the agent into saving) cannot change a setting or start work. Guests and unrecognized voices never see your notes. Friend never follows a link out of the folder, and is told never to save passwords, PINs or keys.
|
|
468
|
+
|
|
469
|
+
Next: a Memory screen to browse and edit notes, and a heartbeat that can start a conversation (see `docs/superpowers/specs/2026-10-24-friend-memory-and-heartbeat-design.md`).
|
|
470
|
+
|
|
471
|
+
## Heartbeat: Friend speaking first
|
|
472
|
+
|
|
473
|
+
Esc → Settings → **Heartbeat** (set with your PIN; **off** by default). Today Friend only answers; with the heartbeat on it can start the conversation when it has something worth saying.
|
|
474
|
+
|
|
475
|
+
- **How it decides.** A quiet check runs every minute and costs nothing: it looks for a reason (code only, no model). Only when it finds one, and your limits allow, Friend asks the model once whether to say anything and what. The model has no tools: it can only choose words, which are shown on the screen (and aloud or on your phone if you allowed it). It never cuts in while you are talking or while Friend is busy, and what it said is added to the conversation so your answer has its context.
|
|
476
|
+
- **Levels.** *Low*: only about what you asked for (a task more than two hours overdue). *Medium*: also a morning check-in (what is due today, your Office), an evening check-in, and a word about a memory note dated today or tomorrow. *High*: also a gentle check-in after a long silence (8 hours by default, in waking hours).
|
|
477
|
+
- **Limits.** Quiet hours (22:00 to 07:00 by default: no contact at all), at most 6 contacts a day, at least 30 minutes between two, the morning and evening times, and whether to speak aloud (off by default) or message your phone when no screen is open (needs Telegram linked). Each reason is dealt with once, even across restarts (`proactive.json` in the data folder), and what was already said today is told to the model so it does not repeat itself.
|
|
478
|
+
- **Control and audit.** Only you can change these settings, not Friend. Every contact and every "nothing worth saying" is in the audit log (`proactive.spoke`, `proactive.quiet`).
|
|
479
|
+
|
|
480
|
+
## Plugins
|
|
481
|
+
|
|
482
|
+
**Day trader (India)** is a bundled plugin with ten skills (focus list, scan for setups, news, entry, exit, budget, risk, replay, analyst, smart money) and an exact sizing tool (`trade-plan`). It reads Indian market data through three built-in tools, `market.get` (candles, quotes, NSE announcements, results, insider trades, bulk and block deals, shareholding, top movers, most active, volume spurts), `market.scan` (finds opening-range breakouts and bounces across the market and ranks them) and `market.replay` (replays the rest of the session from the stock's own recent candles). Both use free public feeds (Yahoo Finance and the NSE, no key), follow the Web switch, and work in IST and rupees. Your limits (max loss, money, leverage) are asked each session, never assumed. It is analysis only: it never places an order, you place it in your broker app.
|
|
483
|
+
|
|
484
|
+
Plugins add **skills** (instructions the agent loads when they fit, for example "write my stand-up") and **tools** (small programs the agent can call, for example an exact unit converter). Three examples are bundled in `plugins/`: `unit-converter`, `standup-writer`, `rubber-duck`.
|
|
485
|
+
|
|
486
|
+
- Manage them from the screen (Esc, then **Plugins**) or the terminal: `friend plugin catalog | list | install <name|folder> | enable <id> | disable <id> | remove <id>`.
|
|
487
|
+
- **Installing shows what is inside and needs your confirmation (the PIN in the browser).** Switching a plugin on needs the PIN too; switching off and removing do not.
|
|
488
|
+
- A plugin's tools can never be more powerful than the code sandbox: they run in the same sandbox as the code the agent writes (a throwaway Docker container when Docker works, otherwise the sandbox built into Friend; no network, no access to your files, time and memory limits), get their arguments as `/work/args.json`, and **ask for your approval on every call**. Skills are text only: they give the model words, never power, and cannot override your rules or the approval system.
|
|
489
|
+
- Plugins are validated strictly (lowercase ids, size and file-count limits, no links, every file must be inside the plugin folder) and re-validated each time Friend loads; a broken plugin is switched off with a visible reason.
|
|
490
|
+
- Make your own: a folder with `plugin.json` plus the files it names, then `friend plugin install ./my-plugin`. See `docs/superpowers/specs/2026-10-08-friend-plugins-design.md` for the format. Downloading plugins from the internet is deliberately not supported yet (it needs signed packages to be safe).
|
|
491
|
+
|
|
492
|
+
## Running code safely
|
|
493
|
+
|
|
494
|
+
The agent can write a program (Python, Node or shell), run it, and read the result: calculations, data crunching, quick experiments. **Nothing needs to be installed**: Friend has its own sandbox. If you have Docker, Friend can use that instead (a real container, a real shell). The setting `codeRunner` chooses: `auto` (the default: Docker when it is installed and running, otherwise the built-in sandbox), `sandbox` or `docker`. The result tells the agent (and the log) which one ran. With `auto`, if Docker is installed but not running, the run goes to the built-in sandbox instead and the result says so; set `codeRunner` to `docker` if you never want that.
|
|
495
|
+
|
|
496
|
+
Every run asks for your approval, and the card shows the **whole program**.
|
|
497
|
+
|
|
498
|
+
**The built-in sandbox** runs each program in its own, fresh, locked-down Node.js process (Node's permission model: no reading files outside Friend's own program folders, no starting other programs, no threads, a neutral environment (no user name, home folder or PATH of yours), the network switched off (TCP, UDP and DNS), 512 MB of memory, killed at the time limit):
|
|
499
|
+
|
|
500
|
+
- **JavaScript** runs in QuickJS: plain JavaScript with `console.log` and `readFile(name)` for the files it was given. No `require`, no `fetch`, no `process`.
|
|
501
|
+
- **Python** runs in Pyodide: the standard library only (no numpy or pandas). Start-up takes about a second.
|
|
502
|
+
- **Shell** runs in an emulated bash (just-bash) over an in-memory folder: pipes, redirections, loops and a fixed set of commands (`grep`, `sed`, `awk`, `sort`, `wc`, `tr`, `jq`, and more). It is not a real shell: a script that needs `curl`, `git` or a compiler stops with a message naming the command. Use Docker for those.
|
|
503
|
+
- Files: a program sees only its own code and the files it was handed, in memory. Nothing is kept between runs.
|
|
504
|
+
- Needs Node.js 20.19 or newer for the shell part (the permission feature comes with Node 20 and later).
|
|
505
|
+
|
|
506
|
+
`pnpm test` runs hostile programs against the built-in sandbox in every language (reading the data folder and the environment, network attempts, endless loops, endless output, memory hogs) and confirms each is stopped and the next run still works.
|
|
507
|
+
|
|
508
|
+
**With Docker** (`codeRunner: docker`, or `auto` when Docker is running), each run is its own throwaway container:
|
|
509
|
+
|
|
510
|
+
- `--network none`: no internet and no DNS; it cannot send anything anywhere.
|
|
511
|
+
- It sees none of your files: only its own code is mounted, read-only. The root filesystem is read-only; only a 64 MB scratch `/tmp` is writable.
|
|
512
|
+
- Not root (user 65534), all capabilities dropped, `no-new-privileges`, 512 MB memory (no swap), 1 CPU, at most 128 processes.
|
|
513
|
+
- A time limit (10 s by default, 60 s at most); after that the container is killed and removed. Output is cut at 20,000 characters.
|
|
514
|
+
- The first use of each language downloads a small image (about 50 MB), so that one run needs internet; after that it works offline. [Docker Desktop](https://www.docker.com/products/docker-desktop/) is needed on Windows and Mac (Windows Sandbox is not needed, so Windows Home works); on Linux, Docker Engine.
|
|
515
|
+
|
|
516
|
+
The Docker tests include a check against real containers that runs hostile code (network attempts, writes outside `/tmp`, memory hog, endless loop, fork bomb) and confirms each is stopped.
|
|
517
|
+
|
|
518
|
+
## Free-form pages (sandbox)
|
|
519
|
+
|
|
520
|
+
When none of the standard objects fits, the agent can draw its own small page on the stage: a custom visualization, a calculator, a timer, a game. It is HTML, CSS and JavaScript written inline (up to 100,000 characters) and runs in an isolated frame:
|
|
521
|
+
|
|
522
|
+
- `sandbox="allow-scripts"` without `allow-same-origin`, so the page has an empty origin: it cannot read your session, storage or the app, cannot call Friend's APIs, navigate the window, open popups or submit forms.
|
|
523
|
+
- A fixed Content-Security-Policy placed before anything the agent wrote: `default-src 'none'` (no network of any kind, no external scripts, fonts or frames), inline script and style only, images only as `data:` URLs.
|
|
524
|
+
- The app never listens for messages from the frame, and every object has a dismiss (×) button.
|
|
525
|
+
- Checked in a real browser: the demo's page tries `fetch`, `parent.document` and `localStorage` and reports each as blocked (`pnpm demo`, fifth message).
|
|
526
|
+
|
|
527
|
+
## Tasks and reminders
|
|
528
|
+
|
|
529
|
+
Say "remind me in 30 minutes to call the bank", "remind me tomorrow at 5pm to send the report", "every Monday at 9 remind me to back up" (hourly, daily or weekly repeats), or just "add milk to my list". "What is on my list?" shows your open tasks; "done with 3" or "remove 4" tidies up.
|
|
530
|
+
|
|
531
|
+
- A **heartbeat** inside the server checks every 15 seconds. When a reminder is due, an alert appears, a red card shows on the stage for 90 seconds and Friend says it aloud (when voice is set up).
|
|
532
|
+
- A reminder **only notifies you**. It never starts a conversation with the model and never runs a command on its own, so nothing happens on your PC while you are away.
|
|
533
|
+
- If no screen is open (or Friend is mid-conversation) the reminder waits and is shown as soon as you are back. A repeating task skips any slots it missed instead of replaying them.
|
|
534
|
+
- Times need no special format: Friend knows your local time and converts. Up to 200 open tasks.
|
|
535
|
+
|
|
536
|
+
## Camera (owner-controlled)
|
|
537
|
+
|
|
538
|
+
Ask "what is this?" while you hold something up to the camera, and Friend can look. It works one picture at a time:
|
|
539
|
+
|
|
540
|
+
1. The camera is **off** until you turn it on: press **Esc**, choose **Camera: off** (it becomes **Camera: on**). The switch is not remembered; a reload turns it off again.
|
|
541
|
+
2. When the agent wants to look it calls `camera.snap` (one picture) or `camera.watch` (a few seconds, up to 12 pictures), and an approval card appears: "Take one picture with the camera and show it to the AI model". There is no "Always allow" for the camera. The one exception is the eye (below).
|
|
542
|
+
3. After you approve, the browser opens the camera, takes one frame (JPEG, longest side 1024 px), closes the camera and uploads the frame. While the camera is open a red **Camera on** badge with a small live preview shows in the corner; the agent cannot hide it.
|
|
543
|
+
|
|
544
|
+
- The picture is shown to the model for that turn only. It is never written to disk, never saved in the conversation history (history keeps "[camera picture, not kept]"), and the audit log records only its size. Guests can never use the camera.
|
|
545
|
+
- Emergency lock, logout, switching the camera off, or closing the page cancels a pending request and releases the camera.
|
|
546
|
+
- **With Claude as the provider the picture is sent to Anthropic's API.** With Ollama it stays on your PC, but only a vision model can use it: `ollama pull llava` (or another vision model), then `friend config set ollama.model llava` and `friend config set ollama.vision true`. Note a vision model may not support tools, so Claude is the practical choice today. Without vision the tool says so before it asks you.
|
|
547
|
+
- Like the microphone, the camera needs `localhost` or HTTPS.
|
|
548
|
+
- Text inside a picture is treated as data, never as instructions.
|
|
549
|
+
|
|
550
|
+
### The eye: letting Friend look by itself
|
|
551
|
+
|
|
552
|
+
If you do not want to approve every look, switch **the eye** on (Esc → Settings → Approvals → The eye; it needs your PIN). While it is on, Friend uses the camera whenever it needs to see, and when in doubt, without a card. It is deliberately narrow:
|
|
553
|
+
|
|
554
|
+
- **Only you, at the screen.** It works for what you type or say to Friend on its own screen. A message from Telegram or WhatsApp, a voice from Alexa, a guest, a household member, the Office workers and scheduled tasks can never make it look: those keep asking.
|
|
555
|
+
- **Off by default, and it switches itself off:** after the minutes you chose (`eye.autoOffMinutes`, default 120, 0 = never), when you sign out, and whenever Friend starts again. Closing it needs no PIN. The AI cannot switch it on or change it.
|
|
556
|
+
- **Limits you cannot raise:** 20 looks and 30 seconds of video per hour without a card, 10 seconds and 12 pictures per clip; after that the card comes back.
|
|
557
|
+
- **Always visible:** the red camera badge shows whenever the camera is open. Every look is written in the audit log (when, how, from where), never the picture.
|
|
558
|
+
- **Nothing is kept.** Pictures are seen once and thrown away; only text notes (such as "Priya visited at 4 pm") stay.
|
|
559
|
+
- **Where pictures go:** to the AI model you chose. With Claude (API or Claude Code) a picture is sent to Anthropic; with a local Ollama vision model it stays on this PC.
|
|
560
|
+
|
|
561
|
+
### People Friend remembers
|
|
562
|
+
|
|
563
|
+
Say "this is Priya, my sister" while she is in front of the camera, and Friend asks for your PIN, takes one look (it must show exactly one face) and remembers her. What is kept is **128 numbers about the face, encrypted on this PC** (like your keys), never a picture. After that, when Friend looks and Priya is there, it is told "Recognised: Priya (sister)". Faces nobody introduced are never saved and never named; the assistant is only told "1 person I do not know".
|
|
564
|
+
|
|
565
|
+
- Settings → Approvals → *People Friend remembers* lists everyone, with **Remove** for one person and **Forget everyone** (both need your PIN and delete the numbers and the notes about them). Up to 50 people.
|
|
566
|
+
- Introducing, removing and forgetting work only at the Friend screen.
|
|
567
|
+
- Recognition is a hint, never proof: a photo or a look-alike can fool it, so a face never approves anything and never replaces your PIN. The models are YuNet (MIT) and SFace (Apache 2.0), run in your browser, with no internet needed; their licences are in `web/models` in the package.
|
|
568
|
+
- Face data is sensitive personal data (India's DPDP Act, the EU's GDPR). Introduce only people who know and agree, and not children.
|
|
569
|
+
|
|
570
|
+
## Safety model
|
|
571
|
+
|
|
572
|
+
- Reading is free, writing inside your workspace is free, shell commands ask first, destructive commands ask and need your PIN.
|
|
573
|
+
- Approval cards and the PIN pad are drawn by the client, never by the agent.
|
|
574
|
+
- Everything the agent does is written to the audit log.
|
|
575
|
+
|
|
576
|
+
## Another port, and other devices on your network
|
|
577
|
+
|
|
578
|
+
By default Friend is reachable only on this PC, at http://127.0.0.1:8787.
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
pnpm friend lan # shows how it is set up and the addresses
|
|
582
|
+
pnpm friend lan on # also reachable from phones and other PCs on your network
|
|
583
|
+
pnpm friend lan on --https # the same, with a secure address so a phone can use the microphone
|
|
584
|
+
pnpm friend lan https on # (or off) only the secure address
|
|
585
|
+
pnpm friend lan on --port 9100 # the same, on another port
|
|
586
|
+
pnpm friend lan port 9100 # change only the port
|
|
587
|
+
pnpm friend lan off # this PC only again
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
Restart `friend start` afterwards. It then prints the addresses, for example `Also on your network: http://192.168.1.20:9100`; open that on the other device and sign in. Things to know:
|
|
591
|
+
|
|
592
|
+
- Anyone on the network can open the sign-in page. The password and PIN still guard everything, so use a strong password. Creating the owner account is only possible on this PC.
|
|
593
|
+
- Over plain http other people on the network could read the connection. Use it on a network you trust, turn on the secure address (below), or put Friend behind your own HTTPS (`publicUrl`, below).
|
|
594
|
+
- **Browsers allow the microphone and camera only on localhost or HTTPS.** Over plain http on a phone you can type and read, but not talk. Run `friend lan https on` and restart: Friend makes its own certificate and serves `https://192.168.x.x:8787`. The first time, the phone warns that the certificate is not from a known authority (Android Chrome: Advanced, Proceed; iPhone Safari: Show Details, visit this website). After that the microphone works. The warning appears because the certificate is Friend's own, not bought from an authority; the traffic is still encrypted.
|
|
595
|
+
- **On a phone** the screen shows a round microphone button (hold it and let go to send, or tap once to start and again to send), a keyboard button and a menu button. There is no Space or Esc to press.
|
|
596
|
+
- Windows asks once whether to let Node.js through the firewall: allow it on *Private* networks.
|
|
597
|
+
- To open it by a name (`http://my-pc:9100`) add the name: `friend config set allowedHosts my-pc`.
|
|
598
|
+
|
|
599
|
+
## Using your own domain later
|
|
600
|
+
|
|
601
|
+
Run Friend behind a reverse proxy (for example Caddy) and set:
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
friend config set publicUrl https://friend.example.com
|
|
605
|
+
friend config set trustProxy true
|
|
606
|
+
friend config set allowedOrigins https://friend.example.com
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
Login, PIN, rate limits and lockout stay on in every mode. Phones need HTTPS to use the microphone and camera in later phases, which the domain setup provides.
|
|
610
|
+
|
|
611
|
+
## Tests
|
|
612
|
+
|
|
613
|
+
```bash
|
|
614
|
+
pnpm test # all packages
|
|
615
|
+
pnpm typecheck
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
`scripts/smoke.md` lists the manual end-to-end checks and their last results.
|