OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Solidity CLI

Solidity CLI is a TypeScript-based command-line tool and programmatic library for compiling Solidity source code and files. It supports folder-based compilation, caching, compiler-version discovery from pragma declarations, import management, parallel compilation processes, and JavaScript and TypeScript output.

Independent OpenViST project profile, based on linked sources.

Solidity CLI — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Solidity CLI when a JavaScript or TypeScript workflow needs command-line or programmatic Solidity compilation, especially for folder builds or compilation as part of a package script.

Who it is for

  • Developers compiling Solidity contracts as part of JavaScript project builds
  • TypeScript developers who want generated JavaScript and TypeScript compilation output
  • Teams managing Solidity projects with multiple contracts or compiler versions

Documented uses

  • Compile Solidity files from a source folder into a destination folder.
  • Compile Solidity source text or an individual contract file from JavaScript code.
  • Add contract compilation as a package-script step before tests.
  • Reduce repeated compilation through caching and handle compiler versions indicated by contract pragmas.
Before you choose

Requirements & limits

  • The README documents both CLI and programmatic use, including source strings, individual files and folders.
  • The tool caches output and recompiles when contract code changes.
  • Compiler versions are discovered from pragma declarations and installed when needed.
  • The repository specifies the Apache-2.0 license.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Compile a folder of Solidity files from the command line

Compile Solidity files matching a source pattern into a destination folder using the CLI.

Before you start

  • Node.js package installation using npm
  • Solidity source files in a folder

Steps

  1. Install the CLI globally with npm install -g solidity-cli.

  2. Run solidity with an input pattern and output folder, such as solidity -i './test/contracts/*.sol' -o ./test/compiled/.

Expected outcome

The CLI compiles the matched Solidity files into the specified destination.

Guide limitations

  • The documented command covers compilation; it does not describe deployment or contract execution.
Source-based practical guide

Add Solidity compilation before a package test script

Configure a JavaScript project package script to compile Solidity files before tests.

Before you start

  • A JavaScript project with a package.json file
  • Solidity contract files in a project folder

Steps

  1. Install solidity-cli as a development dependency with npm install solidity-cli --save-dev.

  2. Add a pretest script that invokes solidity-cli with the contracts input pattern and compiled output folder.

Expected outcome

The package configuration runs Solidity compilation as a pre-test step.

Guide limitations

  • The README shows the package-script configuration but does not provide test commands or deployment steps.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
pubkey/solidity-cli · Official homepage title · retained in its source language