Skip to content

BunnyWay/cli

Repository files navigation

@bunny.net/monorepo

Monorepo for the bunny.net CLI and supporting packages.

Packages

Package Name Description
packages/cli/ @bunny.net/cli Command-line interface for bunny.net
packages/openapi-client/ @bunny.net/openapi-client Standalone, type-safe OpenAPI client for bunny.net
packages/app-config/ @bunny.net/app-config Shared Zod schemas, types, and JSON Schema for bunny.jsonc
packages/database-shell/ @bunny.net/database-shell Standalone interactive SQL shell for libSQL databases
packages/database-openapi/ @bunny.net/database-openapi Generate OpenAPI 3.0 specs from a database schema
packages/database-rest/ @bunny.net/database-rest PostgREST-like REST API handler (database-agnostic)
packages/database-adapter-libsql/ @bunny.net/database-adapter-libsql Bunny Database adapter for database-rest

See each package's README for usage and API documentation.

Installation

# Shell installer (downloads prebuilt binary)
curl -fsSL https://cli.bunny.net/install.sh | sh

# Or via npm
npm install -g @bunny.net/cli

# Or via bun
bun install -g @bunny.net/cli

Development

# Install dependencies
bun install

# Run the CLI locally
bun ny <command>

# Examples
bun ny login
bun ny db list
bun ny apps deploy ghcr.io/me/api:v1.2     # deploy a pre-built image
bun ny apps deploy --dockerfile             # build ./Dockerfile and deploy
bun ny apps deploy                          # first run? Imports docker-compose.yml if present; otherwise auto-detects Dockerfile(s) (including monorepo subdirs) so you can pick one or many, or falls back to a pre-built image.
bun ny apps link                            # interactive: pick from existing apps on the account
bun ny apps link <app-id>                   # link a specific app to this directory (writes .bunny/app.json)
bun ny apps unlink                          # remove .bunny/app.json

Available Scripts

# Type check the entire monorepo
bun run typecheck

# Run tests
bun test

# Build standalone executable
bun run build

# Update OpenAPI specs and regenerate types
bun run openapi:update

# Regenerate types from existing specs
bun run openapi:generate

Changesets

This monorepo uses changesets for versioning and changelogs.

# Add a changeset (interactive prompt)
bun run changeset

# Apply changesets and bump versions
bun run version

# Publish all packages
bun run release

Making the CLI available globally

bun link
bunny <command>

About

bunny.net CLI

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages