8000 GitHub - wokwi/wokwi-cli: Wokwi Command Line Interface (for CI use cases)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

wokwi/wokwi-cli

Repository files navigation

wokwi-cli

Wokwi Simulation API command line interface.

Installation

Download the latest release from the GitHub Releases page. Rename the file to wokwi-cli (or wokwi-cli.exe on Windows), and put it in your PATH.

On Linux and macOS, you can also install the CLI using the following command:

curl -L https://wokwi.com/ci/install.sh | sh

And on Windows:

iwr https://wokwi.com/ci/install.ps1 -useb | iex

Usage

First, ensure that you set the WOKWI_CLI_TOKEN environment variable to your Wokwi API token. You can get your token from your Wokwi CI Dashboard.

wokwi-cli [directory]

The given directory should have a wokwi.toml file, as explained in the documentation.

For example, you could clone the ESP32 Hello World binaries repo, and point the CLI at the esp-idf-hello-world directory:

git clone https://github.com/wokwi/esp-idf-hello-world
cd esp-idf-hello-world
wokwi-cli .

Configuration Wizard

To generate a wokwi.toml and a default diagram.json files for your project, run:

wokwi-cli init

This will ask you a few questions and will create the necessary files in the current directory. If you want to create the files in a different directory, pass the directory name as an argument:

wokwi-cli init my-project

MCP Server

The MCP server is an experimental feature that allows you to use the Wokwi CLI as a MCP server. You can use it to integrate the Wokwi CLI with AI agents.

To configure your AI agent to use the MCP server, add the following to your agent's configuration:

{
  "servers": {
    "Wokwi": {
      "type": "stdio",
      "command": "wokwi-cli",
      "args": ["mcp"],
      "env": {
        "WOKWI_CLI_TOKEN": "${input:wokwi-cli-token}"
      }
    }
  }
}

Development

Clone the repository, install the npm depenedencies, and then run the CLI:

git clone https://github.com/wokwi/wokwi-cli
cd wokwi-cli
npm install
npm start

To pass command line arguments to the cli, use npm start -- [arguments]. For example, to see the help screen, run:

npm start -- -h

License

The MIT License (MIT)

About

Wokwi Command Line Interface (for CI use cases)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0