File: //snap/google-cloud-cli/394/help/man/man1/gcloud_beta_topic_offline-help.1
.TH "GCLOUD_BETA_TOPIC_OFFLINE\-HELP" 1
.SH "NAME"
.HP
gcloud beta topic offline\-help \- setting up gcloud command offline help
.SH "DESCRIPTION"
\fB(BETA)\fR There are many ways to access \f5gcloud\fR command help. Only the
first requires online access:
.RS 2m
.IP "\(bu" 2m
Browse https://cloud.google.com/sdk/gcloud/reference/ for the most recent Google
Cloud CLI release online documents.
.RE
.sp
.RS 2m
.IP "\(bu" 2m
Add the \fB\-\-help\fR flag to any command. This will render a man style
document in a terminal pager. The document is always up to date with the command
because it is generated by collating help text from the command itself.
.RE
.sp
.RS 2m
.IP "\(bu" 2m
Use the \f5gcloud beta interactive\fR shell which has as\-you\-type help. Like
\fB\-\-help\fR, the interactive help documents are always up to date with the
\f5gcloud\fR installation.
.RE
.sp
.RS 2m
.IP "\(bu" 2m
Generate HTML documents in a local directory and point your browser to the
generated \fBindex.html\fR for offline browsing. Hover over a navigation item to
focus the menu, hover to the left to expand it again. More details on this
below.
.RE
.sp
.RS 2m
.IP "\(bu" 2m
Generate and install \fBman\fR(1) style documents on a local host. More details
on this below.
.RE
.sp
All of these methods have the same content, all generated from a Google Cloud
CLI \f5gcloud\fR installation. The last two are user maintained and can become
out of date. Either use them for one time offline access, or make them part of
your Google Cloud CLI installation/update routine.
.SH "Generating offline HTML documents"
To generate HTML documents for offline browsing:
.RS 2m
# Select an empty directory where the HTML and supporting *.css* and
# *.js* files will be generated.
HTML_DIR=<some\-local\-directory>
.RE
.RS 2m
# Generate the HTML in $HTML_DIR.
# Should take ~1 min, 10 min or more on slower systems.
gcloud meta generate\-help\-docs \-\-html\-dir=$HTML_DIR
.RE
Then enter this URL in the browser address/search bar, where $HTML_DIR must be
the actual path name of the directory:
.RS 2m
file://$HTML_DIR/index.html
.RE
.SH "Generating offline manpage documents"
To generate man page documents for the \fBman\fR(1) command:
.RS 2m
# Select an empty directory where the man page files will be generated.
MANPAGE_DIR=<some\-local\-directory>
.RE
.RS 2m
# Generate the man pages in $MANPAGE_DIR.
# Should take ~1 min, 10 min or more on slower systems.
gcloud meta generate\-help\-docs \-\-manpage\-dir=$MANPAGE_DIR
.RE
.RS 2m
# Append $MANPAGE_DIR to the MANPATH environment variable:
export MANPATH=$MANPATH:$MANPAGE_dir
.RE
Then run the man command on gcloud manpages:
.RS 2m
man gcloud info
.RE
.SH "NOTES"
This command is currently in beta and might change without notice. These
variants are also available:
.RS 2m
$ gcloud topic offline\-help
.RE
.RS 2m
$ gcloud alpha topic offline\-help
.RE