GPDoc

GPDoc CLI

Bring GPDoc files into your terminal workflow

Edit open Markdown files in rendered terminal GPEditor. The same public npm package also creates, inspects, validates, converts, and exports document files from a shell, repository, or CI workflow.

terminal
$ npm install --global @gpdoc/cli
$ gpdoc convert notes.html --to gpdoc --output notes.gpdoc.md
$ gpdoc inspect notes.gpdoc.md --json

{"format":"gpdoc-markdown","managed":true}

Why use the CLI

File operations that fit the way technical teams work

Write in the terminal, keep Markdown underneath, and use focused commands when the document needs to move through an existing engineering workflow.

Repeatable file work

Create, inspect, validate, convert, and export documents with the same commands in a shell, repository, or CI job.

Open inputs and outputs

Work with Markdown, GPDoc files, HTML, text, DOCX, PPTX text, and webpage URLs, then write a deliberate output artifact.

Keep writes deliberate

Conversion leaves the source unchanged unless you explicitly request an in-place write. JSON output supports scripts without exposing credentials.

Use connected tools when needed

Connect Google Drive or Microsoft 365 to list files and run explicit updates. Use GitHub Gist and repository commands with your linked GitHub account.

How it works

One command, one explicit outcome

01

Start with a file or webpage

Pass a local path, standard input, or an HTTP or HTTPS webpage URL to a focused command.

02

Run one explicit operation

Convert, inspect, validate, export, or send a connected-provider update without an implicit sync or source overwrite.

03

Open the editor you need

By default, `gpdoc open` launches terminal GPEditor and `gpdoc edit` launches browser GPEditor. Use `--editor local` to select `$VISUAL` or `$EDITOR`, or `--editor terminal` to select the terminal explicitly.

Common commands

Create, edit, and validate

gpdoc new docs/release-plan.gpdoc.md --title "Release plan"
gpdoc open docs/release-plan.gpdoc.md
gpdoc edit docs/release-plan.gpdoc.md
gpdoc validate docs/release-plan.gpdoc.md --json

Convert a webpage to Markdown

gpdoc convert https://example.com/guide --to markdown --output guide.md

Connect and list cloud files

gpdoc login
gpdoc google connect
gpdoc google list
gpdoc microsoft connect
gpdoc microsoft list
Connected provider actions

Sign in once, then make a deliberate remote update

`gpdoc login` opens a browser for GPDoc device authorization and saves the local CLI session after sign-in. Use `gpdoc google connect` or `gpdoc microsoft connect` to connect a provider, then list its files or run an explicit upload or update. With your linked GitHub account, create or update a Gist or write one repository file. Write commands return the resulting remote identifier, revision, or URL without printing provider credentials.

Designed for deliberate automation

Provider writes require an explicit command, selected target, and existing connected account. Listing files does not sync them in the background.

Get started

Install the GPDoc CLI. Open your document in the terminal.

Terminal editing requires an interactive terminal and Node.js 20+ on macOS/Linux. On Windows, use Node 22.17+ (22.x), 24.2+ (24.x), or 25+. Other CLI commands require Node.js 20+. Use npm for installation or npx for a one-time command.

The active Markdown block reveals its source while surrounding content stays rendered. Controls and rendering differ from graphical clients. Local terminal saves are explicit; ordinary local files are not automatically connected to collaboration.