@altmodeler/cli 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1 @@
1
+ Copyright (c) ALTModeler. All rights reserved.
package/README.md CHANGED
@@ -1,3 +1,72 @@
1
- # Temporary Holding Version
1
+ # altm
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Command line for ALTModeler. Sign in, pull a model as a file, read it, export from it and send change proposals. A person approves every change in the app: the CLI never writes a model.
4
+
5
+ Requires Node 20 or later. Run `altm login` or `altm pull` once before using the local commands; after that they run offline.
6
+
7
+ ## Sign in
8
+
9
+ ```sh
10
+ altm login # opens the browser; one profile per organization
11
+ altm login --host acme.altmodeler.com --profile acme
12
+ altm login --no-browser # prints the URL instead (also used off a terminal)
13
+ altm whoami
14
+ altm logout
15
+ ```
16
+
17
+ A profile is one sign-in to one organization. A command uses exactly one profile (`--profile <name>` or `ALTM_PROFILE`). Secrets are stored in your user configuration directory (`~/.config/altm`, private to you); on macOS credentials are kept in the Keychain.
18
+
19
+ ### CI
20
+
21
+ Set `ALTM_TOKEN` (a personal API token) and `ALTM_HOST` (the host it was created for). They override any profile; no browser sign-in is needed.
22
+
23
+ ## Pull and read
24
+
25
+ ```sh
26
+ altm pull <model_id> -o model.altm.json # the same bytes every time
27
+ altm card <ref> -m model.altm.json
28
+ altm resolve "customer" -m model.altm.json
29
+ altm lineage <ref> -m model.altm.json
30
+ altm gaps -m model.altm.json
31
+ altm validate -m model.altm.json
32
+ ```
33
+
34
+ Read commands: `resolve`, `card`, `cards`, `neighbors`, `find`, `query`, `overview`, `trace`, `lineage`, `gaps`, `changes`, `validate`, `name`, `export`, `list`, `metamodel`. Run `altm --help` for options. `--json` prints machine-readable output.
35
+
36
+ ## Export and import
37
+
38
+ ```sh
39
+ altm export --design <diagram id> -o out/ # DDL or dbt files for a physical design
40
+ altm export mermaid --diagram <diagram id>
41
+ altm export csv -o out/ # dictionary as CSV
42
+ altm import ddl schema.sql -o model.altm.json # a local file; open and save it in the app
43
+ ```
44
+
45
+ A design that has drifted from its logical model exits with code 2 and prints the reason.
46
+
47
+ ## Propose
48
+
49
+ ```sh
50
+ altm propose change.json --model <model_id> --dry-run # validate only
51
+ altm propose change.json --model <model_id> --wait # wait until a person approves or rejects
52
+ altm propose change.json --new-model '{"name":"Orders","type":"<model type id>"}'
53
+ ```
54
+
55
+ Large proposals are sent in parts automatically. Content you propose is marked as AI proposed until a person approves it.
56
+
57
+ `altm call <tool> '<json>'` calls any tool of the hosted MCP server directly.
58
+
59
+ ## Exit codes
60
+
61
+ | Code | Meaning |
62
+ |---|---|
63
+ | 0 | ok (with `--wait`: approved) |
64
+ | 1 | usage or load error |
65
+ | 2 | the answer is a "no" (rejected, drift, validation errors) |
66
+ | 3 | not signed in, or the token is invalid, out of scope or has no access |
67
+ | 4 | rate limited |
68
+ | 5 | agent access is blocked for the organization |
69
+
70
+ ## Support
71
+
72
+ Questions and problems: support@altmodeler.com