diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d077c05a0..ef9f88e92d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
+## v7.0.4 - 2018-03-15
+
+* Generate consistent working anchors for both our md output & resin docs #813 [Tim Perry]
+
## v7.0.3 - 2018-03-15
* Fix getting window size when there’s no TTY attached #812 [Akis Kesoglou]
diff --git a/automation/capitanodoc/markdown.ts b/automation/capitanodoc/markdown.ts
index 3d740d1377..a86b40ef74 100644
--- a/automation/capitanodoc/markdown.ts
+++ b/automation/capitanodoc/markdown.ts
@@ -4,7 +4,9 @@ import * as utils from './utils';
import { Document, Category, Command } from './doc-types';
export function renderCommand(command: Command) {
- let result = `## ${ent.encode(command.signature)}\n\n${command.help}\n`;
+ let result = `## ${ent.encode(
+ command.signature,
+ )}\n\n${command.help}\n`;
if (!_.isEmpty(command.options)) {
result += '\n### Options';
@@ -36,11 +38,12 @@ function getAnchor(command: Command) {
'#' +
command.signature
.replace(/\s/g, '-')
- .replace(//g, '-62-')
- .replace(/\[/g, '')
+ .replace(//g, '-')
+ .replace(/\[/g, '-')
.replace(/\]/g, '-')
.replace(/--/g, '-')
+ .replace(/-$/, '')
.replace(/\.\.\./g, '')
.replace(/\|/g, '')
.toLowerCase()
diff --git a/doc/cli.markdown b/doc/cli.markdown
index 4adff476cf..921f7f91e9 100644
--- a/doc/cli.markdown
+++ b/doc/cli.markdown
@@ -64,11 +64,11 @@ environment variable (in the same standard URL format).
- Application
- - [app create <name>](#app-create-60-name-62-)
+ - [app create <name>](#app-create-name)
- [apps](#apps)
- - [app <name>](#app-60-name-62-)
- - [app restart <name>](#app-restart-60-name-62-)
- - [app rm <name>](#app-rm-60-name-62-)
+ - [app <name>](#app-name)
+ - [app restart <name>](#app-restart-name)
+ - [app rm <name>](#app-rm-name)
- Authentication
@@ -80,31 +80,31 @@ environment variable (in the same standard URL format).
- Device
- [devices](#devices)
- - [device <uuid>](#device-60-uuid-62-)
+ - [device <uuid>](#device-uuid)
- [devices supported](#devices-supported)
- - [device register <application>](#device-register-60-application-62-)
- - [device rm <uuid>](#device-rm-60-uuid-62-)
- - [device identify <uuid>](#device-identify-60-uuid-62-)
- - [device reboot <uuid>](#device-reboot-60-uuid-62-)
- - [device shutdown <uuid>](#device-shutdown-60-uuid-62-)
- - [device public-url enable <uuid>](#device-public-url-enable-60-uuid-62-)
- - [device public-url disable <uuid>](#device-public-url-disable-60-uuid-62-)
- - [device public-url <uuid>](#device-public-url-60-uuid-62-)
- - [device public-url status <uuid>](#device-public-url-status-60-uuid-62-)
- - [device rename <uuid> [newName]](#device-rename-60-uuid-62-newname-)
- - [device move <uuid>](#device-move-60-uuid-62-)
+ - [device register <application>](#device-register-application)
+ - [device rm <uuid>](#device-rm-uuid)
+ - [device identify <uuid>](#device-identify-uuid)
+ - [device reboot <uuid>](#device-reboot-uuid)
+ - [device shutdown <uuid>](#device-shutdown-uuid)
+ - [device public-url enable <uuid>](#device-public-url-enable-uuid)
+ - [device public-url disable <uuid>](#device-public-url-disable-uuid)
+ - [device public-url <uuid>](#device-public-url-uuid)
+ - [device public-url status <uuid>](#device-public-url-status-uuid)
+ - [device rename <uuid> [newName]](#device-rename-uuid--newname)
+ - [device move <uuid>](#device-move-uuid)
- [device init](#device-init)
- Environment Variables
- [envs](#envs)
- - [env rm <id>](#env-rm-60-id-62-)
- - [env add <key> [value]](#env-add-60-key-62-value-)
- - [env rename <id> <value>](#env-rename-60-id-62-60-value-62-)
+ - [env rm <id>](#env-rm-id)
+ - [env add <key> [value]](#env-add-key--value)
+ - [env rename <id> <value>](#env-rename-id--value)
- Help
- - [help [command...]](#help-command-)
+ - [help [command...]](#help-command)
- Information
@@ -113,45 +113,45 @@ environment variable (in the same standard URL format).
- Keys
- [keys](#keys)
- - [key <id>](#key-60-id-62-)
- - [key rm <id>](#key-rm-60-id-62-)
- - [key add <name> [path]](#key-add-60-name-62-path-)
+ - [key <id>](#key-id)
+ - [key rm <id>](#key-rm-id)
+ - [key add <name> [path]](#key-add-name--path)
- Logs
- - [logs <uuid>](#logs-60-uuid-62-)
+ - [logs <uuid>](#logs-uuid)
- Sync
- - [sync [uuid]](#sync-uuid-)
+ - [sync [uuid]](#sync-uuid)
- SSH
- - [ssh [uuid]](#ssh-uuid-)
+ - [ssh [uuid]](#ssh-uuid)
- Notes
- - [note <|note>](#note-60-note-62-)
+ - [note <|note>](#note-note)
- OS
- - [os versions <type>](#os-versions-60-type-62-)
- - [os download <type>](#os-download-60-type-62-)
- - [os build-config <image> <device-type>](#os-build-config-60-image-62-60-device-type-62-)
- - [os configure <image> [uuid] [deviceApiKey]](#os-configure-60-image-62-uuid-deviceapikey-)
- - [os initialize <image>](#os-initialize-60-image-62-)
+ - [os versions <type>](#os-versions-type)
+ - [os download <type>](#os-download-type)
+ - [os build-config <image> <device-type>](#os-build-config-image--device-type)
+ - [os configure <image> [uuid] [deviceApiKey]](#os-configure-image--uuid--deviceapikey)
+ - [os initialize <image>](#os-initialize-image)
- Config
- [config read](#config-read)
- - [config write <key> <value>](#config-write-60-key-62-60-value-62-)
- - [config inject <file>](#config-inject-60-file-62-)
+ - [config write <key> <value>](#config-write-key--value)
+ - [config inject <file>](#config-inject-file)
- [config reconfigure](#config-reconfigure)
- [config generate](#config-generate)
- Preload
- - [preload <image>](#preload-60-image-62-)
+ - [preload <image>](#preload-image)
- Settings
@@ -159,22 +159,22 @@ environment variable (in the same standard URL format).
- Wizard
- - [quickstart [name]](#quickstart-name-)
+ - [quickstart [name]](#quickstart-name)
- Local
- - [local configure <target>](#local-configure-60-target-62-)
- - [local flash <image>](#local-flash-60-image-62-)
- - [local logs [deviceIp]](#local-logs-deviceip-)
+ - [local configure <target>](#local-configure-target)
+ - [local flash <image>](#local-flash-image)
+ - [local logs [deviceIp]](#local-logs-deviceip)
- [local scan](#local-scan)
- - [local ssh [deviceIp]](#local-ssh-deviceip-)
- - [local push [deviceIp]](#local-push-deviceip-)
- - [local stop [deviceIp]](#local-stop-deviceip-)
+ - [local ssh [deviceIp]](#local-ssh-deviceip)
+ - [local push [deviceIp]](#local-push-deviceip)
+ - [local stop [deviceIp]](#local-stop-deviceip)
- Deploy
- - [build [source]](#build-source-)
- - [deploy <appName> [image]](#deploy-60-appname-62-image-)
+ - [build [source]](#build-source)
+ - [deploy <appName> [image]](#deploy-appname--image)
- Utilities
@@ -182,7 +182,7 @@ environment variable (in the same standard URL format).
# Application
-## app create <name>
+## app create <name>
Use this command to create a new resin.io application.
@@ -204,7 +204,7 @@ Examples:
application device type (Check available types with `resin devices supported`)
-## apps
+## apps
Use this command to list all your applications.
@@ -215,7 +215,7 @@ Examples:
$ resin apps
-## app <name>
+## app <name>
Use this command to show detailed information for a single application.
@@ -223,7 +223,7 @@ Examples:
$ resin app MyApp
-## app restart <name>
+## app restart <name>
Use this command to restart all devices that belongs to a certain application.
@@ -231,7 +231,7 @@ Examples:
$ resin app restart MyApp
-## app rm <name>
+## app rm <name>
Use this command to remove a resin.io application.
@@ -251,7 +251,7 @@ confirm non interactively
# Authentication
-## login
+## login
Use this command to login to your resin.io account.
@@ -294,7 +294,7 @@ email
password
-## logout
+## logout
Use this command to logout from your resin.io account.o
@@ -302,7 +302,7 @@ Examples:
$ resin logout
-## signup
+## signup
Use this command to signup for a resin.io account.
@@ -317,7 +317,7 @@ Examples:
$ resin whoami
johndoe
-## whoami
+## whoami
Use this command to find out the current logged in username and email address.
@@ -327,7 +327,7 @@ Examples:
# Device
-## devices
+## devices
Use this command to list all devices that belong to you.
@@ -346,7 +346,7 @@ Examples:
application name
-## device <uuid>
+## device <uuid>
Use this command to show information about a single device.
@@ -354,7 +354,7 @@ Examples:
$ resin device 7cf02a6
-## devices supported
+## devices supported
Use this command to get the list of all supported devices
@@ -362,7 +362,7 @@ Examples:
$ resin devices supported
-## device register <application>
+## device register <application>
Use this command to register a device to an application.
@@ -384,7 +384,7 @@ custom uuid
custom device key - note that this is only supported on ResinOS 2.0.3+
-## device rm <uuid>
+## device rm <uuid>
Use this command to remove a device from resin.io.
@@ -402,7 +402,7 @@ Examples:
confirm non interactively
-## device identify <uuid>
+## device identify <uuid>
Use this command to identify a device.
@@ -412,7 +412,7 @@ Examples:
$ resin device identify 23c73a1
-## device reboot <uuid>
+## device reboot <uuid>
Use this command to remotely reboot a device
@@ -426,7 +426,7 @@ Examples:
force action if the update lock is set
-## device shutdown <uuid>
+## device shutdown <uuid>
Use this command to remotely shutdown a device
@@ -440,7 +440,7 @@ Examples:
force action if the update lock is set
-## device public-url enable <uuid>
+## device public-url enable <uuid>
Use this command to enable public URL for a device
@@ -448,7 +448,7 @@ Examples:
$ resin device public-url enable 23c73a1
-## device public-url disable <uuid>
+## device public-url disable <uuid>
Use this command to disable public URL for a device
@@ -456,7 +456,7 @@ Examples:
$ resin device public-url disable 23c73a1
-## device public-url <uuid>
+## device public-url <uuid>
Use this command to get the public URL of a device
@@ -464,7 +464,7 @@ Examples:
$ resin device public-url 23c73a1
-## device public-url status <uuid>
+## device public-url status <uuid>
Use this command to determine if public URL is enabled for a device
@@ -472,7 +472,7 @@ Examples:
$ resin device public-url status 23c73a1
-## device rename <uuid> [newName]
+## device rename <uuid> [newName]
Use this command to rename a device.
@@ -483,7 +483,7 @@ Examples:
$ resin device rename 7cf02a6
$ resin device rename 7cf02a6 MyPi
-## device move <uuid>
+## device move <uuid>
Use this command to move a device to another application you own.
@@ -500,7 +500,7 @@ Examples:
application name
-## device init
+## device init
Use this command to download the OS image of a certain application and write it to an SD Card.
@@ -544,7 +544,7 @@ path to the config JSON file, see `resin os build-config`
# Environment Variables
-## envs
+## envs
Use this command to list all environment variables for
a particular application or device.
@@ -573,7 +573,7 @@ device uuid
show private environment variables
-## env rm <id>
+## env rm <id>
Use this command to remove an environment variable from an application.
@@ -600,7 +600,7 @@ confirm non interactively
device
-## env add <key> [value]
+## env add <key> [value]
Use this command to add an enviroment variable to an application.
@@ -629,7 +629,7 @@ application name
device uuid
-## env rename <id> <value>
+## env rename <id> <value>
Use this command to rename an enviroment variable from an application.
@@ -648,7 +648,7 @@ device
# Help
-## help [command...]
+## help [command...]
Get detailed help for an specific command.
@@ -665,13 +665,13 @@ show additional commands
# Information
-## version
+## version
Display the Resin CLI version.
# Keys
-## keys
+## keys
Use this command to list all your SSH keys.
@@ -679,7 +679,7 @@ Examples:
$ resin keys
-## key <id>
+## key <id>
Use this command to show information about a single SSH key.
@@ -687,7 +687,7 @@ Examples:
$ resin key 17
-## key rm <id>
+## key rm <id>
Use this command to remove a SSH key from resin.io.
@@ -705,7 +705,7 @@ Examples:
confirm non interactively
-## key add <name> [path]
+## key add <name> [path]
Use this command to associate a new SSH key with your account.
@@ -719,7 +719,7 @@ Examples:
# Logs
-## logs <uuid>
+## logs <uuid>
Use this command to show logs for a specific device.
@@ -744,7 +744,7 @@ continuously stream output
# Sync
-## sync [uuid]
+## sync [uuid]
Warning: 'resin sync' requires an openssh-compatible client and 'rsync' to
be correctly installed in your shell environment. For more information (including
@@ -825,7 +825,7 @@ increase verbosity
# SSH
-## ssh [uuid]
+## ssh [uuid]
Warning: 'resin ssh' requires an openssh-compatible client to be correctly
installed in your shell environment. For more information (including Windows
@@ -862,7 +862,7 @@ don't use the proxy configuration for this connection. Only makes sense if you'v
# Notes
-## note <|note>
+## note <|note>
Use this command to set or update a device note.
@@ -883,7 +883,7 @@ device uuid
# OS
-## os versions <type>
+## os versions <type>
Use this command to show the available resinOS versions for a certain device type.
Check available types with `resin devices supported`
@@ -892,7 +892,7 @@ Example:
$ resin os versions raspberrypi3
-## os download <type>
+## os download <type>
Use this command to download an unconfigured os image for a certain device type.
Check available types with `resin devices supported`
@@ -927,7 +927,7 @@ or 'default' (excludes pre-releases if at least one stable version is available)
or 'recommended' (excludes pre-releases, will fail if only pre-release versions are available),
or 'menu' (will show the interactive menu)
-## os build-config <image> <device-type>
+## os build-config <image> <device-type>
Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.
@@ -946,7 +946,7 @@ show advanced configuration options
the path to the output JSON file
-## os configure <image> [uuid] [deviceApiKey]
+## os configure <image> [uuid] [deviceApiKey]
Use this command to configure a previously downloaded operating system image for
the specific device or for an application generally.
@@ -985,7 +985,7 @@ custom device key - note that this is only supported on ResinOS 2.0.3+
path to the config JSON file, see `resin os build-config`
-## os initialize <image>
+## os initialize <image>
Use this command to initialize a device with previously configured operating system image.
@@ -1012,7 +1012,7 @@ the drive to write the image to, like `/dev/sdb` or `/dev/mmcblk0`. Careful with
# Config
-## config read
+## config read
Use this command to read the config.json file from the mounted filesystem (e.g. SD card) of a provisioned device"
@@ -1031,7 +1031,7 @@ device type (Check available types with `resin devices supported`)
drive
-## config write <key> <value>
+## config write <key> <value>
Use this command to write the config.json file to the mounted filesystem (e.g. SD card) of a provisioned device
@@ -1051,7 +1051,7 @@ device type (Check available types with `resin devices supported`)
drive
-## config inject <file>
+## config inject <file>
Use this command to inject a config.json file to the mounted filesystem
(e.g. SD card or mounted resinOS image) of a provisioned device"
@@ -1071,7 +1071,7 @@ device type (Check available types with `resin devices supported`)
drive
-## config reconfigure
+## config reconfigure
Use this command to reconfigure a provisioned device
@@ -1095,7 +1095,7 @@ drive
show advanced commands
-## config generate
+## config generate
Use this command to generate a config.json for a device or application.
@@ -1148,7 +1148,7 @@ how frequently (in minutes) to poll for application updates
# Preload
-## preload <image>
+## preload <image>
Warning: "resin preload" requires Docker to be correctly installed in
your shell environment. For more information (including Windows support)
@@ -1206,7 +1206,7 @@ Docker host TLS key file
# Settings
-## settings
+## settings
Use this command to display detected settings
@@ -1216,7 +1216,7 @@ Examples:
# Wizard
-## quickstart [name]
+## quickstart [name]
Use this command to run a friendly wizard to get started with resin.io.
@@ -1234,7 +1234,7 @@ Examples:
# Local
-## local configure <target>
+## local configure <target>
Use this command to configure or reconfigure a resinOS drive or image.
@@ -1243,7 +1243,7 @@ Examples:
$ resin local configure /dev/sdc
$ resin local configure path/to/image.img
-## local flash <image>
+## local flash <image>
Use this command to flash a resinOS image to a drive.
@@ -1263,7 +1263,7 @@ confirm non-interactively
drive
-## local logs [deviceIp]
+## local logs [deviceIp]
Examples:
@@ -1284,7 +1284,7 @@ follow log
name of container to get logs from
-## local scan
+## local scan
Examples:
@@ -1303,7 +1303,7 @@ Display full info
Scan timeout in seconds
-## local ssh [deviceIp]
+## local ssh [deviceIp]
Warning: 'resin local ssh' requires an openssh-compatible client to be correctly
installed in your shell environment. For more information (including Windows
@@ -1342,7 +1342,7 @@ name of container to access
ssh port number (default: 22222)
-## local push [deviceIp]
+## local push [deviceIp]
Warning: 'resin local push' requires an openssh-compatible client and 'rsync' to
be correctly installed in your shell environment. For more information (including
@@ -1439,7 +1439,7 @@ force a container build and run
environment variable (e.g. --env 'ENV=value'). Multiple --env parameters are supported.
-## local stop [deviceIp]
+## local stop [deviceIp]
Examples:
@@ -1462,7 +1462,7 @@ name of container to stop
# Deploy
-## build [source]
+## build [source]
Use this command to build an image or a complete multicontainer project
with the provided docker daemon.
@@ -1552,7 +1552,7 @@ Don't use docker layer caching when building
Squash newly built layers into a single new layer
-## deploy <appName> [image]
+## deploy <appName> [image]
Use this command to deploy an image or a complete multicontainer project
to an application, optionally building it first.
@@ -1646,7 +1646,7 @@ Squash newly built layers into a single new layer
# Utilities
-## util available-drives
+## util available-drives
Use this command to list your machine's drives usable for writing the OS image to.
Skips the system drives.
diff --git a/package.json b/package.json
index 0f5449553c..097d25e629 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "resin-cli",
- "version": "7.0.3",
+ "version": "7.0.4",
"description": "The official resin.io CLI tool",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",