Skip to content

Commit ecea7a6

Browse files
committed
docs: add installation/development sections
also explain about `WOKWI_CLI_TOKEN` - close #1
1 parent 2757db7 commit ecea7a6

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22

33
Wokwi Simulation API command line interface.
44

5+
## Installation
6+
7+
Download the latest release from the [GitHub Releases page](https://github.com/wokwi/wokwi-cli/releases/latest). Rename the file to `wokwi-cli` (or `wokwi-cli.exe` on Windows), and put it in your `PATH`.
8+
9+
On Linux, the CLI can be installed using the following command:
10+
11+
```bash
12+
sudo wget -O /usr/local/bin/wokwi-cli https://github.com/wokwi/wokwi-cli/releases/download/latest/wokwi-cli-linuxstatic-x64
13+
```
14+
515
## Usage
616

17+
First, ensure that you set the `WOKWI_CLI_TOKEN` environment variable to your Wokwi API token. You can get your token from your [Wokwi profile page](https://wokwi.com/dashboard/profile).
18+
719
```
8-
npx wokwi-cli [directory]
20+
wokwi-cli [directory]
921
```
1022

1123
The given directory should have a `wokwi.toml` file, as explained in [the documentation](https://docs.wokwi.com/vscode/project-config#wokwitoml).
@@ -15,7 +27,24 @@ For example, you could clone the [ESP32 Hello World binaries repo](https://githu
1527
```bash
1628
git clone https://github.com/wokwi/esp-idf-hello-world
1729
cd esp-idf-hello-world
18-
npx wokwi-cli .
30+
wokwi-cli .
31+
```
32+
33+
## Development
34+
35+
Clone the repository, install the npm depenedencies, and then run the CLI:
36+
37+
```bash
38+
git clone https://github.com/wokwi/wokwi-cli
39+
cd wokwi-cli
40+
npm install
41+
npm start
42+
```
43+
44+
To pass command line arguments to the cli, use `npm start -- [arguments]`. For example, to see the help screen, run:
45+
46+
```
47+
npm start -- -h
1948
```
2049

2150
## License

0 commit comments

Comments
 (0)