@hubspot/cms-cli
CLI for interacting with the HubSpot CMS
Last updated 17 days ago by miketalley .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hubspot/cms-cli 
SYNC missed versions from official npm registry.

@hubspot/cms-cli

Provides an hs command for interacting with the HubSpot CMS. Learn more about building on the HubSpot CMS.

Getting started

For more information on using these tools, see Local Development Tooling: Getting Started

Installation

Using yarn

yarn add @hubspot/cms-cli --dev

Using npm

npm install @hubspot/cms-cli

Configuring

Once the @hubspot/cms-cli has been added to a project, a config file named hubspot.config.yml will also be needed. It is recommended that the config file is kept in your $HOME directory.

cd ~
hs init

Commands

A full breakdown of the commands can be found on the local development tools reference page.

Note: When @hubspot/cms-cli is installed local to a project, the commands need to be prefixed with either yarn if using yarn or npx if using npm.

Initialize the CLI and create a config file

hs init

Show all commands

hs help

Upload a file or directory to the Design Manager

hs upload --portal=DEV [src] [dest]

Fetch a file or directory by path from the Design Manager

hs fetch --portal=DEV [path] [dest]

# Overwrite existing files
hs fetch --portal=DEV --overwrite [path] [dest]

Watch a directory of files and automatically upload changes to the Design Manager

hs watch --portal=DEV [src] [dest]

Create a new asset locally

hs create [type] [dest]

Delete a file or directory from the Design Manager

hs remove --portal=DEV [path]

Authenticate against a portal using either personalaccesskey or oauth2

hs auth personalaccesskey

Upload a file or directory to the File Manager

hs filemanager upload --portal=DEV [src] [dest]

Authentication

There are three ways that the tools can authenticate with HubSpot.

Personal CMS Access Key (recommended)

  1. Run hs init or hs auth personalaccesskey and follow the instructions

OAuth2

  1. Create a developer app
  2. Run hs auth oauth2
  3. Select OAuth2 and follow the steps

Note: The Portal ID used should be the CMS Portal ID (not the developer app ID). Client ID and Client Secret are from the developer app.

HubSpot API Key

  1. Set up an API Key for the CMS Portal
  2. Edit the hubspot.config.yml file to set the authType for the portal to apikey and add apiKey as shown below:
defaultPortal: DEV
portals:
  - name: DEV
    portalId: 123
    authType: apikey
    apiKey: d1234567-123e-7890-b123-aaa80164b4cb

Current Tags

  • 1.1.7                                ...           latest (17 days ago)
  • 1.1.8-beta.0                                ...           next (3 days ago)

93 Versions

  • 1.1.8-beta.0                                ...           3 days ago
  • 1.1.7                                ...           17 days ago
  • 1.1.7-beta.0                                ...           17 days ago
  • 1.1.6                                ...           17 days ago
  • 1.1.5-beta.0                                ...           19 days ago
  • 1.1.5                                ...           25 days ago
  • 1.1.4                                ...           25 days ago
  • 1.1.3                                ...           a month ago
  • 1.1.3-beta.1                                ...           a month ago
  • 1.1.3-beta.0                                ...           a month ago
  • 1.1.2                                ...           a month ago
  • 1.1.1                                ...           a month ago
  • 1.1.1-beta.1                                ...           2 months ago
  • 1.1.1-beta.0                                ...           2 months ago
  • 1.1.0                                ...           2 months ago
  • 1.1.0-beta.2                                ...           2 months ago
  • 1.1.0-beta.1                                ...           2 months ago
  • 1.1.0-beta.0                                ...           2 months ago
  • 1.0.13                                ...           2 months ago
  • 1.0.13-beta.1                                ...           2 months ago
  • 1.0.13-beta.0                                ...           2 months ago
  • 1.0.12                                ...           2 months ago
  • 1.0.12-beta.3                                ...           2 months ago
  • 1.0.12-beta.2                                ...           2 months ago
  • 1.0.12-beta.1                                ...           2 months ago
  • 1.0.12-beta.0                                ...           2 months ago
  • 1.0.11                                ...           3 months ago
  • 1.0.11-beta.0                                ...           3 months ago
  • 1.0.10                                ...           3 months ago
  • 1.0.10-beta.2                                ...           3 months ago
  • 1.0.10-beta.1                                ...           3 months ago
  • 1.0.10-beta.0                                ...           3 months ago
  • 1.0.9                                ...           3 months ago
  • 1.0.9-beta.7                                ...           3 months ago
  • 1.0.9-beta.6                                ...           3 months ago
  • 1.0.9-beta.5                                ...           3 months ago
  • 1.0.9-beta.4                                ...           3 months ago
  • 1.0.9-beta.3                                ...           3 months ago
  • 1.0.9-beta.2                                ...           4 months ago
  • 1.0.9-beta.1                                ...           4 months ago
  • 1.0.9-beta.0                                ...           4 months ago
  • 1.0.8                                ...           4 months ago
  • 1.0.7-beta.2                                ...           4 months ago
  • 1.0.7-beta.1                                ...           4 months ago
  • 1.0.7-beta.0                                ...           4 months ago
  • 1.0.6                                ...           4 months ago
  • 1.0.6-beta.0                                ...           4 months ago
  • 1.0.5                                ...           4 months ago
  • 1.0.5-beta.4                                ...           4 months ago
  • 1.0.5-beta.2                                ...           4 months ago
  • 1.0.5-beta.1                                ...           5 months ago
  • 1.0.5-beta.0                                ...           5 months ago
  • 1.0.4                                ...           5 months ago
  • 1.0.4-beta.0                                ...           6 months ago
  • 1.0.3                                ...           6 months ago
  • 1.0.3-beta.6                                ...           6 months ago
  • 1.0.3-beta.5                                ...           6 months ago
  • 1.0.3-beta.3                                ...           6 months ago
  • 1.0.3-beta.1                                ...           6 months ago
  • 1.0.3-beta.4                                ...           6 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.2-beta.1                                ...           7 months ago
  • 1.0.2-beta.0                                ...           7 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
  • 1.0.0-beta.0                                ...           8 months ago
  • 0.0.26                                ...           8 months ago
  • 0.0.25                                ...           8 months ago
  • 0.0.25-beta.3                                ...           8 months ago
  • 0.0.25-beta.2                                ...           8 months ago
  • 0.0.25-beta.1                                ...           9 months ago
  • 0.0.25-beta.0                                ...           9 months ago
  • 0.0.24                                ...           9 months ago
  • 0.0.23                                ...           9 months ago
  • 0.0.23-beta.1                                ...           9 months ago
  • 0.0.23-beta.0                                ...           10 months ago
  • 0.0.22                                ...           10 months ago
  • 0.0.22-beta.0                                ...           10 months ago
  • 0.0.21-beta.1                                ...           10 months ago
  • 0.0.21-beta.0                                ...           10 months ago
  • 0.0.20                                ...           10 months ago
  • 0.0.20-beta.0                                ...           10 months ago
  • 0.0.19-alpha.1                                ...           10 months ago
  • 0.0.19-alpha.0                                ...           10 months ago
  • 0.0.18                                ...           10 months ago
  • 0.0.17                                ...           10 months ago
  • 0.0.16                                ...           a year ago
  • 0.0.15                                ...           a year ago
  • 0.0.14                                ...           a year ago
  • 0.0.13                                ...           a year ago
  • 0.0.12                                ...           a year ago
  • 0.0.11                                ...           a year ago
  • 0.0.10                                ...           a year ago
Downloads
Today 0
This Week 10
This Month 10
Last Day 0
Last Week 92
Last Month 201
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |