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

backlog-exporter

v0.7.2

Published

A new CLI generated with oclif

Readme

backlog-exporter

Backlog のデータをエクスポートするためのコマンドラインツール

oclif Version Downloads/week

概要

backlog-exporter は、Backlog のデータをローカルにエクスポートするためのコマンドラインツールです。 現在、以下の機能をサポートしています:

  • 課題(Issue)のエクスポート:Backlog の課題を Markdown ファイルとして保存(カスタム属性対応)
  • Wiki 記事のエクスポート:Backlog の Wiki 記事を Markdown ファイルとして保存
  • ドキュメントのエクスポート:Backlog のドキュメントを Markdown ファイルとして保存
  • 一括エクスポート:課題・Wiki・ドキュメントを同時に取得する機能
  • データの更新:既存のエクスポートデータを最新の状態に更新する機能

インストール

$ npm install -g backlog-exporter
$ backlog-exporter COMMAND
running command...
$ backlog-exporter (--version)
backlog-exporter/0.7.2 linux-x64 node-v25.2.1
$ backlog-exporter --help [COMMAND]
USAGE
  $ backlog-exporter COMMAND
...

使用方法

backlog-exporter を使用するには、Backlog のドメイン、プロジェクト ID(またはキー)、API キーが必要です。

API キーは以下の方法で指定できます:

  1. コマンドラインオプションとして指定
  2. 環境変数 BACKLOG_API_KEY に設定
  3. .env ファイルに BACKLOG_API_KEY=あなたのAPIキー として設定

基本的な使用例

課題のエクスポート

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues

Wikiのエクスポート

$ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./wiki

ドキュメントのエクスポート

$ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./documents

課題・Wiki・ドキュメントの一括エクスポート

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data

特定のデータタイプのみをエクスポート(onlyフラグ)

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki

特定のデータタイプを除外してエクスポート(excludeフラグ)

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents

データの更新

$ backlog-exporter update

npx を使用する場合は、コマンドの前にnpxを付けるだけです:

npxを使った課題のエクスポート

$ npx backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues

npxを使ったデータの更新

$ npx backlog-exporter update

課題のエクスポート

issueコマンドを使用すると、Backlog の課題を Markdown ファイルとしてエクスポートできます。

基本的な使用方法

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY

出力先を指定

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./issues

Markdownファイル名を課題キーにする

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName

課題キーでフォルダを作成する

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFolder

課題キーでフォルダを作成し、Markdownファイル名も課題キーにする

$ backlog-exporter issue --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --issueKeyFileName --issueKeyFolder

エクスポートされた課題は、指定したディレクトリ内に Markdown ファイルとして保存されます。ファイル名は課題のキーに基づいて自動的に生成されます。

カスタム属性の対応

課題のエクスポートでは、Backlogのカスタム属性も含めて出力されます:

対応している値の型

  • プリミティブ値: 文字列、数値などの単純な値
  • 配列値: 複数選択のカスタム属性(カンマ区切りで表示)
  • オブジェクト値: 単一選択のカスタム属性(name または value プロパティを使用)

表示形式

カスタム属性はMarkdownテーブル形式で表示され、改行やパイプ文字も適切に処理されます:

## カスタム属性

| 属性名             | 値                             |
| ------------------ | ------------------------------ |
| 工数(エンジニア) | 3                              |
| 担当チーム         | フロントエンド, バックエンド   |
| 詳細               | 実装内容<br>- 機能A<br>- 機能B |

Wiki のエクスポート

wikiコマンドを使用すると、Backlog の Wiki ページを Markdown ファイルとしてエクスポートできます。

基本的な使用方法

$ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY

出力先を指定

$ backlog-exporter wiki --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./wiki

エクスポートされた Wiki は、指定したディレクトリ内に Markdown ファイルとして保存されます。Wiki の階層構造は保持され、ディレクトリ構造として再現されます。

ドキュメント のエクスポート

documentコマンドを使用すると、Backlog のドキュメントページを Markdown ファイルとしてエクスポートできます。

基本的な使用方法

$ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY

出力先を指定

$ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./documents

キーワード検索

$ backlog-exporter document --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --keyword 仕様書

ドキュメントの出力方法

ドキュメントは ツリー構造を保持 してエクスポートされます:

ディレクトリ構造の保持

  • Backlogのドキュメントツリーの階層構造がそのままローカルディレクトリ構造として再現されます
  • フォルダはディレクトリとして作成され、ドキュメントはMarkdownファイルとして保存されます

出力例

documents/
├── プロジェクト概要/
│   ├── 要件定義書.md
│   └── 仕様書.md
├── 設計書/
│   ├── システム設計/
│   │   ├── アーキテクチャ設計.md
│   │   └── データベース設計.md
│   └── UI設計/
│       ├── 画面設計書.md
│       └── ワイヤーフレーム.md
└── 運用手順書.md

