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

@krayinc/docbase-cli

v0.0.8

Published

DocBase CLI tool

Readme

docbase-cli

DocBase API v3 の CLI クライアント。

インストール

npm install --ignore-scripts -g @krayinc/docbase-cli

設定

方法 1: OAuth 認証(推奨)

docbase auth login

ブラウザが開き、DocBase の OAuth 認証フローが開始されます。認証後、トークンは自動的に保存されます。

方法 2: API トークン

環境変数を設定してください。

export DOCBASE_TEAM_DOMAIN=your-team-domain
export DOCBASE_TOKEN=your-api-token

| 変数名 | 必須 | 説明 | |--------|------|------| | DOCBASE_TEAM_DOMAIN | Yes | DocBase チームドメイン | | DOCBASE_TOKEN | Yes | DocBase API トークン |

認証状態の確認

docbase auth status

コマンドリファレンス

posts search

メモを検索します。

docbase posts search -q "検索キーワード"
docbase posts search -q "検索キーワード" -p 2 --per-page 20

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -q, --query <string> | 検索クエリ | - | | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限100) | 10 | | --summary | 本文を要約または先頭1000文字で返す | false |

posts get

メモの詳細を取得します。

docbase posts get 12345

| 引数 | 説明 | |------|------| | <id> | メモID(必須) |

posts create

メモを投稿します。

docbase posts create -t "タイトル" -b "本文"
docbase posts create -t "タイトル" -F body.md
docbase posts create -t "タイトル" -b "本文" -d --tags tag1 tag2
docbase posts create -t "タイトル" -b "本文" -s group --group-ids 123 456

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -t, --title <string> | タイトル(必須) | - | | -b, --body <string> | 本文・Markdown(-b または -F のいずれか必須) | - | | -F, --body-file <path> | 本文をファイルから読み込み(-b または -F のいずれか必須) | - | | -d, --draft | 下書きとして投稿 | false | | --tags <tags...> | タグ(複数指定可) | - | | -s, --scope <scope> | 公開範囲(everyone, group, private) | private | | --group-ids <ids...> | 公開グループID(scope=group 時に必要) | - | | --no-notice | 通知しない | 通知する | | --author-id <number> | 投稿者のユーザーID | - |

posts update

メモを更新します。指定したフィールドのみ更新されます。

docbase posts update 12345 -t "新しいタイトル"
docbase posts update 12345 -b "新しい本文" --tags tag1 tag2
docbase posts update 12345 -F body.md --tags tag1 tag2
docbase posts update 12345 --no-draft -s everyone --notice

| 引数 | 説明 | |------|------| | <id> | メモID(必須) |

| オプション | 説明 | |-----------|------| | -t, --title <string> | タイトル | | -b, --body <string> | 本文(Markdown) | | -F, --body-file <path> | 本文をファイルから読み込み | | -d, --draft | 下書きにする | | --no-draft | 下書きを解除する | | --tags <tags...> | タグ(複数指定可) | | -s, --scope <scope> | 公開範囲(everyone, group, private) | | --group-ids <ids...> | 公開グループID(scope=group 時に必要) | | --notice / --no-notice | 通知する/しない |

posts delete

メモを削除します。

docbase posts delete 12345

| 引数 | 説明 | |------|------| | <id> | メモID(必須) |

posts archive

メモをアーカイブします。

docbase posts archive 12345

| 引数 | 説明 | |------|------| | <id> | メモID(必須) |

posts unarchive

メモのアーカイブを解除します。

docbase posts unarchive 12345

| 引数 | 説明 | |------|------| | <id> | メモID(必須) |

comments list

メモのコメント一覧を取得します。

docbase comments list 12345
docbase comments list 12345 -p 2 --per-page 20
docbase comments list 12345 --order desc --created-after 2026-01-01

| 引数 | 説明 | |------|------| | <post-id> | メモID(必須) |

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限100) | 20 | | --order <order> | 並び順(asc, desc) | asc | | --created-after <date> | 開始日時(例: 2026-01-01) | - | | --created-before <date> | 終了日時(例: 2026-01-01) | - |

comments create

メモにコメントを投稿します。

docbase comments create 12345 -b "コメント内容"
docbase comments create 12345 -F comment.md
docbase comments create 12345 -b "コメント内容" --no-notice
docbase comments create 12345 -b "コメント内容" --author-id 42 --published-at "2026-01-01T00:00:00+09:00"

| 引数 | 説明 | |------|------| | <post-id> | メモID(必須) |

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -b, --body <string> | コメント内容(-b または -F のいずれか必須) | - | | -F, --body-file <path> | コメント内容をファイルから読み込み(-b または -F のいずれか必須) | - | | --notice / --no-notice | 通知する/しない | 通知する | | --author-id <number> | 投稿者のユーザーID | - | | --published-at <datetime> | 投稿日時(ISO-8601形式) | - |

