@limitry/cli 1.0.0-rc.17 → 1.0.0-rc.19
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/CHANGELOG.md +56 -0
- package/README.md +7 -3
- package/dist/limitry.mjs +1130 -574
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,62 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in the Limitry CLI (`@limitry/cli`). Generated from the source on each release; newest first.
|
|
4
4
|
|
|
5
|
+
## 1.0.0-rc.19 (2026-11-22)
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Every list command takes `--all`, to print every page instead of the
|
|
10
|
+
first.
|
|
11
|
+
|
|
12
|
+
A list field now takes its flag once for each value, such as
|
|
13
|
+
`--event-type a --event-type b`. Commas work too:
|
|
14
|
+
`--event-type a,b`. A yes-or-no field takes `--x` and `--no-x`, and a
|
|
15
|
+
field you can empty takes `--clear-<field>`.
|
|
16
|
+
|
|
17
|
+
`--base-url`, or the `<NAME>_BASE_URL` variable, points the CLI at
|
|
18
|
+
another API address. They replace `login --api` and `<NAME>_API`.
|
|
19
|
+
|
|
20
|
+
The exit code now says how a command ended: `1` a failure, `2` a wrong
|
|
21
|
+
command or flag, and `4` when you aren't signed in or the API refused
|
|
22
|
+
your token. An error also prints what is wrong with each field and a
|
|
23
|
+
link to its docs, and with `--json` it carries both.
|
|
24
|
+
- The API, both SDKs and the CLI now each follow their own language's conventions, so some names and paths changed.
|
|
25
|
+
|
|
26
|
+
In the API:
|
|
27
|
+
|
|
28
|
+
- `GET /v1/checks` lists recent checks and takes `before`. It replaces `GET /v1/checks/recent`.
|
|
29
|
+
- `GET /v1/subjects/{kind}/{id}/standing` shows where a subject stands. It replaces `GET /v1/usage/standing`.
|
|
30
|
+
- `PATCH /v1/subjects/{kind}/{id}` sets a subject's billing date, name and labels. `DELETE /v1/subjects/{kind}/{id}/names` erases the name and labels, and answers `204`.
|
|
31
|
+
- A check's decision has no `id`. Its limits name themselves in `limitName`, its `reason` is `{ code, limitId, limitName, subject, message }`, and `reservation` is `null` when there is none.
|
|
32
|
+
- A recent check's time is `checkedAt`, and `refusedBy` names the limit and the subject.
|
|
33
|
+
- A subject's billing date is `billingAnchorAt`, and a period's start is `periodStart`, in reports and in the `limit.reached` and `limit.threshold_crossed` webhooks. Those webhooks name the limit in `limitName`.
|
|
34
|
+
- `GET /v1/usage/subjects` takes `top` and answers `subjects`.
|
|
35
|
+
- A sync takes and answers `dryRun` in place of `preview`.
|
|
36
|
+
- Archiving a limit answers `200` with the limit.
|
|
37
|
+
- A clash with a resource's state answers `409` with the code `conflict`, such as a name that is taken or a limit a sync set. A check that Limitry can't answer right now gets `503` with the code `unavailable` and a `Retry-After` header.
|
|
38
|
+
|
|
39
|
+
In the TypeScript SDK:
|
|
40
|
+
|
|
41
|
+
- `guard` and `reserve` throw `LimitReachedError` when refused, and `UnavailableError` when Limitry gave no answer and a limit fails closed. Its `reason` says why. Both are `LimitryError`s.
|
|
42
|
+
- `createLimits` takes `timeout`, in milliseconds, in place of `timeoutMs`.
|
|
43
|
+
- Each `guard` or `reserve` call also takes `timeout`, `failMode`, `signal` and `idempotencyKey`. A signal stops the check at once, and the work doesn't run.
|
|
44
|
+
|
|
45
|
+
In the Python SDK:
|
|
46
|
+
|
|
47
|
+
- `guard` and `reserve` raise `LimitReachedError` and `UnavailableError`, under `LimitryError`.
|
|
48
|
+
- They take `timeout=` (in seconds), `fail_mode=`, `idempotency_key=` and `extra_headers=`.
|
|
49
|
+
- You set what the work used with `reservation.cost = 7`.
|
|
50
|
+
- Cancelling an async `guard` or `reserve` stops its check at once.
|
|
51
|
+
|
|
52
|
+
In the CLI:
|
|
53
|
+
|
|
54
|
+
- `limitry sync --dry-run` replaces `--preview`, and `limitry sync -` reads the file from standard input.
|
|
55
|
+
- A refused `limitry check` exits with code `5`.
|
|
56
|
+
- `limitry subjects standing <kind> <id>` replaces `limitry usage standing`, and `limitry checks list` replaces `limitry checks recent`.
|
|
57
|
+
- `limitry subjects update <kind> <id>` sets a name and labels, and `limitry subjects names delete <kind> <id>` erases them.
|
|
58
|
+
|
|
59
|
+
The audit log's Limitry actions are dotted too, such as `subject.billing_date.set` and `limits.copied`. Earlier entries show the new names.
|
|
60
|
+
|
|
5
61
|
## 1.0.0-rc.17 (2026-11-22)
|
|
6
62
|
|
|
7
63
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Limitry CLI sets up your limits and checks them from a terminal, a script or an agent: create a limit, try a check, and see who is using what, in test before live.
|
|
4
4
|
|
|
5
|
-
[](https://limitry.com/#demo)
|
|
6
6
|
|
|
7
7
|
[▶ Watch the 44-second demo](https://limitry.com/#demo)
|
|
8
8
|
|
|
@@ -37,10 +37,10 @@ limitry limits create --subject '{"kind":"user"}' --action ai-call \
|
|
|
37
37
|
--amount 200 --unit cents --window month
|
|
38
38
|
|
|
39
39
|
# Check a user, as your code would, for a reply that costs 5 cents
|
|
40
|
-
limitry check user:
|
|
40
|
+
limitry check user:user_123 ai-call --cost 5
|
|
41
41
|
|
|
42
42
|
# Where a user stands, without counting anything
|
|
43
|
-
limitry
|
|
43
|
+
limitry subjects standing user user_123
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
When a limit is right, copy it to live from the **Limits** page in the
|
|
@@ -52,6 +52,10 @@ Every API operation is a command: `limitry --help` lists them, and any
|
|
|
52
52
|
command takes `--json` for the API's exact answer, for scripts and
|
|
53
53
|
agents.
|
|
54
54
|
|
|
55
|
+
The exit code says how a command ended: `0` success, `1` a failure, `2`
|
|
56
|
+
a wrong command or flag, and `4` when you aren't signed in. A refused
|
|
57
|
+
`limitry check` exits `5`, so a script can stop on it.
|
|
58
|
+
|
|
55
59
|
## Links
|
|
56
60
|
|
|
57
61
|
- [Website](https://limitry.com)
|