Text automatically generated by txt2man
NAMEgrip - Preview GitHub Markdown files like Readme locally
grip [options] [PATH] [ADDRESS]
DESCRIPTIONGrip is a command-line server application written in Python that uses the GitHub markdown API to render a local readme file. The styles come directly from GitHub, so you'll know exactly how it will appear. Changes you make to the Readme will be instantly reflected in the browser without requiring a page refresh.
OPTIONSPATH is a file to render or a directory containing README.md. Use - for stdin.
ADDRESS is what to listen on, of the form HOST[:PORT], or just PORT
- Render as user-content like comments or issues.
- The repository context, only taken into account when using --user-content.
- A GitHub username for API authentication. If used without the --pass option, an upcoming password input will be necessary.
- A GitHub password or auth token for API auth.
- Renders wide, i.e. when the side nav is collapsed.
- Clears the cached styles and assets and exits.
- Exports to <path>.html or README.md instead of serving, optionally using [<address>] as the out file (- for stdout).
- Link to styles instead inlining when using --export.
- -b --browser
- Open a tab in the browser after the server starts.
- Specify a different base URL for the github API, for example that of a Github Enterprise instance. Default is the public API: https://api.github.com
- Manually sets the page's title. The default is the filename.
- Do not automatically refresh the Readme content when the file changes.
- Do not print to the terminal.
- -V, --version
- Version info.
- -h, --help
- Show help message and exit.
- Specify an alternative settings.py location, "~/.grip" by default.
- The URL of the Grip server, "/__/grip" by default.
EXAMPLESTo render the readme of a repository:
$ gripNow open a browser and visit http://localhost:6419. Or run with -b and Grip will open a new browser tab for you.
You can also specify a port:
$ grip 80Or an explicit file:
$ grip AUTHORS.mdAlternatively, you could just run grip and visit http://localhost:6419/AUTHORS.md since Grip supports relative URLs.
You can combine the previous examples:
$ grip AUTHORS.md 80Or specify a hostname instead of a port.:
$ grip CHANGES.md 0.0.0.0Or provide both:
$ grip . 0.0.0.0:80You can even bypass the server and export to a single HTML file, with all the styles and assets inlined:
$ grip --exportControl the output name with the second argument:
$ grip README.md --export readme.htmlIf you're exporting a bunch of files, you can prevent styles from being inlined to save space with --no-inline:
$ grip README.md --export --no-inline introduction.htmlReading from stdin:
$ cat README.md | grip -Writing to stdout:
$ grip AUTHORS.md --export - | bcatAnd both is also supported, allowing you to use Grip with other programs:
$ cat README.md | grip --export - | lessRendering as user-content like comments and issues is also supported, with an optional repository context for linking to issues:
$ grip --user-content --context=joeyespo/grip
BUGSBugs should be reported as issues at the project's GitHub page: <github.com/joeyespogrip/issues>
AUTHORGrip is developed by Joe Esposito <email@example.com>.
This man page was written by Tiago Ilieve <firstname.lastname@example.org> for the Debian distribution (but it may be used by others).