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

octomark

v0.1.1

Published

Convert Markdown files to GitHub-styled HTML using the official GitHub API.

Downloads

18

Readme

🚀 Octomark

Transformez vos fichiers Markdown en pages HTML élégantes avec le rendu exact de GitHub.

octomark est un outil en ligne de commande (CLI) qui utilise l'API officielle de GitHub pour convertir vos fichiers .md. Il récupère et met en cache dynamiquement les feuilles de style de GitHub pour garantir que votre rendu est toujours identique à celui que vous voyez sur github.com.


✨ Points forts

  • Rendu Officiel : Utilise l'API GitHub Markdown pour une fidélité de 100%.
  • Thèmes Variés : Supporte tous les thèmes officiels (light, dark, dark_dimmed, etc.).
  • Cache Intelligent : Les styles CSS sont stockés localement et mis à jour toutes les 24h.
  • Syntax Highlighting : Coloration syntaxique complète pour tous les langages supportés par GitHub.
  • Alertes GitHub : Support des blocs > [!NOTE], > [!TIP], etc.

🛠️ Installation

Vous pouvez installer octomark globalement via npm :

npm install -g octomark

Ou l'utiliser directement avec npx :

npx octomark README.md

📖 Utilisation

Conversion simple

Génère un fichier README.html avec le thème clair par défaut :

octomark README.md

Choisir un thème

octomark README.md --theme dark_high_contrast

Liste des thèmes disponibles

octomark --list

Gestion du cache

Si vous voulez forcer la mise à jour des styles ou vider le cache :

octomark README.md --force   # Force le téléchargement du CSS
octomark --clean             # Supprime tout le cache local

⚙️ Options du CLI

| Option | Raccourci | Description | Défaut | | --------- | --------- | ----------------------------------------------- | ------------ | | --theme | -t | Définit le thème GitHub à utiliser. | light | | --list | -l | Affiche la liste des thèmes supportés. | - | | --out | -o | Nom du fichier HTML de sortie. | input.html | | --force | -f | Ignore le cache et télécharge le CSS à nouveau. | false | | --clean | - | Vide le dossier de cache .css-cache. | - | | --token | - | GitHub Token pour augmenter les limites d'API. | - |


🏗️ Comment ça marche ?

octomark repose sur deux piliers principaux de l'écosystème GitHub :

  1. L'API GitHub Markdown : Votre texte est envoyé aux serveurs de GitHub pour être transformé en HTML. C'est ce qui garantit que les fonctionnalités comme les tables, les task-lists ou les alertes sont rendues exactement comme sur le site.
  2. generate-github-markdown-css : Cette excellente bibliothèque (par @sindresorhus) est utilisée pour extraire les styles CSS réels de GitHub. octomark les télécharge et les injecte directement dans la balise <style> du fichier HTML généré pour un résultat "tout-en-un" sans dépendances externes.

🔑 Limites de l'API (Rate Limiting)

Sans authentification, l'API GitHub limite les requêtes à 60 par heure. Si vous convertissez de nombreux fichiers, vous pouvez utiliser un Personal Access Token :

octomark file.md --token YOUR_GITHUB_TOKEN

📄 Licence

Ce projet est sous licence MIT. Réalisé avec ❤️ par MathisBEAL.