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

@yhotamos/content-manager-cli

v0.7.0

Published

カテゴリごとに Markdown コンテンツとメタ情報を管理できる汎用 CLI ツール

Readme

Content Manager CLI

NPM Version NPM Downloads NPM License

カテゴリごとに Markdown コンテンツとメタ情報を管理できる汎用 CLI ツールです.

主な特徴

  • 柔軟なディレクトリ管理: カテゴリ・日付・タイトルを自由に組み合わせ,分かりやすい構造でコンテンツを整理.
  • メタ情報付き Markdown: メタデータ入りの Markdown ファイルをそのまま作成・管理できる.
  • メタデータ自動集約: 複数のコンテンツからメタ情報をまとめ上げ,一覧やサイトマップを自動生成.
  • GitHub Pages 公開対応: GitHub Pages へのデプロイ用ワークフローも自動で用意.

要件

  • Node.js (LTS 版を推奨)

インストール

npm install -g @yhotamos/content-manager-cli

基本的な構文

content <command> [contentDir] [options]
  • <command>: 実行するコマンド (init, create, build など)
  • [contentDir]: content.config.json が配置されている,または作成されるディレクトリ.多くのコマンドで必須です.
  • [options]: -c, --category のようなコマンド固有のオプション.

基本的な使い方

  1. プロジェクトディレクトリの作成

    mkdir my-project
    cd my-project
  2. コンテンツ管理の初期化

    プロジェクト内に,コンテンツを管理するためのディレクトリを作成します.(デフォルトでは content という名前になります)

    content init
  3. コンテンツの作成

    カテゴリ news,タイトル my-first-post でコンテンツを作成します. --structure category/title<カテゴリ>/<タイトル> というディレクトリ構造を意味します.

    # ./content/news/my-first-post/index.md が作成される
    content create content --structure category/title --category news --title "my-first-post"

    ショートカット記法を使用すると,以下のように書くこともできます.

    content create content -s c/t -c news -t "my-first-post"
  4. メタデータのビルド

    カテゴリ(--category news)を指定し,そのカテゴリのディレクトリ(--target category)をビルドします.これにより,content/news/content.meta.json が生成されます.

    content build content --target category --category news

    ショートカット記法を使用すると,以下のように書くこともできます.

    content build content --target c -c news

上記のコマンドを実行すると,最終的なディレクトリ構成は以下のようになります.

my-project/
└── content/
    ├── news/
    │   ├── my-first-post/
    │   │   └── index.md           # createコマンドで生成
    │   └── content.meta.json      # buildコマンドで生成
    └── content.config.json       # initコマンドで生成

ドキュメント

より詳細な情報については,以下のドキュメントを参照してください.

コマンド一覧

| コマンド | 説明 | | ------------------ | ------------------------------------------------------------ | | content init | 新しいコンテンツ管理プロジェクトを初期化します. | | content create | 新しいコンテンツを作成します. | | content build | コンテンツのメタデータをビルドし,一覧ファイルを生成します. | | content gh-pages | GitHub Pages への公開用ワークフローを生成します. |

詳細はコマンドリファレンスを参照してください.

設定ファイル (content.config.json)

content init で生成される設定ファイルです.プロジェクトの挙動をカスタマイズできます.

{
  "contentDir": "content",
  "contentName": "content",
  "metaIndexFile": "content.meta.json",
  "defaultMeta": {
    "lang": "ja",
    "author": ""
  },
  "filePatterns": ["**/*.md", "**/*.txt", "**/*.html"],
  "structures": []
}

コントリビュート

バグ報告,機能提案,プルリクエストはいつでも歓迎します.Issue やプルリクエストを作成する前に,既存の Issue がないか確認してください.

  1. このリポジトリをフォークします.
  2. フィーチャーブランチを作成します (git checkout -b feature/your-feature).
  3. 変更をコミットします (git commit -m 'Add some feature').
  4. ブランチにプッシュします (git push origin feature/your-feature).
  5. プルリクエストを作成します.

ライセンス

このプロジェクトは MIT ライセンス の下で公開されています.