Skip to content

Generate commands using AI without leaving your terminal

License

Notifications You must be signed in to change notification settings

johan-perso/magic-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Version franรงaise ici.

Magic Command

Get an AI-generated command instantly from your terminal. Use any model available on OpenRouter, you'll need your own API key.

Init.Vite.App.downscaled.mp4

Installation

Magic Command only supports recent versions of NodeJS (v20+).

# With npm
npm i -g magic-command

# Or with pnpm
pnpm i -g magic-command
$ magiccommand --version
$ magiccommand --help
$ magiccommand "Init Vite App"

#   โ•ญ Magic Command โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
#   โ”‚                                       โ”‚
#   โ”‚   npm init vite@latest                โ”‚
#   โ”‚                                       โ”‚
#   โ”‚   Usage: 417 tokens, took 1.10 secs   โ”‚
#   โ”‚                                       โ”‚
#   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Configuration

You will need to add your OpenRouter API key to your environment variables, this is usually done through the .bashrc or .zshrc file on macOS and Linux.

# Authentication, required
MAGICCOMMAND_OPENROUTER_KEY=sk-or-...

# Customization, optional
MAGICCOMMAND_OPENROUTER_MODEL=openai/gpt-4o-mini

Licence

MIT ยฉ Johan. Support this project via Ko-Fi or PayPal if you want to help me ๐Ÿ’™