Skip to content

Commit d282642

Browse files
docs: align CLI overview with onboarding wrapper
1 parent adad910 commit d282642

4 files changed

Lines changed: 70 additions & 14 deletions

File tree

docs/cli/index.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,40 @@ The `modal` command-line tool is your interface to Modality.
1010
## Installation
1111

1212
```bash
13-
# macOS/Linux
14-
curl -fsSL https://get.modality.org | sh
13+
# First-contract onboarding wrapper
14+
cd rust
15+
cargo build --release -p modal --no-default-features --features contract-onboarding
1516

16-
# Or build from source
17-
cd rust && cargo build --release
17+
# Language/model CLI used by the first-contract guide
18+
cargo build --release -p modality
1819
```
1920

21+
The lean onboarding wrapper exposes the contract and identity surfaces needed by
22+
the first-contract guide: `modal contract`, `modal c`, `modal id`,
23+
`modal passfile`, `modal status`, `modal commit`, and `modal set`. It omits the
24+
runtime-heavy hub, node, network, predicate, program, chain, local, run,
25+
`killall`, and upgrade surfaces.
26+
27+
Build the full wrapper with `cargo build --release -p modal` when you need those
28+
broader command groups. Use `modality` for model and rule authoring tasks such
29+
as `modality model lint`, `modality model synthesize`, and
30+
`modality model validate`.
31+
2032
## Command Groups
2133

2234
| Command | Alias | Description |
2335
|---------|-------|-------------|
2436
| `modal contract` | `modal c` | Contract management (create, commit, push, pull) |
2537
| `modal id` | `modal identity` | Identity management (create, derive, get) |
2638
| `modal passfile` || Passfile encryption/decryption |
27-
| `modal hub` || Contract hub server and collaboration |
28-
| `modal predicate` || Predicate listing and testing |
29-
| `modal program` || Program management |
30-
| `modal node` || Network node operations |
31-
| `modal net` | `modal network` | Network information |
32-
| `modal local` || Local development utilities |
33-
| `modal run` || Quick node runners |
34-
| `modal chain` || Chain validation |
39+
| `modal hub` || Contract hub server and collaboration; full wrapper only |
40+
| `modal predicate` || Predicate listing and testing; full wrapper only |
41+
| `modal program` || Program management; full wrapper only |
42+
| `modal node` || Network node operations; full wrapper only |
43+
| `modal net` | `modal network` | Network information; full wrapper only |
44+
| `modal local` || Local development utilities; full wrapper only |
45+
| `modal run` || Quick node runners; full wrapper only |
46+
| `modal chain` || Chain validation; full wrapper only |
3547

3648
## Global Commands
3749

@@ -47,10 +59,10 @@ modal <command> --help
4759
# Show status (in contract directory)
4860
modal status
4961

50-
# Kill all local nodes
62+
# Kill all local nodes (full wrapper only)
5163
modal killall
5264

53-
# Upgrade to latest version
65+
# Upgrade to latest version (full wrapper only)
5466
modal upgrade
5567
```
5668

tests/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ commitment-versus-enabledness trap warning, checks that the first-contract guide
1616
adds rules, synthesizes the witness model with `--verify`, validates it with
1717
`modality model validate`, and then commits, checks that the installation guide
1818
keeps the `modal` contract CLI and `modality` model CLI split explicit, checks
19+
that the CLI overview keeps the lean onboarding wrapper separate from full
20+
runtime command groups, checks
1921
that the real `modality` model help surface matches the documented language CLI
2022
when a language binary is present, checks that the verifier rejection reference
2123
preserves current-state, closest-candidate, and missing-predicate diagnostics,

tests/docs/check-cli-index-doc.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5+
DOC="$ROOT_DIR/docs/cli/index.md"
6+
7+
required_patterns=(
8+
"# CLI Reference"
9+
"cargo build --release -p modal --no-default-features --features contract-onboarding"
10+
"cargo build --release -p modality"
11+
"The lean onboarding wrapper exposes"
12+
"\`modal contract\`, \`modal c\`, \`modal id\`"
13+
"It omits the"
14+
"runtime-heavy hub, node, network, predicate, program, chain, local, run,"
15+
"\`killall\`, and upgrade surfaces"
16+
"Build the full wrapper with \`cargo build --release -p modal\`"
17+
"Use \`modality\` for model and rule authoring tasks"
18+
"\`modality model lint\`"
19+
"\`modality model synthesize\`"
20+
"\`modality model validate\`"
21+
"full wrapper only"
22+
"modal c create"
23+
"modal c set /parties/alice.id --named alice"
24+
"modal c commit --all --sign alice.passfile"
25+
)
26+
27+
for pattern in "${required_patterns[@]}"; do
28+
if ! grep -Fq -- "$pattern" "$DOC"; then
29+
echo "CLI index is missing onboarding/help-surface text: $pattern" >&2
30+
exit 1
31+
fi
32+
done
33+
34+
for forbidden_pattern in "curl -fsSL https://get.modality.org | sh" "cd rust && cargo build --release"; do
35+
if grep -Fq -- "$forbidden_pattern" "$DOC"; then
36+
echo "CLI index still contains stale install text: $forbidden_pattern" >&2
37+
exit 1
38+
fi
39+
done
40+
41+
echo "CLI index doc check passed"

tests/run-onboarding-smokes.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ fi
8484
"$ROOT_DIR/tests/docs/check-contract-evolution-doc.sh"
8585
"$ROOT_DIR/tests/docs/check-language-traps-doc.sh"
8686
"$ROOT_DIR/tests/docs/check-installation-doc.sh"
87+
"$ROOT_DIR/tests/docs/check-cli-index-doc.sh"
8788
"$ROOT_DIR/tests/docs/check-first-contract-doc.sh"
8889
"$ROOT_DIR/tests/docs/check-verifier-rejections-doc.sh"
8990
"$ROOT_DIR/tests/docs/check-synthesis-review-doc.sh"

0 commit comments

Comments
 (0)