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

@jamba/opg-cli

v0.1.6

Published

OPG CLI and Codex MCP server for AI app backend development.

Readme

@jamba/opg-cli

CLI and Codex MCP bridge for OPG backend services.

Full usage guide: docs/CLI_USAGE.md in the OPG_system repository.

npm install -g @jamba/opg-cli
opg --help
opg init --base-url https://api.example.com
opg login
opg app create --name "Demo App" --slug demo
opg login --app demo
opg smoke
opg db smoke
opg db manifest
opg db query --sql "SELECT * FROM app_my_app__customers"
opg codex install

Use opg <command> --help for command-specific help:

opg login --help
opg app --help
opg db --help
opg platform --help

Environment

The CLI reads .opg/credentials.json, .env.local, and .opg/opg.config.json.

  • OPG_BASE_URL: Gateway base URL
  • OPG_APP_SLUG: App slug owned by the current tenant
  • OPG_API_KEY: Optional explicit Developer Grant (opg_dev_...) for CI or non-interactive runs
  • OPG_PLATFORM_TOKEN: Platform admin JWT for global control-plane tools

opg login opens a browser authorization URL and stores a global platform login in .opg/credentials.json. After an app exists, opg login --app <slug> creates an app-scoped Developer Grant for SDK, database, AI, upload, and video operations. opg codex install writes a Codex MCP config template without embedding secret values.

Platform Control Plane

App SDK operations stay app-scoped. Global operations use the platform token:

opg app list
opg app create --name "Demo App" --slug demo
opg platform apps list
opg platform apps create --json '{"name":"Demo App","slug":"demo"}'
opg platform runtime get
opg platform runtime update --json '{"api_base_url":"https://opg.example.com"}'
opg platform feedbacks list --app-id <app-id> --status open
opg platform feedbacks get --app-id <app-id> --feedback-id <feedback-id>
opg platform feedbacks update --app-id <app-id> --feedback-id <feedback-id> --json '{"status":"triaged"}'
opg platform feedbacks comment --app-id <app-id> --feedback-id <feedback-id> --json '{"body":"已收到","is_internal":true}'
opg platform feedbacks review --app-id <app-id> --feedback-id <feedback-id> --json '{"action":"thanks"}'
opg platform analytics business --app-id <app-id> --days 30
opg platform analytics overview --app-id <app-id> --days 30
opg platform analytics growth --app-id <app-id> --days 30
opg platform analytics retention --app-id <app-id> --days 30
opg platform analytics profiles --app-id <app-id> --days 30
opg platform analytics conversion --app-id <app-id> --days 30
opg platform analytics users --app-id <app-id> --days 30
opg platform ai-usage summary --app-id <app-id> --days 7
opg platform ai-usage breakdown --app-id <app-id> --days 7
opg platform ai-usage logs --app-id <app-id> --days 7
opg platform payments products --app-id <app-id>
opg platform payments orders --app-id <app-id> --page 1
opg platform request --path /storage/providers --method GET

The MCP server also exposes platform tools for app creation, runtime settings, storage providers, AI sources/models, app feedback, app analytics, app AI usage, app payment orders, and a generic opg_platform_request escape hatch for other /api/v1/platform-admin/* endpoints.

Common app-data MCP tools:

  • opg_platform_app_feedbacks_list
  • opg_platform_app_feedback_get
  • opg_platform_app_feedback_update
  • opg_platform_app_feedback_comment
  • opg_platform_app_feedback_review
  • opg_platform_app_analytics_overview
  • opg_platform_app_analytics_users
  • opg_platform_app_ai_usage_logs
  • opg_platform_app_payment_orders

Codex Database Tools

The MCP server exposes app-scoped database tools:

  • opg_database_manifest_get
  • opg_database_tables_list
  • opg_database_table_describe
  • opg_database_query
  • opg_database_execute

Database SQL is limited to app-owned tables such as app_my_app__customers. opg_database_execute defaults to dry-run. Applying changes requires confirm=apply:<app-slug>.

The same database operations are also available from the terminal:

opg db manifest
opg db smoke
opg db tables
opg db describe app_my_app__customers
opg db query --sql "SELECT * FROM app_my_app__customers"
opg db execute --sql "CREATE TABLE app_my_app__customers (id uuid PRIMARY KEY DEFAULT gen_random_uuid())" --dry-run true

Release Verification

Before publishing:

npm --prefix packages/cli run build
npm run cli:verify

The verifier creates a temporary app, submits a test feedback item, checks app/platform/feedback/analytics/AI usage/payments/database/Codex/MCP commands, marks the temporary app inactive, and restores local .opg config.