Skip to content

Commit 6c69141

Browse files
authored
Improve CLI docs
1 parent e8291d7 commit 6c69141

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,20 @@ json-schema-to-typescript is easy to use via the CLI, or programmatically.
6565

6666
### CLI
6767

68-
A CLI utility is provided with this package.
68+
First make the CLI available using one of the following options:
69+
70+
```sh
71+
# install locally, then use `npx json2ts`
72+
npm install json-schema-to-typescript
73+
74+
# or install globally, then use `json2ts`
75+
npm install json-schema-to-typescript --global
76+
77+
# or install to npm cache, then use `npx --package=json-schema-to-typescript json2ts`
78+
# (you don't need to run an install command first)
79+
```
80+
81+
Then, use the CLI to convert JSON files to TypeScript typings:
6982

7083
```sh
7184
cat foo.json | json2ts > foo.d.ts

0 commit comments

Comments
 (0)