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

chefu-academy-sdk

v1.0.10

Published

A TypeScript SDK and OpenAPI REST contract for the CheFu Academy platform

Readme

CheFu Academy SDK

A fully typed TypeScript SDK, official multi-language client sources, and a language-neutral REST contract for interacting with the CheFu Academy platform. The npm package is designed for Node.js and modern JavaScript/TypeScript projects, while the same repository now ships first-party clients for Python, Go, Java, C#, PHP, Ruby, and cURL.


Features

  • API key–based authentication
  • Centralized API client
  • Course listing & retrieval
  • Video listing & retrieval
  • Developer API key management
  • Clean, minimal SDK design
  • Full TypeScript typings
  • OpenAPI contract for non-JS clients
  • Official Python, Go, Java, C#, PHP, Ruby, and cURL client sources
  • Multi-language examples for direct REST calls
  • Ready for production & npm

Installation

npm install chefu-academy-sdk

or using yarn:

yarn add chefu-academy-sdk

When installed in an interactive terminal, the package immediately opens an arrow-key setup menu so users can log in or register a new CheFu Academy account. CI and non-interactive installs skip the prompt automatically.

To skip account setup manually:

CHEFU_SDK_SKIP_AUTH=1 npm install chefu-academy-sdk

To run setup later:

npx chefu-academy login
npx chefu-academy register

Quick Start

Import the SDK

import { CheFuAcademy } from "chefu-academy-sdk";

Initialize the client

const sdk = new CheFuAcademy({
  apiKey: "chf_publicId_secret",
});

By default, the SDK talks to the unified CheFu Inc API at https://api.chefuinc.com/api. For local development or private deployments, pass baseURL when creating the client.

Fetch courses

async function main() {
  const courses = await sdk.courses.getAll();
  console.log(courses);
}

main();

Other Languages

CheFu Academy is not limited to JavaScript/TypeScript. The SDK repository now includes official first-party clients, an OpenAPI contract, and simple HTTP examples for common languages:

clients/python
clients/go
clients/java
clients/csharp
clients/php
clients/ruby
clients/curl
openapi/chefu-academy-api.openapi.yaml
docs/multi-language.md
examples/python/chefu_academy_quickstart.py
examples/go/quickstart.go
examples/java/CheFuAcademyQuickstart.java
examples/csharp/Program.cs
examples/php/quickstart.php
examples/ruby/quickstart.rb
examples/curl/quickstart.sh

Every language uses the same REST base URL:

https://api.chefuinc.com/api

And the same bearer API key header:

Authorization: Bearer chf_publicId_secret

The non-JS client sources are maintained in this repo and shipped with the npm package. Registry publishing for PyPI, Maven Central, NuGet, Packagist, RubyGems, and Go module distribution still requires release credentials and CI automation.

You can also generate additional clients from the OpenAPI contract:

npx @openapitools/openapi-generator-cli generate \
  -i openapi/chefu-academy-api.openapi.yaml \
  -g python \
  -o generated/python

See docs/multi-language.md for official client usage, generator commands, auth rules, pagination, and example usage.


Available APIs

Courses

sdk.courses.getAll({ limit: 20 });
sdk.courses.search({ query: "javascript", category: "Technology", limit: 10 });
sdk.courses.getFeatured({ limit: 8 });
sdk.courses.getCategories();
sdk.courses.getById(courseId);
sdk.courses.getChapters(courseId);
sdk.courses.getChapter(courseId, 0);
sdk.courses.getLessons(courseId, 0);
sdk.courses.getQuiz(courseId);
sdk.courses.getFlashcards(courseId);
sdk.courses.getQA(courseId);

Videos

sdk.videos.getAll();
sdk.videos.getById(videoId);
sdk.videos.search({ query: "microchips", category: "Technology & Gadgets" });
sdk.videos.getByCategory("Technology & Gadgets");

API Keys

API key management requires a logged-in developer user. You can pass a Firebase ID token directly, or call sdk.auth.login() first and the SDK will attach the returned token automatically.

const sdk = new CheFuAcademy({
  authToken: process.env.CHEFU_AUTH_TOKEN,
});

const created = await sdk.keys.create({ name: "Production" });
console.log(created.apiKey); // chf_publicId_secret

const keys = await sdk.keys.list();
await sdk.keys.revoke(keys[0].id);

Authentication

Authentication is handled automatically using your API key.

new CheFuAcademy({
  apiKey: process.env.CHEFU_API_KEY,
});

For Node.js terminal apps, you can prompt the user for their CheFu Academy email and password:

import CheFuAcademy from "chefu-academy-sdk";

const sdk = new CheFuAcademy({
  apiKey: process.env.CHEFU_API_KEY!,
});

const session = await sdk.auth.loginWithTerminal();
console.log(`Logged in as ${session.user.email}`);

loginWithTerminal() masks password input when running in an interactive TTY.

The installed CLI uses the same auth endpoints:

chefu-academy login
chefu-academy register
chefu-academy whoami
chefu-academy logout

Developer API keys can also be managed from the CLI after login:

chefu-academy keys create --name "Local development"
chefu-academy keys list
chefu-academy keys revoke <keyId>

The CLI stores your user login session locally and refreshes it when possible. API key creation still requires an authenticated developer account; passwords are prompted interactively and are never accepted as command-line flags.


Development

Scripts

npm run build   # Build SDK
npm run lint    # Lint code
npm test        # Run tests

Project Structure

src/
 ├─ auth.ts        # Authentication logic
 ├─ client.ts      # HTTP client
 ├─ courses.ts     # Course endpoints
 ├─ index.ts       # Public SDK exports

Example Project

import { CheFuAcademy } from "chefu-academy-sdk";

const sdk = new CheFuAcademy({ apiKey: "chf_publicId_secret" });

const courses = await sdk.courses.getAll();
console.log(courses);

Requirements

  • Node.js 18+
  • TypeScript 5+ (optional but recommended)

License

MIT License © CheFu Academy