You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Context for AI assistants working on this repo.
6
6
7
7
**tb-solid-pod** is a browser-based personal data pod inspired by the [Solid Project](https://solidproject.org/), built with [TinyBase](https://tinybase.org/) for reactive state and LocalStorage. It is **not** a real Solid server (no LDP, no WebID-TLS); it simulates Solid-style data (personas, contacts, groups, type indexes, file metadata) in a single-page app.
-**Dual interface**: graphical UI (tabs, forms, lists) + CLI. The CLI runs in the **browser** (Terminal tab) and in **Node** (`npm run cli`); same commands, environment-specific persistence (LocalStorage vs `~/.tb-solid-pod/data/store.json`).
10
10
-**Data**: personas (WebID-style), contacts (including agents), groups (org/team/group) with membership of contacts and your personas, type indexes, virtual file system with metadata, settings/preferences.
@@ -73,8 +73,8 @@ When someone wants to use this in an app they’re working on, point them to the
73
73
74
74
## Useful docs
75
75
76
-
-**README.md** – Overview, limitations, Use as a library (Zod + JSON Schema), link to Integration Guide, Getting Started (Node note, Live demo + 404 troubleshooting), Testing (unit, BDD, Storybook link), CLI command list.
77
-
-**docs/INTEGRATION_GUIDE.md** – Step-by-step integration (install-from-GitHub vs copy-paste), store setup, Provider, components, CLI, data tables, extending.
76
+
-**README.md** – Overview, limitations, Use as a library (Zod + JSON Schema), link to Integration Guide, Getting Started (Node note, Live demo + 404 troubleshooting), Running the CLI in the terminal (`npm run cli`, exit, single-command mode), Testing (unit, BDD, Storybook link), CLI command list.
77
+
-**docs/INTEGRATION_GUIDE.md** – Step-by-step integration (install-from-GitHub vs copy-paste), store setup, Provider, components, CLI (browser + terminal), data tables, extending.
78
78
-**docs/SDLC_PROCESS.md** – How changes are introduced, documented, and verified; links to Feature Checklist.
79
79
-**docs/FEATURE_CHECKLIST.md** – Manual verification checklist ordered by dependency (foundational first); assume features are broken until verified.
80
80
-**docs/CODING_GUIDELINES.md** – TypeScript (strict types, no sloppy types), short functions, simple React components, naming, file length.
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -190,6 +190,19 @@ npm install
190
190
npm run dev
191
191
```
192
192
193
+
## Running the CLI in the terminal
194
+
195
+
You can run the same CLI from a **real terminal** (Node.js) as well as in the browser’s Terminal tab:
196
+
197
+
```bash
198
+
npm run cli
199
+
```
200
+
201
+
-**Interactive**: Full session with the same commands as the browser. Use **↑/↓** for command history and **Tab** for command-name completion.
202
+
-**Single command**: Pass the command as arguments; output is printed and the process exits. Example: `npm run cli -- help` or `npm run cli -- contact list`.
203
+
-**Data**: Stored in `~/.tb-solid-pod/data/store.json` (or set `TB_SOLID_POD_DATA_PATH` to a different path). Same store shape as the browser; data is not shared between browser and terminal unless you point both at the same file.
204
+
205
+
193
206
## CLI Commands
194
207
195
208
```
@@ -203,6 +216,7 @@ config list|get|set|reset
203
216
pwd|cd|ls|cat|touch|mkdir|rm File system operations
Copy file name to clipboardExpand all lines: docs/FEATURE_CHECKLIST.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,13 +54,15 @@ Must work to access features.
54
54
55
55
## Level 3: CLI Terminal
56
56
57
-
Required for CLI-based features.
57
+
Required for CLI-based features. The same CLI runs in the **browser** (Terminal tab) and in **Node** (`npm run cli`). BDD tests cover both (Scenario Outline: browser \| terminal).
58
58
59
59
-[x] CLI prompt accepts input
60
60
-[x]`help` command shows available commands
61
61
-[x]`clear` command clears terminal
62
62
-[x] Command history (up arrow) works
63
63
-[x] Unknown command shows error message
64
+
-[x]`exit` command quits Node CLI; in browser shows message that exit is terminal-only
65
+
-[x] In Node: `export` prints JSON; `export --download` writes file to cwd
64
66
65
67
---
66
68
@@ -269,7 +271,7 @@ Depends on: Personas, Type Indexes
269
271
270
272
### Unit Tests
271
273
-[x]`npm test` runs without errors
272
-
-[x]385+ tests passing
274
+
-[x]392+ tests passing
273
275
-[x] Coverage meets 80% threshold
274
276
275
277
### Storybook
@@ -280,10 +282,11 @@ Depends on: Personas, Type Indexes
280
282
-[x] FileMetadataPanel stories render
281
283
282
284
### BDD/E2E
283
-
-[x]`npm run test:e2e` runs (with dev server running)
285
+
-[x]`npm run test:e2e` runs (dev server required for browser scenarios; terminal scenarios run Node CLI)
284
286
-[x] App shell scenarios pass
285
-
-[x] CLI contact scenarios pass
286
-
-[x] CLI persona scenarios pass
287
+
-[x] CLI contact scenarios pass (browser and terminal)
288
+
-[x] CLI persona scenarios pass (browser and terminal)
289
+
-[x] CLI navigation scenarios pass (browser and terminal)
Copy file name to clipboardExpand all lines: docs/INTEGRATION_GUIDE.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This guide explains how to integrate **tb-solid-pod** into an application you are building. It is for developers who want to add Solid-style personas, contacts, groups, type indexes, or file metadata to their app, either by installing the package from GitHub or by copying source files.
4
4
5
-
**Terms:****TinyBase** is the reactive store and persistence library used by this project. **JSON-LD** (JavaScript Object Notation for Linked Data) is the data format used for personas, contacts, and groups. **CLI** (command-line interface) refers to the in-app terminal provided by the library.
5
+
**Terms:****TinyBase** is the reactive store and persistence library used by this project. **JSON-LD** (JavaScript Object Notation for Linked Data) is the data format used for personas, contacts, and groups. **CLI** (command-line interface) refers to the terminal provided by the library: in-app (browser Terminal tab) or Node (`npm run cli`).
6
6
7
7
## Two ways to integrate
8
8
@@ -223,7 +223,9 @@ Settings are stored in TinyBase **values** (not tables):
223
223
224
224
## Adding the CLI (Optional)
225
225
226
-
If you want the terminal interface:
226
+
The CLI runs in **two environments**: (1) in-app Terminal tab in the browser, and (2) from a real terminal (Node.js).
227
+
228
+
### In the browser
227
229
228
230
```tsx
229
231
import { CliTerminal } from'tb-solid-pod'; // or from your cli
@@ -237,6 +239,10 @@ import { CliTerminal } from 'tb-solid-pod'; // or from your cli
237
239
/>
238
240
```
239
241
242
+
### In the terminal (Node.js)
243
+
244
+
From the repo: `npm run cli`. Same commands as the browser. Data is stored in `~/.tb-solid-pod/data/store.json` (override with `TB_SOLID_POD_DATA_PATH`). Interactive mode supports **↑/↓** history and **Tab** completion for command names. Use **`exit`** to quit. **Export:**`export` prints JSON to the terminal; `export --download` writes a file to the current directory (Node has no clipboard). Single-command mode: `npm run cli -- help` or `npm run cli -- contact list`.
Copy file name to clipboardExpand all lines: docs/TEST_PLAN.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@
63
63
"test:run": "vitest run"
64
64
```
65
65
66
-
**Total: 385 tests passing**
66
+
**Total: 392 tests passing** (includes CLI registry test for exit command)
67
67
68
68
---
69
69
@@ -120,7 +120,7 @@
120
120
121
121
See [docs/testing/bdd-tests.md](testing/bdd-tests.md) for full details.
122
122
123
-
**Testing boundary:** The same doc defines [what is automated vs manual](testing/bdd-tests.md#testing-boundary-automated-vs-manual): app shell, tab navigation, Contacts/Personas UI, CLI help/clear/contact/persona are covered by BDD; CLI group/file/files/config/data/typeindex, Groups UI, forms, file browser, settings, export/import, and future features (pod connect, sync, ACL) are left for manual verification until scenarios are added.
123
+
**Testing boundary:** The same doc defines [what is automated vs manual](testing/bdd-tests.md#testing-boundary-automated-vs-manual): app shell, tab navigation, Contacts/Personas UI, CLI help/clear/contact/persona/navigation are covered by BDD in **both browser and terminal** (Scenario Outline); CLI group/file/files/config/data/typeindex, Groups UI, forms, file browser, settings, export/import, and future features (pod connect, sync, ACL) are left for manual verification until scenarios are added.
124
124
125
125
### npm Scripts Added
126
126
```json
@@ -147,7 +147,7 @@ See [docs/testing/bdd-tests.md](testing/bdd-tests.md) for full details.
147
147
148
148
## Verification Checklist
149
149
150
-
-[x]`npm test` - All unit tests pass (385 tests)
150
+
-[x]`npm test` - All unit tests pass (392 tests)
151
151
-[x]`npm run test:coverage` - Coverage meets 80% threshold
152
152
-[x]`npm run storybook` - All stories render without errors
153
153
-[ ]`npm run test:e2e` - All BDD scenarios pass (run with server on 5173; see docs/testing/bdd-tests.md)
Copy file name to clipboardExpand all lines: docs/USE_CASES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ You can use tb-solid-pod in three ways; the use cases below apply across them.
14
14
|----------|--------------|----------------|
15
15
|**Schemas only**| Zod schemas, factory functions, types, JSON Schema | You need the data shapes and validation; no UI or store layout required. |
16
16
|**Schemas + store**| Same as above, plus a TinyBase store with the expected tables and values | You want to read/write personas, contacts, groups, files, and settings in a standard layout. |
17
-
|**Schemas + store + components (and optionally CLI)**| Full UI: lists, forms, membership manager, file metadata panel, terminal| You want ready-made React components and/or the CLI for power users. |
17
+
|**Schemas + store + components (and optionally CLI)**| Full UI: lists, forms, membership manager, file metadata panel; CLI in browser (Terminal tab) or Node (`npm run cli`)| You want ready-made React components and/or the CLI for power users. |
18
18
19
19
Store setup and table layout are described in the [README Integration Guide](../README.md#integration-guide) and summarized in [Data tables](#data-tables) below.
Copy file name to clipboardExpand all lines: docs/testing/bdd-tests.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,10 @@ These are implemented in `tests/features/*.feature` and run with Playwright.
58
58
59
59
**Total:** Six feature files; scenarios above are the current automated boundary. The dev server must be running (see [Starting the app](#starting-the-app)); BDD does not start it.
60
60
61
+
### CLI in browser vs terminal (Scenario Outline)
62
+
63
+
The same CLI scenarios run **in the browser** (Terminal tab) and **in the terminal** (Node CLI spawned with piped stdin). One feature file per area (e.g. `cli-contacts.feature`) uses a **Scenario Outline** with `Examples: | context | browser | terminal |`. The step "Given I have the CLI in the <context>" either opens the Terminal tab (browser) or spawns `npx tsx src/cli/run-node.tsx` with a unique temp store path (terminal). "When I run the command" and "Then I should see ... in the output" branch on context. Run with the same command as other E2E: `npm run test:e2e` (dev server must be running for browser; terminal runs without it). In Node, `exit` quits the process; `export` prints JSON (or `--download` writes a file). See README and [INTEGRATION_GUIDE.md](../INTEGRATION_GUIDE.md) for full CLI usage.
64
+
61
65
### Not yet automated (manual verification)
62
66
63
67
These are either out of scope for the current BDD suite or not yet implemented as Gherkin scenarios. Verify them manually (or extend the feature files later).
0 commit comments