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

hosby-cli

v0.3.6

Published

A powerful CLI tool for generating and managing database schemas and services for front-end, mobile, and desktop projects

Downloads

13

Readme

Hosby CLI

Overview

Hosby CLI is a sophisticated command-line interface tool designed to streamline the development workflow for modern web, mobile, and desktop applications. It analyzes your project's codebase to automatically generate optimized JSON schemas data models, create type-safe API clients, and manage your data models efficiently. With powerful AI integration, Hosby CLI intelligently interprets your code structure to create schemas that perfectly match your application's needs.

Installation

# Install globally
npm install -g hosby-cli

# Or use with npx
npx hosby-cli

# Check installation
hosby --version

Features

Core Capabilities

  • Intelligent Schema Generation: Automatically analyze TypeScript/JavaScript projects to create optimized JSON schemas data models
  • AI-Powered Analysis: Leverage advanced AI models (OpenAI or Claude) to interpret complex codebases
  • Cloud Synchronization: Seamlessly push and pull schemas between local development and Hosby cloud
  • TypeScript Client Generation: Auto-generate type-safe API clients for your schemas
  • CRUD Service Generation: Create ready-to-use service modules for your data models

Technical Excellence

  • Robust Error Handling: Comprehensive error management with detailed diagnostics
  • Configurable Timeouts: Prevent hanging operations with customizable network timeouts
  • Automatic Updates: Version checking system to keep your CLI up-to-date
  • Advanced Logging: Multi-level logging system with configurable verbosity
  • Schema Validation: Thorough validation to ensure data integrity

Getting Started

Prerequisites

  • Node.js 14.x or higher
  • TypeScript project (for optimal results)
  • Hosby account (for cloud features)(optional)

Quick Start

  1. Install the CLI

    npm install -g hosby-cli
  2. Log in to your Hosby account

    hosby login
  3. Configure your project

    hosby config project
  4. Scan your project to generate a schema

    hosby scan --ai
  5. Push your schema to the Hosby cloud

    hosby push

Commands

Authentication

hosby login

Authenticate with the Hosby platform to access cloud features and synchronization.

Project Management

# Scan project and generate schema
hosby scan [path] [--ai] [--timeout <ms>]

# Push local schema to Hosby server
hosby push [--force]

# Pull latest schema from Hosby server
hosby pull

Configuration

# Configure project settings
hosby config project

# Configure AI provider settings
hosby config ai

Development Tools

# Generate a CRUD service for a specific table
hosby create-service [tableName]

# AI-specific operations
hosby ai

Global Options

# Enable debug logging
hosby [command] --debug

# Minimize output (error logs only)
hosby [command] --quiet

AI Integration

Hosby CLI integrates with leading AI providers to deliver intelligent code analysis and schema generation:

Supported AI Providers

  • OpenAI: Utilizes GPT models for advanced code understanding
  • Claude AI: Leverages Anthropic's Claude models for nuanced code analysis

Configuring AI

hosby config ai

This interactive command allows you to:

  • Select your preferred AI provider
  • Configure your API key
  • Save your preferences for future use

AI-Powered Schema Generation

When using the --ai flag with the scan command, Hosby CLI:

  1. Analyzes your project's code structure
  2. Identifies data models and business entities
  3. Intelligently generates an optimized schema
  4. Filters out irrelevant UI components and presentation logic

Configuration

Project Configuration

Configure your project settings with:

hosby config project

This will prompt you for:

  • Project ID
  • Project Name

Environment Variables

Hosby CLI supports the following environment variables:

  • HOSBY_API_URL: Custom API endpoint
  • HOSBY_LOG_LEVEL: Logging verbosity (debug, info, warn, error)
  • OPENAI_API_KEY: OpenAI API key
  • ANTHROPIC_API_KEY: Claude AI API key
  • OPENAI_MODEL: Custom OpenAI model name
  • ANTHROPIC_MODEL: Custom Claude model name

Logging Levels

Control output verbosity with:

# For detailed debugging information
export HOSBY_LOG_LEVEL=debug

# For minimal output
export HOSBY_LOG_LEVEL=error

Or use command flags:

hosby [command] --debug
hosby [command] --quiet

Development

Building from Source

# Clone the repository
git clone https://github.com/hosby/hosby-cli.git
cd hosby-cli

# Install dependencies
npm install

# Build the project
npm run build

Development Guidelines

  • Language: All user-facing messages must be in English
  • Documentation: Add proper JSDoc documentation for all functions
  • Error Handling: Implement comprehensive error handling
  • Timeouts: Include timeouts for all network operations
  • Logging: Use the built-in logging system for all messages

Architecture

Hosby CLI follows a modular architecture with clear separation of concerns:

  • Commands: Interface with the user and orchestrate operations
  • Services: Implement business logic and core functionality
  • Core: Provide fundamental utilities and shared functionality
  • Helpers: Offer supporting utilities and helper functions

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter any issues or have questions: