nicnocquee / ink-chat-cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chat-cli

About

This is a demo of using React Ink to make a real time chat app in command line using Supabase. Check out the blog post here.

Quick start

  • Create a project in Supabase
  • Take note of the project URL and the public anon key
  • Open terminal then run npx @nicnocquee/chat-cli --room myroom --nickname yournickname --supabaseUrl the-url-of-the-supabase-project --supabaseKey the-public-anon-key-of-the-project
  • Open another tab in the terninal then run the same command above but with different nickname

Install

$ npm install --global @nicnocquee/chat-cli

CLI

Usage
	  $ chat-cli

	Options
		--room  room id, anyone who has the room id can join
		--nickname your nickname, can be emoji
		--supabaseUrl URL of your supabase project
		--supabaseKey The public anon key of the supabase project

	Examples
	  $ chat-cli --room=room1 --nickname=john --supabaseUrl="https://supabase" --supabaseKey="xxx"

Note

I made a book, Pull Request Best Practices. Check it out!

About


Languages

Language:TypeScript 70.7%Language:JavaScript 29.3%