Skip to content

jayanth-14/pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pilot - AI Based Cli Agent

No more reading boring MAN pages—just say what you want and pilot handles it.

Table of contents:

What is Pilot?

Pilot is an AI-powered CLI agent with access to your filesystem via terminal. It takes your natural language prompt, generates the shell commands needed, and executes them automatically.

Prerequisites:

You'll need two things before installing:

Deno:

Deno is a JavaScript runtime. Pilot uses it to compile and run.

For Mac And Linux :

curl -fsSL https://deno.land/install.sh | sh

For windows:

irm https://deno.land/install.ps1 | iex

Gemini API Key:

Get your free API key from Google AI Studio.

Installing Pilot

Lets not wait anymore and install pilot -

Cloning Repository

git clone https://github.com/jayanth-14/pilot
cd pilot

Running the Installer

./install.sh

Setup API Key

Add your Gemini API key to the shell config file.

echo 'export GEMINI_API_KEY="your-api-key"' >> ~/.zshrc
source ~/.zshrc

Replace "your-api-key" with your actual key from Google AI Studio.

Usage

Now that the boring setup is done, let's move on to the fun part.

Basic Syntax:

pilot "your task in plain English"

Examples: Here are a few interactive examples to get started.

Want to change js files to ts?

pilot "rename all the .js files to .ts"

Want to know who is the top contributor in project?

pilot "analyze the git history and show me the most active contributors"

Want to see last 10 commit messages?

pilot "show me the last 10 commit messages"

Complex multi-step tasks

pilot "analyze git log and create a summary of changes from last week"

How it works

When you run Pilot, it reads your natural language prompt, combines it with system rules, sends that prompt to the Gemini AI along with a system prompt. Then executes the response as shell commands.

The pipeline

  1. Pilot reads the prompt.
  2. Reads for any context provided from stdin.
  3. Builds a complete prompt with system rules(To only output shell commands).
  4. Sends to Gemini AI for command generation.
  5. Executes the shell commands via zsh.

Smart recursion: If pilot needs more info, it can call itself with context:

git log --oneline | pilot "summarize these commits"

Limitations

Pilot is powerful, but not perfect. Keep these in mind:

  • Mac/zsh only - No Windows or Linux support yet
  • No confirmation prompts - Commands execute immediately (be careful!)
  • AI can make mistakes - Gemini might misunderstand or hallucinate commands
  • API dependency - Requires internet and valid Gemini API key

Future Improvements

Pilot v1 works, but here's what's coming:

Safety First:

  • Dry-run mode - Preview commands before execution (pilot --dry-run "...")
  • Confirmation prompts - Require approval for dangerous operations (rm, sudo, etc.)

Better Experience:

  • Command history - Track all executed commands in a log file (pilot --history to view)
  • Multi-platform support - Auto-detect OS and shell (Windows PowerShell, Linux bash)

Smarter AI:

  • Auto model selection - Complex tasks use powerful models, simple tasks use fast ones

Contributing & Feedback

Pilot is still in its early days. Found a bug? Have a cool idea? Want to contribute?

  • Open an issue on GitHub
  • Submit a PR if you're feeling adventurous

All feedback welcome—even the brutal kind. Let's make pilot better together!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published