Skip to content

Commit 84bd790

Browse files
committed
docs: change README.md
1 parent c916a35 commit 84bd790

File tree

1 file changed

+43
-30
lines changed

1 file changed

+43
-30
lines changed

README.md

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
The `directus-sync` command-line interface (CLI) provides a set of tools for managing and synchronizing the schema and
44
collections within Directus across different environments.
55

6+
By leveraging Directus's REST API, it aligns closely with the native actions performed within the application, ensuring
7+
a high fidelity of operation.
8+
9+
Updates are granular, focusing on differential data changes rather than blunt table
10+
overwrites, which means only the necessary changes are applied, preserving the integrity and history of your data.
11+
12+
Moreover, `directus-sync` organizes backups into multiple files, significantly improving readability and making it
13+
easier to track and review changes. This thoughtful separation facilitates a smoother version control process, allowing
14+
for targeted updates and clearer oversight of your Directus configurations.
15+
616
# Usage
717

818
The CLI is available using the `npx` command.
@@ -13,36 +23,6 @@ npx directus-sync <command> [options]
1323

1424
Here's how to use each command in the CLI:
1525

16-
## Global Options
17-
18-
These options can be used with any command to configure the operation of `directus-sync`:
19-
20-
- `-d, --debug`
21-
Display additional logging information. Useful for debugging or verifying what `directus-sync` is doing under the
22-
hood.
23-
24-
- `-u, --directus-url <directusUrl>`
25-
Specify the Directus instance URL. Alternatively, set the `DIRECTUS_URL` environment variable.
26-
27-
- `-t, --directus-token <directusToken>`
28-
Provide the Directus access token. Alternatively, set the `DIRECTUS_TOKEN` environment variable.
29-
30-
- `--no-split`
31-
Indicates whether the schema snapshot should be split into multiple files. By default, snapshots are split.
32-
33-
- `--dump-path <dumpPath>`
34-
Set the base path for the dump. This must be an absolute path. The default
35-
is `"./directus-config"`.
36-
37-
- `--collections-path <collectionPath>`
38-
Specify the path for the collections dump, relative to the dump path. The default is `"collections"`.
39-
40-
- `--snapshot-path <snapshotPath>`
41-
Specify the path for the schema snapshot dump, relative to the dump path. The default is `"snapshot"`.
42-
43-
- `-h, --help`
44-
Display help information for the `directus-sync` commands.
45-
4626
## Commands
4727

4828
### Pull
@@ -81,6 +61,39 @@ npx directus-sync untrack --collection <collection> --id <id>
8161
Removes tracking from an element within Directus. You must specify the collection and the ID of the element you wish to
8262
stop tracking.
8363

64+
## Global Options
65+
66+
These options can be used with any command to configure the operation of `directus-sync`:
67+
68+
- `-d, --debug`
69+
Display additional logging information. Useful for debugging or verifying what `directus-sync` is doing under the
70+
hood.
71+
72+
- `-u, --directus-url <directusUrl>`
73+
Specify the Directus instance URL. Alternatively, set the `DIRECTUS_URL` environment variable.
74+
75+
- `-t, --directus-token <directusToken>`
76+
Provide the Directus access token. Alternatively, set the `DIRECTUS_TOKEN` environment variable.
77+
78+
- `--no-split`
79+
Indicates whether the schema snapshot should be split into multiple files. By default, snapshots are split.
80+
81+
- `--dump-path <dumpPath>`
82+
Set the base path for the dump. This must be an absolute path. The default
83+
is `"./directus-config"`.
84+
85+
- `--collections-path <collectionPath>`
86+
Specify the path for the collections dump, relative to the dump path. The default is `"collections"`.
87+
88+
- `--snapshot-path <snapshotPath>`
89+
Specify the path for the schema snapshot dump, relative to the dump path. The default is `"snapshot"`.
90+
91+
- `-f, --force`
92+
Force the diff of schema, even if the Directus version is different. The default is `false`.
93+
94+
- `-h, --help`
95+
Display help information for the `directus-sync` commands.
96+
8497
### Tracked Elements
8598

8699
`directus-sync` tracks the following Directus collections:

0 commit comments

Comments
 (0)