GPDoc logoGPDoc

GPDoc CLI

Bring GPDoc files into your terminal workflow

Use a public npm package to create, inspect, validate, convert, and export open document files from a shell, repository, or CI workflow. Use GPEditor when the work needs rich document editing.

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

The CLI is useful when the document needs to move through an existing engineering workflow without turning a shell command into a second document editor.

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

After connecting accounts in GPDoc, run explicit Google Drive, Microsoft 365, GitHub Gist, and repository actions from the same local file.

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

Continue in the right editor

Use GPEditor for rich document work, or `gpdoc edit` to open the editor configured through `$VISUAL` or `$EDITOR`.

Common commands

Create and validate

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

Convert a webpage to Markdown

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

Sign in and use connected providers

gpdoc login
gpdoc google upload docs/release-plan.gpdoc.md --title "Release plan"
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. Once a provider is connected in GPDoc, use explicit commands to upload or update Google Drive and Microsoft 365 files, create or update GitHub Gists, or write one repository file. 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. The CLI does not browse cloud files or sync them in the background.

Get started

Install the GPDoc CLI, then keep rich document work in the right editor.

The CLI requires Node.js 20 or later. Use npm for installation or npx for a one-time command.

The CLI is not a terminal rich-text editor. Use GPEditor or your configured editor for document body editing.