https://github.com/souvikns/ink-router-cli
A react-router style CLI parser for InkJS.
https://github.com/souvikns/ink-router-cli
cli nodejs react typescript
Last synced: about 1 year ago
JSON representation
A react-router style CLI parser for InkJS.
- Host: GitHub
- URL: https://github.com/souvikns/ink-router-cli
- Owner: Souvikns
- License: mit
- Created: 2021-05-02T11:37:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-05T04:38:54.000Z (about 5 years ago)
- Last Synced: 2025-04-09T21:24:16.638Z (about 1 year ago)
- Topics: cli, nodejs, react, typescript
- Language: TypeScript
- Homepage: https://ink-router-cli.onrender.com/
- Size: 491 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ink-Router-Cli
## ink-cli-parser
ink-cli-parser is a cli parser tool that is built just for
[ink](https://github.com/vadimdemedes/ink). You can pass in you custom ink help
component and error component.
## Table Of Contents
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Usage](#usage)
- [Api reference](#api-reference)
## Getting Started
To install `ink-cli-parser`, ensure that you have Node.js >=10.
[Install nodejs from here](https://nodejs.org/en/)
### Installation
The easiest way to install `ink-cli-parser` is using NPM. If you have Node.js
installed, it is most likely that you have NPM installed as well
```
$ npm install ink-cli-parser
```
## Usage
```tsx
import React, { FC } from "react";
import { Router, Switch, Command } from "ink-cli-router";
import { render, Text } from "ink";
const Create = () => {
return {"Creating file"};
};
const App: FC<{ any }> = () => {
return (
} />
);
};
render();
```

---
## Api Reference
To read more about the API you can visit [here](https://ink-router-cli.onrender.com/)