statelyai 0.3.1 → 0.4.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 +52 -23
- package/dist/bin.d.mts +1 -0
- package/dist/bin.mjs +8 -0
- package/dist/cli-DvtWVXpM.mjs +1963 -0
- package/dist/index.d.mts +230 -0
- package/dist/index.mjs +3 -0
- package/package.json +28 -6
- package/cli.mjs +0 -5
package/README.md
CHANGED
|
@@ -1,38 +1,67 @@
|
|
|
1
1
|
# statelyai
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CLI implementation for Stately.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This package contains the `statelyai` command implementation.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<!-- happy-path CLI usage and statelyai.json shape derived from packages/cli/src/cli.ts#COMMANDS and packages/cli/src/projectConfig.ts -->
|
|
8
|
+
## Happy Path
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
1. Get an API key from [Stately API Key settings](https://stately.ai/registry/user/my-settings?tab=API+Key).
|
|
11
|
+
2. Log in once:
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
```bash
|
|
14
|
+
statelyai login
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
3. Initialize the current repo:
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
|
-
|
|
20
|
+
statelyai init
|
|
15
21
|
```
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
4. Optionally scan the repo and save suggested source globs:
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
```bash
|
|
26
|
+
statelyai init --scan
|
|
27
|
+
```
|
|
20
28
|
|
|
21
|
-
|
|
22
|
-
| --- | --- |
|
|
23
|
-
| `statelyai init` | Create or reuse a Studio project for the current directory and write `statelyai.json` with an empty `sources` array |
|
|
24
|
-
| `statelyai login` | Store an API key for future CLI use |
|
|
25
|
-
| `statelyai logout` | Remove a stored API key |
|
|
26
|
-
| `statelyai auth status` | Show whether the CLI would use an environment variable or stored credential |
|
|
27
|
-
| `statelyai plan <source> <target>` | Print a semantic sync summary |
|
|
28
|
-
| `statelyai diff <source> <target>` | Diff two locators and optionally fail on changes |
|
|
29
|
-
| `statelyai push [file]` | Discover local machine sources, create remote Studio machines for unlabeled files, update linked ones, and persist returned ids |
|
|
30
|
-
| `statelyai pull <source> <target>` | Materialize a source into a local target file |
|
|
31
|
-
| `statelyai pull <linked-file>` | Refresh a linked local file from the `@statelyai id=...` pragma |
|
|
32
|
-
| `statelyai open <file>` | Open a local file in a browser-backed visual editor session |
|
|
29
|
+
That writes a `statelyai.json` like:
|
|
33
30
|
|
|
34
|
-
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"$schema": "https://stately.ai/schemas/statelyai.json",
|
|
34
|
+
"version": "1.0.0",
|
|
35
|
+
"projectId": "project_123",
|
|
36
|
+
"studioUrl": "https://stately.ai",
|
|
37
|
+
"defaultXStateVersion": 5,
|
|
38
|
+
"include": ["src/**/*.ts"],
|
|
39
|
+
"exclude": ["**/*.test.*", "**/*.spec.*"]
|
|
40
|
+
}
|
|
41
|
+
```
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
5. Push local machines:
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
```bash
|
|
46
|
+
statelyai push
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Preview what `push` would do without updating Studio or local files:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
statelyai push --dry-run
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6. Pull remote changes back into linked local files:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
statelyai pull
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`pull` skips locally modified files unless you pass `--force`.
|
|
62
|
+
|
|
63
|
+
Run it without installing it globally:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx statelyai --help
|
|
67
|
+
```
|
package/dist/bin.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|