Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Extending Heroku
  • Dev Center
  • Dev Center CLI

Dev Center CLI

English — 日本語に切り替える

Last updated January 25, 2022

Table of Contents

  • Installation
  • Pull your article
  • Edit and preview locally
  • Stop the preview
  • Save the article to Dev Center
  • Additional help
  • Issues and pull requests

The Dev Center CLI lets authors edit and preview Dev Center articles locally.

Installation

Set up Ruby on your local machine. Then install the Dev Center CLI gem:

$ gem install devcenter

You’ll also need the Heroku CLI if you want to save your articles to Dev Center.

Pull your article

Download a local copy of an article with devcenter pull followed by the article URL:

$ devcenter pull https://devcenter.heroku.com/articles/dev-center-cli
"Dev Center CLI" article saved as ~/.../dev-center-cli.md

This will save a dev-center-cli.md text file in your local directory.

Edit and preview locally

Open the file with your text editor: you will see that the file includes some metadata followed by the article content in markdown format.

The following command will open a preview in your default browser:

$ devcenter preview dev-center-cli
Live preview for error-pages available in  http://127.0.0.1:3000/dev-center-cli
It will refresh when you save ~/.../dev-center-cli.md
Press Ctrl+C to exit...

Now start editing the article’s content: the preview will auto-refresh whenever you save the file, so you can see the content you’re editing and its preview side by side.

Metadata

The markdown file includes some metadata fields. You can edit title, but never overwrite the id field: you’ll need it to save your changes in Dev Center.

Stop the preview

To stop the preview command, press Ctrl+C.

Save the article to Dev Center

Save your local changes to Dev Center using the devcenter push command:

$ devcenter push dev-center-cli.md

Your local heroku account will be used to push the article. Use heroku auth:whoami to see which account will be used to push the article and heroku auth:login if you need to login with a different account.

Additional help

Get a list of all the available commands with:

$ devcenter help

To get help for a specific command and its available options, e.g: preview:

$ devcenter help preview

Issues and pull requests

The Dev Center CLI is open source, you can access its repo to get the code, report issues or send pull requests.

Keep reading

  • Dev Center

Feedback

Log in to submit feedback.

Writing a Dev Center Article Heroku Dev Center Content Guidelines

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences