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 🙏

© 2025 – Pkg Stats / Ryan Hefner

graphwork-cli

v2.0.1

Published

Command Line Interface for GraphWork Framework 2.0

Readme

CLI

Command Line Interface for GraphWork Framework 2.0

Overview

The CLI module provides a powerful command-line interface for the GraphWork Framework. It enables developers to initialize projects, generate code, validate quality, and analyze architecture directly from the terminal.

Installation

# Global installation
npm install -g graphwork-cli

# Local installation
npm install graphwork-cli

Features

  • Project Initialization: Create new GraphWork projects with predefined templates
  • Code Generation: Generate components, services, controllers, and more with AI assistance
  • Quality Validation: Validate code quality, security, and compliance
  • Architecture Analysis: Analyze project architecture against specifications
  • Progressive Assistance: Adaptive help based on user experience level
  • Interactive Prompts: User-friendly interactive command-line interface

Usage

Initialize a New Project

# Interactive initialization
gw init

# Direct initialization with options
gw init my-project --template fullstack --tech react,nodejs,postgresql --domain ecommerce

Generate Code

# Generate a controller
gw generate controller --name user --context work/03-architecture/system_design.md

# Generate a service
gw generate service --name user-service --context work/02-specs/functional_spec.md

# Generate a component
gw generate component --name user-profile --context work/02-specs/ui_specs.md

Validate Quality

# Validate all aspects of the project
gw validate --all

# Validate specific aspects
gw validate --security
gw validate --performance
gw validate --quality

Analyze Architecture

# Analyze architecture
gw analyze --architecture

# Analyze dependencies
gw analyze --dependencies

Other Commands

# Show system status
gw status

# Show help
gw --help

# Show version
gw --version

Commands

init

Initialize a new GraphWork project.

gw init [name] [options]

Options:

  • --template <template>: Project template to use
  • --tech <technologies>: Comma-separated list of technologies
  • --domain <domain>: Project domain

generate

Generate code components with AI assistance.

gw generate <type> [options]

Types:

  • controller: Generate a controller
  • service: Generate a service
  • component: Generate a UI component
  • model: Generate a data model
  • template: Generate a custom template

Common Options:

  • --name <name>: Name of the component to generate
  • --context <file>: Context file to use for generation
  • --template <file>: Custom template to use

validate

Validate project quality, security, and compliance.

gw validate [options]

Options:

  • --all: Validate all aspects
  • --security: Validate security aspects
  • --performance: Validate performance aspects
  • --quality: Validate code quality
  • --file <file>: Validate specific file

analyze

Analyze project architecture and dependencies.

gw analyze [options]

Options:

  • --architecture: Analyze architecture
  • --dependencies: Analyze dependencies
  • --complexity: Analyze code complexity

status

Show the current status of the GraphWork system.

gw status

Configuration

The CLI can be configured through a graphwork.config.js file in your project root:

module.exports = {
  ai: {
    provider: 'openai', // or 'anthropic', 'gemini'
    model: 'gpt-4',
    temperature: 0.3,
    apiKey: process.env.GRAPHWORK_AI_API_KEY
  },
  security: {
    dataProtection: true,
    inputValidation: true
  },
  quality: {
    codeStandards: 'strict',
    testCoverage: 80
  }
};

Environment Variables

  • GRAPHWORK_AI_API_KEY: API key for the AI provider (OpenAI, Anthropic, or Google Gemini)
  • GRAPHWORK_DEBUG: Enable debug logging
  • GRAPHWORK_TEMPLATE_DIR: Custom template directory

Contributing

See our Contributing Guide for information on how to contribute to this package.

License

This package is licensed under the MIT License. See the LICENSE file for details.