Skip to content

Commit 8a13a94

Browse files
Merge pull request #3781 from opral/agent/real-cobras-deny-1764806472768
real-cobras-deny-1764806472768
2 parents b17a5a3 + 05cad68 commit 8a13a94

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

packages/lix/docs/src/docs/comparison-to-git.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The fundamental difference between Git and Lix:
99

1010
Git tracks text line-by-line. Lix is schema-aware - it understands data structure. This means tracking specific fields (price, email, status) instead of arbitrary line numbers.
1111

12-
| Git | Lix |
13-
| :--------------- | :--------------------------- |
14-
| Line-based diffs | Schema-aware change tracking |
15-
| CLI tool | Embeddable SDK |
16-
| Text files | Any file format via plugins |
12+
| Git | Lix |
13+
| :--------------- | :-------------------------- |
14+
| Source code | Any file format |
15+
| Line-based diffs | Schema-aware diffs |
16+
| CLI tool | SDK |
1717

1818
## When to Use Git vs Lix
1919

packages/lix/docs/src/docs/filesystem.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,9 @@
22

33
Lix provides a filesystem with files and directories. Files contain binary data that [plugins](/docs/plugins) process to detect changes.
44

5-
## Path Requirements
6-
7-
Paths must be normalized before use:
8-
9-
- **NFC-normalized** Unicode strings
10-
- **Slash-prefixed** (e.g., `/config.json`)
11-
- **No relative segments** (`.` or `..`)
12-
- **No backslashes** or invalid percent-encoding
13-
- **File paths**: No trailing slash (e.g., `/dir/file.json`)
14-
- **Directory paths**: Trailing slash required (e.g., `/dir/`)
15-
16-
Use the exported helpers to normalize paths:
17-
18-
```ts
19-
import {
20-
normalizeFilePath,
21-
normalizeDirectoryPath,
22-
normalizePathSegment,
23-
} from "@lix-js/sdk";
24-
25-
const filePath = normalizeFilePath("/config.json");
26-
const dirPath = normalizeDirectoryPath("/configs/");
27-
const segment = normalizePathSegment("my-file");
28-
```
29-
305
## Files
316

32-
### Adding Files
7+
### Write files
338

349
```ts
3510
await lix.db
@@ -45,7 +20,7 @@ await lix.db
4520

4621
**Path collision detection:** Inserting a file will fail if a directory already exists at that path.
4722

48-
### Reading Files
23+
### Read files
4924

5025
#### Current State
5126

@@ -94,7 +69,7 @@ const history = await lix.db
9469

9570
See [History](/docs/history) for more details.
9671

97-
### Updating Files
72+
### Update files
9873

9974
```ts
10075
await lix.db
@@ -108,13 +83,13 @@ await lix.db
10883

10984
When you update a file, [plugins](/docs/plugins) automatically detect changes and create entity records.
11085

111-
### Deleting Files
86+
### Delete files
11287

11388
```ts
11489
await lix.db.deleteFrom("file").where("path", "=", "/config.json").execute();
11590
```
11691

117-
### File Metadata
92+
### Metadata
11893

11994
Add application-specific data using [metadata](/docs/metadata):
12095

@@ -212,6 +187,31 @@ The `file.data` column is not stored directly. It's materialized from [plugin](/
212187

213188
This design enables schema-aware change tracking while still providing direct file access.
214189

190+
## Path Requirements
191+
192+
Paths must be normalized before use:
193+
194+
- **NFC-normalized** Unicode strings
195+
- **Slash-prefixed** (e.g., `/config.json`)
196+
- **No relative segments** (`.` or `..`)
197+
- **No backslashes** or invalid percent-encoding
198+
- **File paths**: No trailing slash (e.g., `/dir/file.json`)
199+
- **Directory paths**: Trailing slash required (e.g., `/dir/`)
200+
201+
Use the exported helpers to normalize paths:
202+
203+
```ts
204+
import {
205+
normalizeFilePath,
206+
normalizeDirectoryPath,
207+
normalizePathSegment,
208+
} from "@lix-js/sdk";
209+
210+
const filePath = normalizeFilePath("/config.json");
211+
const dirPath = normalizeDirectoryPath("/configs/");
212+
const segment = normalizePathSegment("my-file");
213+
```
214+
215215
## See Also
216216

217217
- [Plugins](/docs/plugins) - How plugins process files to detect changes

packages/lix/docs/src/docs/getting-started.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { PackageManagerTabs } from "@theme";
55

66
# Getting Started
77

8-
Lix tracks changes at the entity level using SQLite and a commit graph. [Plugins](/docs/plugins) define what constitutes an entity for each file format.
9-
108
## Install
119

1210
<PackageManagerTabs command="install @lix-js/sdk @lix-js/plugin-json" />

0 commit comments

Comments
 (0)