Skip to content

Commit 490892b

Browse files
Update readme with installation instructions
1 parent 52308f6 commit 490892b

1 file changed

Lines changed: 29 additions & 3 deletions

File tree

README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,41 @@
22

33
Linting and formatting tools for Talon and Cursorless.
44

5-
## Command line
5+
## Installation
6+
7+
### Local dev dependency
8+
9+
Install the package in your project:
10+
11+
```sh
12+
npm install --save-dev @cursorless/talon-tools
13+
```
14+
15+
Run the local CLI commands with `npx`:
16+
17+
```sh
18+
npx talon-fmt [options] [file/dir/glob ...]
19+
npx snippet-fmt [options] [file/dir/glob ...]
20+
npx tree-sitter-fmt [options] [file/dir/glob ...]
21+
```
22+
23+
### Global install
24+
25+
Install the binaries globally:
26+
27+
```sh
28+
npm install --global @cursorless/talon-tools
29+
```
30+
31+
Run the binaries directly:
632

733
```sh
834
talon-fmt [options] [file/dir/glob ...]
935
snippet-fmt [options] [file/dir/glob ...]
1036
tree-sitter-fmt [options] [file/dir/glob ...]
1137
```
1238

13-
### CLI options
39+
## CLI options
1440

1541
All binaries support these options:
1642

@@ -91,7 +117,7 @@ repos:
91117

92118
```sh
93119
# Try formatter without pre-commit
94-
node out/talonFormatter.js test.talon
120+
node dist/talonFormatter.js test.talon
95121
96122
# Try formatter with pre-commit
97123
pre-commit try-repo . talon-fmt --files test.talon -v

0 commit comments

Comments
 (0)