Skip to content

Commit f36d04e

Browse files
authored
docs(cli): clarify that 'mempalace init' requires <dir> (#210) (#862)
Fixes #210. The CLI requires a positional <dir> argument. Previous docs emphasized that init 'sets up ~/.mempalace/' which misled users into expecting no arguments. Now the docs show <dir> is required, offer '.' as the usage for the current directory, and reword the description so the project-directory scan is listed first.
1 parent ced1fc9 commit f36d04e

2 files changed

Lines changed: 24 additions & 12 deletions

File tree

website/guide/getting-started.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,20 @@ Three steps: **init**, **mine**, **search**.
3434

3535
### 1. Initialize Your Palace
3636

37+
`mempalace init` requires a project directory to scan. Pass a path,
38+
or `.` to use the current directory.
39+
3740
```bash
3841
mempalace init ~/projects/myapp
42+
# or, from inside the project:
43+
mempalace init .
3944
```
4045

4146
This scans your project directory and:
47+
4248
- Detects people and projects from file content
4349
- Creates rooms from your folder structure
44-
- Sets up `~/.mempalace/` config directory
50+
- Ensures the `~/.mempalace/` config directory exists
4551

4652
### 2. Mine Your Data
4753

website/reference/cli.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,29 @@ All commands accept `--palace <path>` to override the default palace location.
44

55
## `mempalace init`
66

7-
Detect rooms from your folder structure and set up the palace.
7+
Scan a project directory for people, projects, and rooms, and set up the palace.
88

99
```bash
10-
mempalace init <dir>
11-
mempalace init <dir> --yes # non-interactive mode
10+
mempalace init <dir> # <dir> is required
11+
mempalace init <dir> --yes # non-interactive mode
12+
mempalace init ~/projects/myapp # example
13+
mempalace init . # initialize from the current directory
1214
```
1315

14-
| Option | Description |
15-
|--------|-------------|
16-
| `<dir>` | Project directory to scan |
17-
| `--yes` | Auto-accept all detected entities |
16+
| Option | Description |
17+
|---------|------------------------------------------------------------------------------|
18+
| `<dir>` | **Required.** Project directory to scan. Pass `.` for the current directory. |
19+
| `--yes` | Auto-accept all detected entities |
1820

1921
What it does:
20-
1. Scans for people and projects in file content
21-
2. Detects rooms from folder structure
22-
3. Creates `~/.mempalace/` config directory
23-
4. Saves detected entities to `<dir>/entities.json`
22+
23+
1. Scans `<dir>` for people and projects in file content
24+
2. Detects rooms from `<dir>`'s folder structure
25+
3. Saves detected entities to `<dir>/entities.json`
26+
4. Ensures the global `~/.mempalace/` config directory exists
27+
28+
Running `mempalace init` with no argument will exit with
29+
`error: the following arguments are required: dir`.
2430

2531
## `mempalace mine`
2632

0 commit comments

Comments
 (0)