Repeatable file work
Create, inspect, validate, convert, and export documents with the same commands in a shell, repository, or CI job.
GPDoc CLI
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.
$ 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
Write in the terminal, keep Markdown underneath, and use focused commands when the document needs to move through an existing engineering workflow.
Create, inspect, validate, convert, and export documents with the same commands in a shell, repository, or CI job.
Work with Markdown, GPDoc files, HTML, text, DOCX, PPTX text, and webpage URLs, then write a deliberate output artifact.
Conversion leaves the source unchanged unless you explicitly request an in-place write. JSON output supports scripts without exposing credentials.
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
Pass a local path, standard input, or an HTTP or HTTPS webpage URL to a focused command.
Convert, inspect, validate, export, or send a connected-provider update without an implicit sync or source overwrite.
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.
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 --jsongpdoc convert https://example.com/guide --to markdown --output guide.mdgpdoc login
gpdoc google connect
gpdoc google list
gpdoc microsoft connect
gpdoc microsoft list`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
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.