Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ephraimduncan/termd
Render markdown in the terminal
https://github.com/ephraimduncan/termd
cli javascript markdown termd terminal typescript
Last synced: 6 days ago
JSON representation
Render markdown in the terminal
- Host: GitHub
- URL: https://github.com/ephraimduncan/termd
- Owner: ephraimduncan
- License: mit
- Created: 2020-12-05T13:21:04.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-09T11:30:04.000Z (almost 2 years ago)
- Last Synced: 2024-10-25T12:36:56.583Z (14 days ago)
- Topics: cli, javascript, markdown, termd, terminal, typescript
- Language: TypeScript
- Homepage:
- Size: 561 KB
- Stars: 65
- Watchers: 1
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-markdown - termd - Markdown renderer for the terminal with syntax highlighting. ![Mac OS X][macosx] ![Linux][linux] ![Windows][windows] (Tools / Miscellaneous)
README
# termd
> Render Markdown in the Terminal
[![NPM Version][npm-image]][npm-url]
Preview and render markdown files in the terminal with color syntax highlighting. Also render markdown from a given `url` or from a GitHub repository and an npm package.
## Screenshots
![Image1](./assets/screenshot1.png)
![Image2](./assets/screenshot.png)
## Installation
```sh
npm install -g termd# Using `npx`
npx termd [options]
```## Usage example
### Basic usage
To render a markdown file in the terminal, use the `termd` command with the file name or relative path to the markdown file.
```sh
termd# Example
termd readme.md....
```#### Commands
```
--string, -s Use a string with markdown syntax
--url, -u Render markdown from url in the terminal
--npm, -n Render npm package readme in the terminal
--github, -g Render github repository readme in the terminal
```#### Examples
##### Render a markdown syntax in the terminal
```sh
termd --string="## Heading 2"
termd -s ## Heading 2
Heading 2
```##### Render a markdown from a given url
```sh
termd --url="https://some.url/with/markdown/file"
termd -u https://some.url/with/markdown/file
...
```##### Render readme of an npm package
```sh
termd --npm="termd" # Package name
termd -n termd
...
```##### Render readme of a github repository
```
termd --github="dephraiim/termd" # Repo Owner / Repo Name
termd -g dephraiim/termd
...
```## Development setup
To begin developing, do this.
```sh
git clone https://github.com/dephraiim/termd.git
cd termd
npm install
```## Contributing
1. [Fork](https://github.com/dephraiim/termd/fork) it
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request## License
MIT © [Ephraim Atta-Duncan](https://twitter.com/dephraiim)
[npm-image]: https://img.shields.io/npm/v/termd.svg
[npm-url]: https://npmjs.org/package/termd