特徴

  • 階層構造の完全再現: Backlogのフォルダ階層がそのまま保持されます
  • 重複処理の防止: 同じドキュメントが複数回処理されることを防ぎます
  • ファイル名の自動サニタイズ: 不正な文字を自動的に除去して安全なファイル名を生成します
  • メタデータの保持: 作成者、更新者、タグ、添付ファイル情報なども含めて保存されます

エクスポートされたドキュメントは、指定したディレクトリ内にツリー構造を保持したMarkdownファイルとして保存されます。

課題・Wiki・ドキュメント の一括エクスポート

allコマンドを使用すると、課題・Wiki・ドキュメントを一度に取得できます。

基本的な使用方法

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY

出力先を指定

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --output ./backlog-data

特定のデータタイプのみをエクスポート(onlyフラグ)

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --only issues,wiki

特定のデータタイプを除外してエクスポート(excludeフラグ)

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --apiKey YOUR_API_KEY --exclude documents

一括エクスポートでは、課題はissuesディレクトリに、Wiki はwikiディレクトリに、ドキュメントはdocumentsディレクトリに保存されます。

エクスポート対象の制御

allコマンドでは、以下のフラグを使用してエクスポート対象を制御できます:

--only フラグ

特定のデータタイプのみをエクスポートします。カンマ区切りで複数指定可能です。

課題とWikiのみをエクスポート

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only issues,wiki

ドキュメントのみをエクスポート

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --only documents

--exclude フラグ

特定のデータタイプを除外してエクスポートします。カンマ区切りで複数指定可能です。

ドキュメント以外(課題とWiki)をエクスポート

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude documents

課題以外(WikiとDocuments)をエクスポート

$ backlog-exporter all --domain example.backlog.jp --projectIdOrKey PROJECT_KEY --exclude issues

注意: --only--excludeフラグは同時に使用できません。どちらか一方を使用してください。

データの更新

updateコマンドを使用すると、既存のエクスポートデータを最新の状態に更新できます。このコマンドは、ディレクトリ内のbacklog-settings.jsonファイルを探索し、見つかったディレクトリでデータを更新します。

カレントディレクトリとそのサブディレクトリのデータを更新

$ backlog-exporter update

指定したディレクトリとそのサブディレクトリのデータを更新

$ backlog-exporter update ./my-project

確認プロンプトをスキップして更新

$ backlog-exporter update --force

課題のみを更新

$ backlog-exporter update --issuesOnly

Wikiのみを更新

$ backlog-exporter update --wikisOnly

ドキュメントのみを更新

$ backlog-exporter update --documentsOnly

APIキーを指定して更新

$ backlog-exporter update --apiKey YOUR_API_KEY

更新コマンドは、各ディレクトリの設定ファイルに基づいて、課題・Wiki・ドキュメントを自動的に更新します。設定ファイルが見つかったディレクトリでは、そのディレクトリ内のファイルが直接更新されます(サブフォルダは作成されません)。

コマンド

backlog-exporter help [COMMAND]

Display help for backlog-exporter.

USAGE
  $ backlog-exporter help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for backlog-exporter.

See code: @oclif/plugin-help

backlog-exporter plugins

List installed plugins.

USAGE
  $ backlog-exporter plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ backlog-exporter plugins

See code: @oclif/plugin-plugins

backlog-exporter plugins add PLUGIN

Installs a plugin into backlog-exporter.

USAGE
  $ backlog-exporter plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into backlog-exporter.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the BACKLOG_EXPORTER_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the BACKLOG_EXPORTER_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ backlog-exporter plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ backlog-exporter plugins add myplugin

  Install a plugin from a github url.

    $ backlog-exporter plugins add https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ backlog-exporter plugins add someuser/someplugin

backlog-exporter plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ backlog-exporter plugins inspect PLUGIN...

ARGUMENTS
  PLUGIN...  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ backlog-exporter plugins inspect myplugin

See code: @oclif/plugin-plugins

backlog-exporter plugins install PLUGIN

Installs a plugin into backlog-exporter.

USAGE
  $ backlog-exporter plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into backlog-exporter.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the BACKLOG_EXPORTER_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the BACKLOG_EXPORTER_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ backlog-exporter plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ backlog-exporter plugins install myplugin

  Install a plugin from a github url.

    $ backlog-exporter plugins install https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ backlog-exporter plugins install someuser/someplugin

See code: @oclif/plugin-plugins

backlog-exporter plugins link PATH

Links a plugin into the CLI for development.

USAGE
  $ backlog-exporter plugins link PATH [-h] [--install] [-v]

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help          Show CLI help.
  -v, --verbose
      --[no-]install  Install dependencies after linking the plugin.

DESCRIPTION
  Links a plugin into the CLI for development.

  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ backlog-exporter plugins link myplugin

See code: @oclif/plugin-plugins

backlog-exporter plugins remove [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ backlog-exporter plugins remove [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ backlog-exporter plugins unlink
  $ backlog-exporter plugins remove

EXAMPLES
  $ backlog-exporter plugins remove myplugin

backlog-exporter plugins reset

Remove all user-installed and linked plugins.

USAGE
  $ backlog-exporter plugins reset [--hard] [--reinstall]

FLAGS
  --hard       Delete node_modules and package manager related files in addition to uninstalling plugins.
  --reinstall  Reinstall all plugins after uninstalling.

See code: @oclif/plugin-plugins

backlog-exporter plugins uninstall [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ backlog-exporter plugins uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ backlog-exporter plugins unlink
  $ backlog-exporter plugins remove

EXAMPLES
  $ backlog-exporter plugins uninstall myplugin

See code: @oclif/plugin-plugins

backlog-exporter plugins unlink [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ backlog-exporter plugins unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ backlog-exporter plugins unlink
  $ backlog-exporter plugins remove

EXAMPLES
  $ backlog-exporter plugins unlink myplugin

backlog-exporter plugins update

Update installed plugins.

USAGE
  $ backlog-exporter plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

出力形式

課題の出力形式

課題は以下の形式で Markdown ファイルとして保存されます:

# 課題のタイトル

## 基本情報

- 課題キー: PROJ-123
- ステータス: 処理中
- 優先度: 高
- 担当者: 山田太郎
- 作成日時: 2023/01/01 10:00:00
- 更新日時: 2023/01/02 15:30:45
- [Backlog Issue Link](https://example.backlog.jp/view/PROJ-123)

## カスタム属性

| 属性名             | 値                             |
| ------------------ | ------------------------------ |
| 工数(エンジニア) | 3                              |
| 工数(PPO)        | なし                           |
| 担当チーム         | フロントエンド, バックエンド   |
| 詳細               | 実装内容<br>- 機能A<br>- 機能B |

## 詳細

ここに課題の詳細説明が入ります。

## コメント

### コメント 1

- **投稿者**: 佐藤次郎
- **日時**: 2023/01/01 11:15:30

コメントの内容がここに表示されます。

---

### コメント 2

- **投稿者**: 鈴木三郎
- **日時**: 2023/01/02 09:45:12

返信コメントの内容がここに表示されます。

Wiki の出力形式

Wiki は以下の形式で Markdown ファイルとして保存されます:

# Wiki のタイトル

[Backlog Wiki Link](https://example.backlog.jp/alias/wiki/12345)

ここに Wiki の本文内容が入ります。
Backlog の書式がそのまま保持されます。

ドキュメント の出力形式

ドキュメントは以下の形式で Markdown ファイルとして保存されます:

# ドキュメントのタイトル

[Backlog Document Link](https://example.backlog.jp/document/DOC-ID)

**ステータス**: 1 🎉
**作成者**: 山田太郎
**作成日時**: 2023/01/01 10:00:00
**更新者**: 佐藤次郎
**更新日時**: 2023/01/02 15:30:45

## 内容

ここにドキュメントの本文内容が入ります。
Backlog の書式がそのまま保持されます。

## 添付ファイル

- **資料.pdf** (1024.5 KB) - 作成者: 山田太郎, 作成日時: 2023/01/01 10:00:00
- **画像.png** (256.3 KB) - 作成者: 佐藤次郎, 作成日時: 2023/01/01 10:30:00

## タグ

- 仕様書
- 設計書

その他の特徴

  • 環境変数サポート: 環境変数 BACKLOG_API_KEY を使用して API キーを設定可能
  • 自動ディレクトリ作成: 出力ディレクトリが存在しない場合は自動的に作成
  • 並列処理: 並列処理による高速なダウンロード
  • ファイル名サニタイズ: ファイル名の自動サニタイズ(不正な文字の除去)
  • 階層構造の保持: Wiki の階層構造を保持したエクスポート
  • キーワード検索: ドキュメントの検索キーワード対応
  • 差分更新: 前回の更新以降に変更されたデータのみを更新
  • カスタム属性対応: 課題のカスタム属性をテーブル形式で表示(配列・オブジェクト・プリミティブ値に対応)

開発への貢献

backlog-exporterはオープンソースプロジェクトです。バグ報告、機能提案、プルリクエストなど、あらゆる形での貢献を歓迎しています。

詳しくは CONTRIBUTING.md をご覧ください。

ライセンス

このプロジェクトはMIT Licenseの下で公開されています。