Skip to content

adobe/helix-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

181 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Helix Command Line Interface (hlx)

Status

codecov CircleCI GitHub license GitHub issues Greenkeeper badge LGTM Code Quality Grade: JavaScript

The Helix Command Line Interface allows web developers to create, develop, and deploy digital experiences using Project Helix

Installation

Install hlx as a global command. You need Node 8 or newer.

$ npm install -g @adobe/helix-cli

Example Projects

There is one example project in /prototypes/petridish/examples/soupdemo

$ cd ../petridish/examples/soupdemo
$ ./setup.sh
$ hlx up

And another one right here:

$ cd test/integration
$ git init &&  git add -A && git commit -m "inital commit"
$ hlx up

Quick Start

$ hlx --help
hlx <cmd> [args]

Commands:
  hlx init <name> [dir]  Initialize the project structure           [aliases: i]
  hlx build              Compile the template functions and build package
                                                                    [aliases: b]
  hlx deploy             Deploy packaged functions to Adobe I/O runtime
                                                                    [aliases: d]
  hlx perf               Test performance                           [aliases: p]

Options:
  --version  Show version number                                       [boolean]
  --help     Show help                                                 [boolean]

Setting up a project

$ hlx init <my-cool-project>

Starting development

$ cd <my-cool-project>
$ hlx up

Just change contents in your project directory and reload http://localhost:3000 to see the results.

(Optional) Build artifacts

# In <my-cool-project>
$ hlx build

(Optional) Test functions

# In <my-cool-project>
$ hlx test

(Optional) Deploy to Adobe I/O Runtime

# In <my-cool-project>
$ hlx deploy --no-auto --wsk-namespace <your-namespace> --wsk-auth <your-key>

Instead of passing --wsk-auth as a command line option, you can also set the HLX_WSK_AUTH environment variable.

(Optional) Publish your Site

# In <my-cool-project>
$ hlx strain --fastly-auth <key> --fastly-namespace <serviceid>
πŸ‘ πŸ‘Ύ πŸš€  hlx is publishing strains
πŸ‘  Cloned latest version, version 356 is ready
πŸ—  Enabled Fastly to call secure OpenWhisk actions
🌲  Set content root for strain preview
πŸ‘Ύ  Set action root for strain  preview
πŸ‘Ύ  Set action root for strain  xdm
🏒  Set owner for strain        xdm
🌳  Set repo for strain         default
🌳  Set repo for strain         soupdemo
🌳  Set repo for strain         xdm
🏷  Set ref for strain          default
🏒  Set owner for strain        preview
πŸ‘Ύ  Set action root for strain  db5d4350c13924ad
🏷  Set ref for strain          db5d4350c13924ad
πŸ‘Ύ  Set action root for strain  soupdemo
πŸ‘Ύ  Set action root for strain  default
🏒  Set owner for strain        soupdemo
🏷  Set ref for strain          soupdemo
🏒  Set owner for strain        default
🏷  Set ref for strain          preview
🏒  Set owner for strain        db5d4350c13924ad
🏷  Set ref for strain          xdm
🌳  Set repo for strain         preview
🌳  Set repo for strain         db5d4350c13924ad
🌲  Set content root for strain default
βœ…  VCL strains.vcl has been updated
🌲  Set content root for strain soupdemo
🌲  Set content root for strain xdm
🌲  Set content root for strain db5d4350c13924ad
πŸ“•  All dicts have been updated.
πŸš€  Activated latest version, version 356 is live
πŸ’€  Purged entire cache