@secondlayer/cli 9.10.0 → 10.1.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 +15 -4
- package/dist/cli.js +406 -103
- package/dist/cli.js.map +26 -22
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -62,6 +62,18 @@ sl subscriptions create my-hook \
|
|
|
62
62
|
|
|
63
63
|
## Commands
|
|
64
64
|
|
|
65
|
+
### Local runtime
|
|
66
|
+
|
|
67
|
+
No account. Writes `.env.local`, restores history, prints the Stacks observer stanza.
|
|
68
|
+
|
|
69
|
+
| Command | What it does |
|
|
70
|
+
|---|---|
|
|
71
|
+
| `sl init [--network mainnet\|testnet\|devnet] [--api-url <url>] [--force]` | Write `.env.local` (token, secrets key, webhook signing key). Idempotent |
|
|
72
|
+
| `sl bootstrap --against <manifest> [--to-block <n>] [--public-key <pem>] [-y] [--json]` | Restore chain history from a verified archive into an empty database. Exit `0` restored, `1` diverged, `2` refused |
|
|
73
|
+
| `sl observer [--mode indexer\|signer-shared] [--endpoint host:port] [--recovery journal\|archive] [--network …]` | Print the `[[events_observer]]` stanza. Signer-shared requires `--recovery` |
|
|
74
|
+
| `sl verify [all\|raw\|decode:<name>\|subgraph:<name>] --against <manifest> [--quick\|--deep\|--anchor]` | Compare local data to a signed archive. Default target `raw`. Exit `0` clean, `1` diverged, `2` unanchored |
|
|
75
|
+
| `sl repair --against <archive> [--apply]` | Plan (default) or apply an archive repair |
|
|
76
|
+
|
|
65
77
|
### Auth & project
|
|
66
78
|
|
|
67
79
|
| Command | What it does |
|
|
@@ -90,10 +102,10 @@ scoped reads and cannot mint (403). Minted keys inherit your plan's tier.
|
|
|
90
102
|
| `sl subgraphs create <name>` | Scaffold a definition file |
|
|
91
103
|
| `sl subgraphs scaffold <SP...::contract> [-o <path>] [--no-install]` | Generate a subgraph from a deployed contract |
|
|
92
104
|
| `sl subgraphs deploy <file> [--start-block <n>] [--visibility public\|private]` | Deploy; `--start-block` overrides the definition. Managed deploys default `public`, BYO default `private` |
|
|
93
|
-
| `sl subgraphs
|
|
105
|
+
| `sl subgraphs list` | List deployments (`ls` alias) |
|
|
94
106
|
| `sl subgraphs dev <file>` | Watch + hot-redeploy |
|
|
95
107
|
| `sl subgraphs query <name> <table>` | Query a table with filters, sort, pagination |
|
|
96
|
-
| `sl subgraphs
|
|
108
|
+
| `sl subgraphs status <name>` / `gaps <name>` | Inspect a deployment |
|
|
97
109
|
| `sl subgraphs spec <nameOrFile> [--format openapi\|agent\|markdown]` | Export API docs for a deployed subgraph or a local definition file |
|
|
98
110
|
| `sl subgraphs deploy <file> --database-url <url>` | BYO: write the subgraph's rows to your own Postgres |
|
|
99
111
|
| `sl subgraphs codegen <file> --target prisma\|drizzle [-o <path>]` | Generate an ORM schema for the subgraph's tables (BYO DB) |
|
|
@@ -141,7 +153,6 @@ deliveries/...) operates on both kinds.
|
|
|
141
153
|
|---|---|
|
|
142
154
|
| `sl contracts generate [files...]` (alias `gen`) | Generate TS interfaces from Clarity contracts |
|
|
143
155
|
| `sl context` | Print a headless orientation snapshot — account, Streams + Index tips, your subgraphs, subscriptions, and in-flight reindex operations. CLI counterpart to the MCP `secondlayer://context` resource |
|
|
144
|
-
| `sl init` | Scaffold `secondlayer.config.ts` |
|
|
145
156
|
| `sl doctor` / `sl status` | Reachability + health checks |
|
|
146
157
|
| `sl account get` / `sl account update` | Show or update display name / bio / slug |
|
|
147
158
|
| `sl account billing` | Show plan, subscription, trial, discounts |
|
|
@@ -173,7 +184,7 @@ sl contracts generate --watch # regenerate on .clar / config / Clarinet.toml c
|
|
|
173
184
|
Config-driven:
|
|
174
185
|
|
|
175
186
|
```bash
|
|
176
|
-
|
|
187
|
+
# write a secondlayer.config.ts, then:
|
|
177
188
|
sl contracts generate # regenerates from the config
|
|
178
189
|
```
|
|
179
190
|
|