npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@baas.sh/cli

v1.0.2

Published

Deploy Foundry smart contracts and register them with BaaS.

Downloads

442

Readme

BaaS CLI

npm version node license

Deploy a smart contract to BaaS with one command:

baas deploy

baas deploy compiles your Foundry project, deploys the contract through a BaaS relayer, waits for the transaction to confirm, and registers the contract in your project. It shows up in the Console ready to use. No private key on your machine, and on the BaaS network, no gas to manage.

Installation

You need Node.js 20.19 or newer, with npm, on macOS, Linux, or Windows through WSL.

npm install -g @baas.sh/cli

Or let the install script run that same npm command for you:

curl -fsSL https://tools.baas.sh | bash

Check that everything is in place with baas --version. To update, run npm install -g @baas.sh/cli@latest.

Deploy your first contract

You'll need a project in the BaaS Dashboard and a relayer in the BaaS Console. A relayer is a wallet that BaaS manages for you: it signs and sends your transactions. On a public chain, fund it so it can pay for gas.

Sign in, pick your project, and deploy from your Foundry project directory:

baas login
baas use my-project-id
baas deploy

baas login opens your browser, and keeps you signed in from then on. baas deploy walks you through the rest:

  1. Pick a relayer. It decides which network you deploy to.
  2. Pick a contract. The CLI compiles your project and lists the contracts in src/.
  3. Fill in constructor arguments, if the contract has any.
  4. Confirm. Review the summary and deploy.

Then the CLI waits for the transaction to confirm and registers the contract:

[baas] Deployment submitted (tx 3f1c…).
[baas] Deployed at 0x5FbD…0aa3
[baas] MyToken registered!

The first deployment can take a few minutes while the relayer wakes up. When it's done, open Contracts in the BaaS Console: your contract is there, ready for monitors, automations, and the Executor.

Deploy from a script or CI

Give baas deploy the contract and the relayer, and it runs without prompts:

baas deploy src/Token.sol:MyToken --relayer <relayer-id> --constructor-args "My Token" MTK

| Argument or option | Description | | --- | --- | | [contract] | src/Token.sol, src/Token.sol:MyToken, or just MyToken. Omit it to pick from a list. | | --relayer <id> | The relayer to deploy with. Find IDs with baas relayers:list. | | --constructor-args <values...> | Constructor values, in order. Must come last. | | --mapping <file> | Mapping configuration to send instead of MyToken.mapping. | | --unit <file> | Unit configuration to send instead of MyToken.unit. |

In a terminal, the CLI still shows a summary and asks you to confirm. In CI, it deploys straight away.

Mappings and units

Mappings and units tell BaaS how to read your contract: which values to track, and in which unit. Both are optional. Without them, BaaS works out what it can from the ABI.

To ship them with a deployment, save each JSON configuration next to your contract's source, with the contract's name and a .mapping or .unit extension:

src/MyToken.sol
src/MyToken.mapping
src/MyToken.unit

baas deploy finds them on its own and sends them along. Provide one, both, or neither.

The name to use is the Solidity contract's, not the file's. If src/Tokens.sol declares both MyToken and MyGoodToken, each contract gets its own files: MyToken.mapping, MyGoodToken.mapping, and so on. A Tokens.mapping would be ignored.

Keeping the files somewhere else? Point at them with --mapping and --unit. Each option replaces the automatic lookup for that file only:

baas deploy src/Tokens.sol:MyToken --relayer <relayer-id> \
  --mapping ./config/token.mapping --unit ./config/token.unit

Contracts that use libraries

Nothing to do. If your contract calls external libraries, baas deploy deploys them first, in the right order, links them into your contract, and registers them too. The summary lists them before you confirm.

Already have a library deployed? Give Forge its address in foundry.toml, and the CLI links it instead of deploying a new one:

[profile.default]
libraries = ["src/Math.sol:Math:0x1234567890abcdef1234567890abcdef12345678"]

Commands

baas --help lists the BaaS commands.

| Command | Description | | --- | --- | | baas login | Sign in through your browser | | baas logout | Sign out and delete the saved session | | baas projects:list | List the projects you can access | | baas use [project-id] | Select the active project, or show the current one | | baas relayers:list | List the relayers of the active project | | baas deploy [contract] | Deploy through a relayer and register the contract | | baas --version | Show the CLI and Forge versions |

Your session lives in ~/.baas/credentials.json, readable by you only. It renews itself, and if it ever expires the CLI offers to sign you in again.

When a deployment fails

A failed deployment can leave a contract on-chain but missing from BaaS. Read the message before running the command again: it says whether anything was sent. If the contract is deployed but not registered, add it from the Console instead of deploying a second copy. The troubleshooting guide walks through each case.

Everything you do with Forge, you can do with baas

baas is also your forge: any command it doesn't know is run by Forge, unchanged.

baas build
baas test -vvv
baas fmt

And when you need the full power of Forge for a deployment (your own wallet and RPC, a deployment script that sets up several contracts, verification, custom gas), baas deploy create and baas deploy script run forge create or your script with all your usual options, then register what was deployed:

baas deploy create src/Token.sol:MyToken --rpc-url "$RPC_URL" --private-key "$PRIVATE_KEY"
baas deploy script script/Deploy.s.sol --rpc-url "$RPC_URL" --private-key "$PRIVATE_KEY"

Details, options, and edge cases are in the advanced deployment guide and the command reference.

License

Copyright 2026 BaaS.sh. Licensed under Apache-2.0.