PHPackages                             chefu/academy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. chefu/academy

ActiveLibrary[API Development](/categories/api)

chefu/academy
=============

Official PHP client for the CheFu Academy API

v0.1.0(1mo ago)10[7 PRs](https://github.com/CheFu-code/CheFu-Academy-SDK/pulls)MITPythonPHP &gt;=8.1CI passing

Since Jun 3Pushed 5d ago1 watchersCompare

[ Source](https://github.com/CheFu-code/CheFu-Academy-SDK)[ Packagist](https://packagist.org/packages/chefu/academy)[ Docs](https://github.com/CheFu-code/CheFu-Academy-SDK)[ RSS](/packages/chefu-academy/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

CheFu Academy SDK
=================

[](#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
--------

[](#features)

- API key–based authentication
- Centralized API client
- Course listing &amp; retrieval
- Video listing &amp; 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 &amp; npm

---

Installation
------------

[](#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 --package chefu-academy-sdk chefu-academy login
npx --package chefu-academy-sdk chefu-academy register
```

---

Quick Start
-----------

[](#quick-start)

### Import the SDK

[](#import-the-sdk)

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

### Initialize the client

[](#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

[](#fetch-courses)

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

main();
```

---

Other Languages
---------------

[](#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. Go, NuGet, Packagist, and RubyGems releases are available now; dedicated PyPI and Maven Central releases still require their registry setup.

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](docs/multi-language.md) for official client usage, generator commands, auth rules, pagination, and example usage. See [docs/registry-publishing.md](docs/registry-publishing.md) for the release runbook.

---

Available APIs
--------------

[](#available-apis)

### Courses

[](#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

[](#videos)

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

### API Keys

[](#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)

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 Node CLI uses the same auth endpoints:

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

Python users can install the matching CLI from PyPI:

```
pipx install chefu-academy
chefu-academy login
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
```

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
-----------

[](#development)

### Scripts

[](#scripts)

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

### Project Structure

[](#project-structure)

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

```

---

Example Project
---------------

[](#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
------------

[](#requirements)

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

---

License
-------

[](#license)

MIT License © CheFu Academy

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance95

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 78.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aeff7f776f16901de1dda6bfd3a33760517606c613459a53223dec427ae7935f?d=identicon)[Kurisani](/maintainers/Kurisani)

---

Top Contributors

[![CheFu-code](https://avatars.githubusercontent.com/u/218445180?v=4)](https://github.com/CheFu-code "CheFu-code (26 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")

---

Tags

sdkapi clienteducationacademychefu

### Embed Badge

![Health badge](/badges/chefu-academy/health.svg)

```
[![Health](https://phpackages.com/badges/chefu-academy/health.svg)](https://phpackages.com/packages/chefu-academy)
```

###  Alternatives

[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

621.7M5](/packages/crowdin-crowdin-api-client)[immobiliarelabs/braze-sdk

An sdk to interact with Braze API

2286.2k1](/packages/immobiliarelabs-braze-sdk)[fabian-beiner/todoist-php-api-library

A PHP client library that provides a native interface to the official Todoist REST API.

4812.3k](/packages/fabian-beiner-todoist-php-api-library)[boci/hetzner-laravel

A Laravel SDK for interacting with the Hetzner Cloud API - inspired by Nuno Maduro's OpenAI PHP client

912.2k](/packages/boci-hetzner-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
