ink-router-cli runs with ink and is avaiable as a NPM package.
npm install --save ink-router-cli
ink-router-cli was heavily influenced by react-router, so most of the concepts are similiar with react-route
.
import {Router, Switch, Command} from 'ink-router-cli';
import {render, Text} from 'ink';
const App = () => {
return <Router argv={process.argv}>
<Switch>
<Command name="create" component={<Text>Create Command</Text>} />
</Switch>
</Router>
}
render(<App />)
Generated using TypeDoc