Skip to content

Commit 369552d

Browse files
committed
improvements to docs
1 parent a7a6995 commit 369552d

21 files changed

+41
-62
lines changed

docs/astro.config.mjs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ export default defineConfig({
6464
},
6565
{
6666
label: "Commands",
67-
autogenerate: { directory: "commands" },
67+
items: [
68+
{ label: "init", slug: "commands/init" },
69+
{ label: "rename", slug: "commands/rename" },
70+
{ label: "plan", slug: "commands/plan" },
71+
{ label: "apply", slug: "commands/apply" },
72+
{ label: "dry-run", slug: "commands/dry-run" },
73+
{ label: "status", slug: "commands/status" },
74+
{ label: "history", slug: "commands/history" },
75+
{ label: "undo", slug: "commands/undo" },
76+
{ label: "redo", slug: "commands/redo" },
77+
],
6878
},
6979
{
7080
label: "Examples",
@@ -76,9 +86,7 @@ export default defineConfig({
7686
},
7787
{
7888
label: "VS Code Extension",
79-
items: [
80-
{ label: "Overview", slug: "vscode/overview" },
81-
],
89+
items: [{ label: "Overview", slug: "vscode/overview" }],
8290
},
8391
{
8492
label: "Reference",

docs/src/content/docs/commands/apply.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: apply
2+
title: refaktor apply
33
description: Execute a previously generated refactoring plan
44
---
55

6-
# refaktor apply
7-
86
The `apply` command executes a previously generated plan, making all the planned changes to your codebase atomically.
97

108
## Usage
@@ -272,4 +270,4 @@ For simpler cases, consider using `refaktor rename` which combines planning and
272270
```bash
273271
# This does plan + apply in one step with confirmation
274272
refaktor rename old_name new_name --preview table --commit
275-
```
273+
```

docs/src/content/docs/commands/dry-run.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: dry-run
2+
title: refaktor dry-run
33
description: Preview changes without saving a plan file
44
---
55

6-
# refaktor dry-run
7-
86
The `dry-run` command is an alias for `plan --dry-run`. It shows what would be changed without creating a plan file.
97

108
## Usage
@@ -46,4 +44,4 @@ refaktor dry-run old_name new_name --preview-format diff
4644

4745
- **No files created** - Doesn't create `.refaktor/plan.json`
4846
- **Fast exploration** - Quick way to understand impact
49-
- **Safe testing** - No risk of accidentally applying changes
47+
- **Safe testing** - No risk of accidentally applying changes

docs/src/content/docs/commands/history.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: history
2+
title: refaktor history
33
description: View refactoring operation history
44
---
55

6-
# refaktor history
7-
86
The `history` command shows all previous refactoring operations with their details.
97

108
## Usage
@@ -39,4 +37,4 @@ Files renamed: 5
3937
Backup location: .refaktor/backups/a3b7c9d4e8f2a6b1/
4038
```
4139

42-
Use the Operation ID with `undo` or `redo` commands.
40+
Use the Operation ID with `undo` or `redo` commands.

docs/src/content/docs/commands/init.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: init
2+
title: refaktor init
33
description: Initialize Refaktor ignore settings
44
---
55

6-
# refaktor init
7-
86
The `init` command adds `.refaktor/` to ignore files to prevent tracking of Refaktor's workspace files.
97

108
## Usage
@@ -74,4 +72,4 @@ The `.refaktor/` directory contains:
7472
- **Backups**: Complete backups of modified files
7573
- **History**: `history.json` with operation records
7674

77-
These are workspace files that shouldn't be committed to version control.
75+
These are workspace files that shouldn't be committed to version control.

docs/src/content/docs/commands/plan.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: plan
2+
title: refaktor plan
33
description: Generate a detailed refactoring plan without modifying files
44
---
55

6-
# refaktor plan
7-
86
The `plan` command generates a detailed plan of all changes that will be made without modifying any files. This is the first step in Refaktor's two-phase workflow.
97

108
## Usage
@@ -253,4 +251,4 @@ Running `plan` again will overwrite the existing plan file.
253251
For large codebases:
254252
- Use specific `--include` patterns to limit scope
255253
- Use `--exclude` to skip large directories like `node_modules/`
256-
- Consider using `-u` flags judiciously to include necessary ignored files
254+
- Consider using `-u` flags judiciously to include necessary ignored files

docs/src/content/docs/commands/redo.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: redo
2+
title: refaktor redo
33
description: Re-apply a previously undone refactoring operation
44
---
55

6-
# refaktor redo
7-
86
The `redo` command re-applies a refactoring that was previously undone.
97

108
## Usage
@@ -29,4 +27,4 @@ refaktor redo abc123-20241201-143022
2927

3028
## How It Works
3129

32-
Re-applies the original refactoring operation using the stored plan data.
30+
Re-applies the original refactoring operation using the stored plan data.

docs/src/content/docs/commands/rename.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: rename
2+
title: refaktor rename
33
description: Fast-path command that combines planning and applying with confirmation
44
---
55

6-
# refaktor rename
7-
86
The `rename` command is the fastest way to refactor your codebase. It combines planning and applying in a single interactive command with preview and confirmation.
97

108
## Usage
@@ -171,4 +169,4 @@ The `rename` command includes all of Refaktor's safety features:
171169
- `0` - Success
172170
- `1` - Conflicts detected (use `--force-with-conflicts` to override)
173171
- `2` - Invalid input or arguments
174-
- `3` - Internal error or system issue
172+
- `3` - Internal error or system issue

docs/src/content/docs/commands/status.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: status
2+
title: refaktor status
33
description: Show current refactoring status
4-
---
5-
6-
# refaktor status
4+
---
75

86
The `status` command displays information about the current state of refactoring operations.
97

@@ -36,4 +34,4 @@ $ refaktor status
3634
📚 Recent operations:
3735
a3b7c9d4e8f2a6b1 Applied (1734567800)
3836
7f3a2b5c9d1e8f4a Undone (1734567600)
39-
```
37+
```

docs/src/content/docs/commands/undo.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
---
2-
title: undo
2+
title: refaktor undo
33
description: Revert a previously applied refactoring operation
44
---
55

6-
# refaktor undo
7-
86
The `undo` command reverts a previously applied refactoring using the backup system.
97

108
## Usage
@@ -39,4 +37,4 @@ refaktor undo abc123-20241201-143022
3937

4038
- Uses the same atomic operations as apply
4139
- Verifies backup integrity before restoration
42-
- Can be undone with `refaktor redo`
40+
- Can be undone with `refaktor redo`

0 commit comments

Comments
 (0)