@membranehq/cli 1.4.11 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -6
- package/dist/index.js +59 -40
- package/package.json +2 -8
- package/dist/index.d.ts +0 -1
package/README.md
CHANGED
|
@@ -32,7 +32,52 @@ membrane push
|
|
|
32
32
|
|
|
33
33
|
See the Configuration section below for alternative ways to configure credentials.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Authentication
|
|
36
|
+
|
|
37
|
+
Use `membrane login` to authenticate via browser-based OAuth. This stores your access token, refresh token, and the API URI locally.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Login to the default Membrane API
|
|
41
|
+
membrane login
|
|
42
|
+
|
|
43
|
+
# Login to a self-hosted instance
|
|
44
|
+
membrane login --apiUri http://localhost:9000
|
|
45
|
+
|
|
46
|
+
# Check current login status, API URI, and project defaults
|
|
47
|
+
membrane status
|
|
48
|
+
|
|
49
|
+
# Log out and clear stored tokens
|
|
50
|
+
membrane logout
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The `--apiUri` flag sets the API endpoint for this and all subsequent commands. Once logged in, the CLI remembers the API URI so you don't need to specify it again.
|
|
54
|
+
|
|
55
|
+
During login you select a default workspace and tenant. These defaults are saved in `.membrane/config.json` (project-level) and used by other commands like `connect`.
|
|
56
|
+
|
|
57
|
+
## Connecting External Apps
|
|
58
|
+
|
|
59
|
+
Use `membrane connect` to create a connection to a third-party service via browser-based OAuth. Requires prior authentication via `membrane login`.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Connect using an integration key (uses defaults from login)
|
|
63
|
+
membrane connect --integrationKey hubspot
|
|
64
|
+
|
|
65
|
+
# Specify workspace and tenant explicitly
|
|
66
|
+
membrane connect --integrationKey hubspot --workspaceKey my-workspace --tenantKey my-customer
|
|
67
|
+
|
|
68
|
+
# Connect using a connector ID
|
|
69
|
+
membrane connect --connectorId 123
|
|
70
|
+
|
|
71
|
+
# Reconnect an existing connection
|
|
72
|
+
membrane connect --connectionId abc
|
|
73
|
+
|
|
74
|
+
# Print the connection URL instead of opening a browser
|
|
75
|
+
membrane connect --integrationKey hubspot --no-browser
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Synchronizing Workspace
|
|
79
|
+
|
|
80
|
+
Use `membrane init` to configure workspace credentials, then `membrane pull` and `membrane push` to synchronize workspace elements between local files and the remote workspace.
|
|
36
81
|
|
|
37
82
|
```bash
|
|
38
83
|
# Initialize workspace configuration
|
|
@@ -44,12 +89,9 @@ membrane pull [--force]
|
|
|
44
89
|
# Push workspace elements to remote
|
|
45
90
|
membrane push [--force]
|
|
46
91
|
|
|
47
|
-
#
|
|
48
|
-
membrane
|
|
49
|
-
membrane <command> --help
|
|
92
|
+
# Show what would change on push without applying anything
|
|
93
|
+
membrane diff
|
|
50
94
|
|
|
51
|
-
# Check version
|
|
52
|
-
membrane --version
|
|
53
95
|
```
|
|
54
96
|
|
|
55
97
|
## Configuration
|
|
@@ -117,6 +159,13 @@ When you **push**, the CLI:
|
|
|
117
159
|
|
|
118
160
|
Changes are applied in dependency order (integrations before integration-level elements, parents before children) to maintain referential integrity. Conflicts occur when an element exists in only one location; use `--force` to resolve by preferring the source.
|
|
119
161
|
|
|
162
|
+
When you **diff**, the CLI:
|
|
163
|
+
|
|
164
|
+
- Compares current local state with the remote workspace
|
|
165
|
+
- Displays a unified diff of all changes
|
|
166
|
+
|
|
167
|
+
Useful for previewing what `push` would do before actually applying changes.
|
|
168
|
+
|
|
120
169
|
**Example:**
|
|
121
170
|
|
|
122
171
|
```bash
|