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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cambusa/cli

v0.9.8

Published

🚣 Cambusa CLI is a command-line interface for the Cambusa Framework, designed to streamline development tasks and manage your Cambusa application.

Downloads

9

Readme

Cambusa CLI

🚣 Cambusa CLI is a command-line interface for the Cambusa Framework, designed to streamline development tasks and manage your Cambusa application.

Installation

Install Cambusa CLI globally using npm:

npm install -g @cambusa/cli

Usage

After installing globally, you can use the Cambusa CLI from any directory.

cambusa [command] [options]

Global Options

  • -v, --version: Output the version number
  • -l, --log-level <level>: Set log level (error, warn, info, verbose, debug, silly). Default is 'warn'.
  • -h, --help: Display help for command

Commands

Initialize a New Project

Create a new Cambusa project:

cambusa init [projectName]

Generate a Model

Generate a new model:

cambusa models:generate User

Start the Server

Start the Cambusa server:

cambusa lift

Interactive REPL-like Session

Start an interactive REPL-like session:

cambusa repl

In the REPL session, you can interact with the Cambusa instance directly. The Cambusa instance is available as cambusa.

Custom REPL Commands
  • routes: List all registered routes
  • models: List all available models
  • help: Show available commands
  • exit: Exit the REPL-like session
REPL Examples
  1. View the current configuration:

    cambusa> cambusa.config
  2. Use the logger:

    cambusa> cambusa.log.debug('test message')
  3. Fetch a user from the database (assuming you have a User model):

    cambusa> await cambusa.models.User.findOne({ where: { id: 1 } })

Run Custom Scripts

Run custom scripts located within the ./scripts directory or its subdirectories:

cambusa run <scriptPath> [args...]
Example: Running a Script in a Subdirectory
cambusa run migrations/migrateUsers --batchSize 200 --dryRun true

List Available Scripts

List all scripts available within the ./scripts directory and its subdirectories:

cambusa scripts:list

Notes

  • When using the CLI commands, ensure you are in the root directory of your Cambusa project.
  • The REPL-like session provides a powerful way to interact with your Cambusa application but should be used cautiously, especially when performing operations that could modify your application state.
  • Custom scripts should export a default asynchronous function that accepts the Cambusa instance and an array of arguments.

For more detailed information on each command and its options, use the --help flag:

cambusa [command] --help