Repeatable file work
Create, inspect, validate, convert, and export documents with the same commands in a shell, repository, or CI job.
GPDoc CLI
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.
$ 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
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.
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.
After connecting accounts in GPDoc, run explicit Google Drive, Microsoft 365, GitHub Gist, and repository actions from the same local file.
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.
Use GPEditor for rich document work, or `gpdoc edit` to open the editor configured through `$VISUAL` or `$EDITOR`.
gpdoc new docs/release-plan.gpdoc.md --title "Release plan"
gpdoc validate docs/release-plan.gpdoc.md --jsongpdoc convert https://example.com/guide --to markdown --output guide.mdgpdoc login
gpdoc google upload docs/release-plan.gpdoc.md --title "Release plan"`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
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.