← 返回命令列表

Linux command

grip 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Preview README in current directory

grip

Preview and open in browser

grip -b

Preview specific file

grip [README.md]

Preview on specific port

grip [file.md] [8080]

Export to HTML file

grip --export [file.md]

Export to a specific HTML file

grip [README.md] --export [output.html]

Preview from stdin

cat [file.md] | grip -

说明

grip (GitHub Readme Instant Preview) is a command-line server that renders GitHub-flavored Markdown using GitHub's API. It displays how your README will appear on GitHub with accurate styling, and changes to files are reflected instantly without page refresh. Use --offline to avoid API rate limits for basic rendering.

参数

-b, --browser
Open in browser after starting.
--export
Export to HTML file instead of serving.
--offline
Render without GitHub API.
--norefresh
Disable auto-refresh on file changes.
--quiet
Suppress terminal output.
--user _user_
GitHub username for API auth.
--pass _pass_
GitHub password or personal access token.
--wide
Render wide page layout.
--user-content
Render as user-generated content (like comments or issues).
--context _repo_
Repository context for relative URL linking (e.g., user/repo).
--title _title_
Custom page title for the rendered output.
--no-inline
Do not inline CSS styles in exported HTML.
--api-url _url_
Use a custom GitHub API URL (for GitHub Enterprise).

FAQ

What is the grip command used for?

grip (GitHub Readme Instant Preview) is a command-line server that renders GitHub-flavored Markdown using GitHub's API. It displays how your README will appear on GitHub with accurate styling, and changes to files are reflected instantly without page refresh. Use --offline to avoid API rate limits for basic rendering.

How do I run a basic grip example?

Run `grip` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -b, --browser do in grip?

Open in browser after starting.