comments delete

コメントを削除します。

docbase comments delete 456

| 引数 | 説明 | |------|------| | <id> | コメントID(必須) |

users search

ユーザーを検索します。

docbase users search
docbase users search -q "tanaka"
docbase users search -q "tanaka" -p 2 --per-page 50

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -q, --query <string> | ユーザー名またはユーザーIDの一部 | - | | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限100) | 100 |

users get-groups

ユーザーの所属グループ一覧を取得します(オーナー/管理者のみ)。

docbase users get-groups 42
docbase users get-groups 42 -p 2 --per-page 50

| 引数 | 説明 | |------|------| | <id> | ユーザーID(必須) |

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限100) | 20 |

users get-profile

自分のプロフィールを取得します。

docbase users get-profile

users delete

チームからメンバーを削除します(オーナー/管理者のみ)。

docbase users delete 42

| 引数 | 説明 | |------|------| | <id> | ユーザーID(必須) |

tags list

タグ一覧を取得します。

docbase tags list

groups search

グループを検索します。

docbase groups search
docbase groups search --name "開発チーム"
docbase groups search -p 2 --per-page 50

| オプション | 説明 | デフォルト | |-----------|------|-----------| | --name <string> | グループ名(完全一致) | - | | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限200) | 100 |

groups get

グループの詳細を取得します。

docbase groups get 123

| 引数 | 説明 | |------|------| | <id> | グループID(必須) |

groups create

グループを作成します。

docbase groups create --name "開発チーム"
docbase groups create --name "開発チーム" --description "開発メンバー用グループ"

| オプション | 説明 | |-----------|------| | --name <string> | グループ名(必須) | | --description <string> | グループの説明 |

groups add-users

グループにユーザーを追加します(オーナー/管理者/グループ参加者)。

docbase groups add-users 123 --user-ids 1 2 3

| 引数 | 説明 | |------|------| | <group-id> | グループID(必須) |

| オプション | 説明 | |-----------|------| | --user-ids <ids...> | ユーザーID(複数指定可、必須) |

groups remove-users

グループからユーザーを削除します(オーナー/管理者/グループ参加者)。

docbase groups remove-users 123 --user-ids 1 2 3

| 引数 | 説明 | |------|------| | <group-id> | グループID(必須) |

| オプション | 説明 | |-----------|------| | --user-ids <ids...> | ユーザーID(複数指定可、必須) |

attachments upload

ファイルをアップロードします(リクエストサイズ上限100MB)。

docbase attachments upload --file ./image.png

| オプション | 説明 | |-----------|------| | --file <path> | アップロードするファイルのパス(必須) |

attachments download

添付ファイルをダウンロードします。

docbase attachments download abc123 -o ./downloaded-file.png

| 引数 | 説明 | |------|------| | <id> | ファイルID(必須) |

| オプション | 説明 | |-----------|------| | -o, --output <path> | 保存先のファイルパス(必須) |

good-jobs list

メモのグッジョブ一覧を取得します。

docbase good-jobs list 12345
docbase good-jobs list 12345 -p 2 --per-page 50
docbase good-jobs list 12345 --order desc --created-after 2026-01-01

| 引数 | 説明 | |------|------| | <post-id> | メモID(必須) |

| オプション | 説明 | デフォルト | |-----------|------|-----------| | -p, --page <number> | ページ番号 | 1 | | --per-page <number> | 1ページあたりの件数(上限500) | 100 | | --order <order> | 並び順(asc, desc) | asc | | --created-after <date> | 開始日時(例: 2026-01-01) | - | | --created-before <date> | 終了日時(例: 2026-01-01) | - |

good-jobs create

メモにグッジョブを投稿します。

docbase good-jobs create 12345
docbase good-jobs create 12345 --no-notice
docbase good-jobs create 12345 --author-id 42 --published-at "2026-01-01T00:00:00+09:00"

| 引数 | 説明 | |------|------| | <post-id> | メモID(必須) |

| オプション | 説明 | デフォルト | |-----------|------|-----------| | --notice / --no-notice | 通知する/しない | 通知する | | --author-id <number> | 投稿者のユーザーID | - | | --published-at <datetime> | 投稿日時(ISO-8601形式) | - |

good-jobs delete

グッジョブを削除します。

docbase good-jobs delete 12345 678

| 引数 | 説明 | |------|------| | <post-id> | メモID(必須) | | <good-job-id> | グッジョブID(必須) |

auth login

OAuth 認証でログインします。

docbase auth login

auth logout

ログアウトします(トークンを削除)。

docbase auth logout

auth status

認証状態を表示します。

docbase auth status

ライセンス

MIT