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

@od-canvas/cli

v1.0.0

Published

Canvas CLI for managing content and projects

Downloads

6

Readme

Canvas CLI

A command-line interface for managing Canvas CMS content and projects.

Installation

npm install -g @canvas/cli

Or use with npx:

npx @canvas/cli projects list

Configuration

Set the following environment variables in your .env file or shell:

CANVAS_API_URL=http://localhost:8080/api
CANVAS_API_KEY=your_api_key_here

You can also create a .env file in your project directory and the CLI will automatically load it.

Commands

Projects

Manage Canvas projects.

List all projects

canvas projects list

Shows all projects you own with document counts and creation dates.

Create a new project

canvas projects create "My Blog"

Creates a new project and returns the project ID.

Get project details

canvas projects get 1

Shows detailed information about a specific project.

Documents

Manage documents within a project.

List documents in a project

canvas docs list 1

Lists all documents in project ID 1, showing:

  • Document ID and title
  • Published/Draft status
  • Last update date

API Keys

Manage API keys for external integrations.

List API keys for a project

canvas keys list 1

Shows all API keys for project ID 1, including:

  • Key name
  • Partial key value (first 16 characters)
  • Creation date

Configuration

View current configuration.

canvas config

Shows:

  • Canvas API URL
  • Whether API key is set

Examples

Setting up for Astro blog

# Set your Canvas credentials
export CANVAS_API_URL=http://localhost:8080/api
export CANVAS_API_KEY=your_key_from_project_settings

# List your projects
canvas projects list

# List documents in project 1
canvas docs list 1

# View API keys for project 1
canvas keys list 1

Creating a new project for a blog

# Create project
canvas projects create "My Blog"

# Get the project ID from the output (e.g., 2)
# Use this ID in your Astro blog .env.local:
# CANVAS_PROJECT_ID=2

Help

canvas --help          # Show all commands
canvas projects --help # Show projects subcommands
canvas docs --help     # Show docs subcommands
canvas keys --help     # Show keys subcommands

Authentication

The CLI uses API keys for authentication. Generate API keys in the Canvas Admin Panel:

  1. Go to your Project → Settings
  2. Find the "API Keys" section
  3. Click "Generate New Key"
  4. Copy the key and set it as CANVAS_API_KEY environment variable

Version

canvas --version

Shows the CLI version.