🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

anyflow-cli

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anyflow-cli

CLI for AnyFlow operations

1.1.0
latest
npm
Version published
Weekly downloads
67
644.44%
Maintainers
2
Weekly downloads
 
Created
Source

AnyFlow CLI

The official command-line interface for AnyFlow operations. This CLI allows you to interact with the AnyFlow ecosystem, deploy smart contracts, and manage your projects.

Table of Contents

  • Installation
  • Usage
  • First Use and Authentication
  • Commands
  • Configuration
  • New Features
  • Contributing
  • License

Installation

npm install -g anyflow-cli

Usage

After installation, you can use the CLI with the anyflow command:

anyflow [command] [options]

First Use and Authentication

To get started with the AnyFlow CLI, you'll need to authenticate your session. Follow these steps:

  • Initialize Your Project: If you are starting a new project, navigate to your project directory:

    mkdir my-anyflow-project
    cd my-anyflow-project
    
  • Run the Init Command: This command will create the necessary environment variables:

    anyflow init
    
  • Run the Install Command: This will update your hardhat.config.js with the necessary configuration:

    anyflow install
    
  • Authenticate: Run the following command to authenticate your session:

    anyflow auth
    

    This command will prompt you for your API key and may attempt to open your browser. Enter your API key when prompted to complete the authentication process.

  • Verify Authentication: After successful authentication, you can verify that you are logged in by running:

    anyflow check-auth
    

    If you see a confirmation message, you are successfully authenticated and ready to use the CLI.

Commands

anyflow <command>

Available commands:

  • help: Show help information for AnyFlow CLI.
  • init: Create the necessary environment variables.
  • install: Update your hardhat.config.js with the necessary configuration.
  • auth: Authenticate your session with AnyFlow.
  • check-auth: Check your authentication status.
  • deploy: Upload your artifacts to the AnyFlow platform and deploy your project.
    • --networks <network...>: Specify networks to deploy to
    • --deterministic-addresses or -da: Use deterministic addresses
  • logout: Clear your authentication credentials.
  • fix: Fix failed deployments.
  • version:check: Check for newer versions of the CLI.

Configuration

The CLI can be configured through environment variables. You can create a .env file in your project root with the following variables:

# API Configuration
API_URL=https://api.anyflow.pro

# Bugsnag Error Reporting (only active in production)
BUGSNAG_API_KEY=your_bugsnag_key

# Node Environment
NODE_ENV=development

New Features

Version Checking

The CLI now automatically checks for updates when running commands. If a new version is available, it will notify you. You can also manually check for updates:

anyflow version:check

Error Reporting

The CLI now includes error reporting via Bugsnag to help us identify and fix issues faster. This is only active in production environments and doesn't collect any sensitive data.

Improved Logging

The CLI now has improved logging with color-coded output and different log levels:

  • DEBUG: Detailed debugging information
  • INFO: General operational information
  • SUCCESS: Successful operations
  • WARNING: Potential issues that don't prevent operation
  • ERROR: Error conditions

Environment Validation

The CLI now validates environment variables to prevent runtime errors due to missing or invalid configuration.

Contributing

We welcome contributions to the AnyFlow CLI! Please see the CONTRIBUTING.md file for details on how to contribute.

License

This project is licensed under the ISC License.

Keywords

anyflowm

FAQs

Package last updated on 30 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts