CLI tool to sync Intercom Help Center articles with local markdown files, enabling AI-powered documentation management and i18n workflows.
- 📥 Pull articles from Intercom to local markdown files
- 📤 Push local changes back to Intercom
- 🌍 i18n support with translations management
- 🤖 AI-friendly markdown format with front matter metadata
- 🔄 Bidirectional sync between Intercom and local files
npm install -D intercom-help-syncexport INTERCOM_ACCESS_TOKEN=your_access_token_herePull all articles from Intercom:
npx intercom-help-sync pullPush a file to Intercom:
npx intercom-help-sync push help-docs/ja/getting-started/quick-start.mdPull all articles:
npx intercom-help-sync pullPull specific article:
npx intercom-help-sync pull --article-id 123456Use custom config:
npx intercom-help-sync pull --config path/to/config.jsonPush a single file:
npx intercom-help-sync push help-docs/ja/getting-started/quick-start.mdPush multiple files:
npx intercom-help-sync push help-docs/ja/file1.md help-docs/ja/file2.mdDry run (show diff without pushing):
npx intercom-help-sync push help-docs/ja/quick-start.md --dry-runArticles are stored as markdown files with YAML front matter:
---
intercom_id: "123456"
intercom_collection_id: "getting-started"
locale: "ja"
translations:
en: "en/getting-started/quick-start.md"
updated_at: "2024-11-19T10:00:00Z"
status: "published"
title: "クイックスタート"
author_id: 12345
---
# クイックスタート
本文はここに書きます...intercom_id: Intercom article ID (auto-generated on first push)intercom_collection_id: Collection/category IDlocale: Language code (ja, en, etc.)translations: Map of locale to file path for translationsupdated_at: Last update timestampstatus:publishedordrafttitle: Article titleauthor_id: Intercom author ID
- CS team updates articles in Intercom UI
- Run
npx intercom-help-sync pullto sync changes locally - Commit to git for version control
- AI reads local markdown files
- AI modifies content based on code changes
- Run
npx intercom-help-sync push <path>to update Intercom
- Create article in default locale (ja)
- Add translation in another locale (en)
- Link via
translationsfield in front matter - Push both files - they'll be synced as one article with translations
Configuration file is optional. By default, the tool uses:
INTERCOM_ACCESS_TOKENenvironment variablehelp-docsas the articles directory- Default locale is determined from articles (the one with
translationsfield) - All translations are synced
To customize, create help-docs/.intercom-config.json:
{
"articlesDir": "./custom-articles-path"
}Available options:
intercomAccessToken: Access token (useenv:VAR_NAMEfor environment variables)articlesDir: Relative path to articles directory
- Go to Intercom Settings > Developers > Developer Hub
- Create a new app or use existing one
- Add "Articles" permissions (read & write)
- Copy the access token
MIT
Naoyoshi Aikawa @ Rimo, LLC.