Skip to content

🚧 Command to manage command execution history

Notifications You must be signed in to change notification settings

ogty/command-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚧 Command History 🚧

$ npm install --global command-history-cli
$ ch <command> [option]

Commands

Name Description Available options
start -n, -g
finish
template -p
list
history
current

Options

Long Short Type
--name -n string
--group -g string
--print p boolean

Examples

Template Output

Select a template and output commands combined with &&.

$ ch template -p

Create templates from execution history

$ ch start --name trpc-getting-started
$ mkdir trpc-getting-started
$ cd trpc-getting-started
$ mkdir server # 1
$ cd server
$ npm init -y
$ npm install express cors @trpc/server zod
$ npm install --save-dev typescript nodemon ts-node @types/express @types/node @types/cors
$ touch index.ts # 2
$ # ...
$ cd ..
$ npm create vite@latest client # 3
$ cd client
$ npm install
$ npm install @trpc/client @trpc/server @trpc/react-query @tanstack/react-query # 4
$ # ...
$ cd ..
$ cd server
$ npm install prisma --save-dev # 5
$ npx prisma init --datasource-provider sqlite
$ npx prisma db push
$ npx prisma studio # 6
$ ch finish
$ ch template
  1. Select trpc-getting-started
  2. Select multiple commands to be templated
  3. Name the template

For example, if you select comments 1 through 2 in the above procedure and name it server-setup, you will get the following code

$ mkdir server
$ cd server
$ npm init -y
$ npm install express cors @trpc/server zod
$ npm install --save-dev typescript nodemon ts-node @types/express @types/node @types/cors
$ touch index.ts

About

🚧 Command to manage command execution history

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published