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
Directus Helper is a command-line tui utility designed to simplify the development workflow around Directus projects.
8
+
It helps you manage multi-environment configurations, streamline migrations, organize monorepos with many extensions, and automate common development tasks such as building or watching extensions.
9
+
10
+
Whether you're working with multiple Directus instances (dev/stage/prod), maintaining a large repository, or simply want an easier way to sync configuration between environments, Directus Helper provides a consistent and developer-friendly toolset.
11
+
12
+
## What it is
13
+
14
+
* Directus Helper is a CLI tool that:
15
+
* Stores and manages Directus environment credentials (tokens or login/password).
16
+
* Supports configuration migration across environments (fields, flows, permissions, etc.).
17
+
* Recognizes Directus monorepo projects and automates building and managing extensions.
18
+
* Provides tools for developing extensions with automatic rebuild and project scaffolding.
2
19
3
20
## Install
4
21
22
+
```bash
23
+
npm install -g directus-helper
24
+
```
25
+
26
+
## Run from source
27
+
5
28
```bash
6
29
npm ci
7
-
npm run build
8
-
npm link
30
+
npm run dev
31
+
32
+
# to run the package
33
+
node ./dist/cli.js
9
34
```
10
35
11
36
## How it works?
12
-
After helper instalation and first run you can observe a new file in your
37
+
After you install and run the helper for the first time, a new configuration file is created:
This config will hold tokens for your environments and settings for migration script
42
+
This configuration file stores:
43
+
* Environment tokens or credentials
44
+
* Migration settings
45
+
* Global helper preferences
18
46
19
47
### Schema of directus.helper.settings
20
48
```js
@@ -40,11 +68,18 @@ zod.object({
40
68
```
41
69
42
70
### What is an environment?
43
-
In terms of helper - we call environment a combination of link and credentials for it (either token or login&password)
44
-
Environments are heavely used for migration process.
71
+
In the context of this helper, an environment is a Directus instance configuration consisting of:
72
+
* link — URL of the Directus environment
73
+
* token, or login + password
74
+
Environments are essential for migration operations.
45
75
46
76
### What is a migration?
47
-
Migration - is a process of transfering configuration of one environment (such as fields, flows, permissions) and transfering it to another environment
77
+
A migration is the process of transferring configuration from one Directus environment to another.
78
+
This may include:
79
+
* Fields
80
+
* Flows
81
+
* ~~Permissions~~ (not yet*)
82
+
It allows you to keep environments in sync
48
83
49
84
## Projects
50
85
This helper allows manage monorepos that contains a lot of extensions. Helper will recognize the folder as a directus project if it contains file `.settings.json`
@@ -61,7 +96,7 @@ Options available in project folder:
0 commit comments