Skip to content

khulnasoft/gpt4cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gpt4cli

PRs Welcome Release Release





Learn more about Gpt4cli  🧐


Overview  📚

Churn through your backlog, work with unfamiliar technologies, get unstuck, and spend less time on the boring stuff.

Gpt4cli is a reliable and developer-friendly AI coding agent in your terminal. It can plan out and complete large tasks that span many files and steps.

Designed for real-world use-cases, Gpt4cli can help you build a new app quickly, add new features to an existing codebase, write tests and scripts, understand code, and fix bugs.


Install  📥

curl -sL https://raw.githubusercontent.com/khulnasoft/gpt4cli/main/app/cli/install.sh | bash

Note: Windows is supported via WSL. Gpt4cli only works correctly on Windows in the WSL shell. It doesn't work in the Windows CMD prompt or PowerShell.

More installation options.


Get started  🚀

Gpt4cli uses OpenAI by default. If you don't have an OpenAI account, first sign up here.

Then generate an API key here and export it.

export OPENAI_API_KEY=...

Now cd into your project's directory. Make a new directory first with mkdir your-project-dir if you're starting on a new project.

cd your-project-dir

Then start your first plan with gpt4cli new.

gpt4cli new

Load any relevant files, directories, directory layouts, urls, or images into the LLM's context with gpt4cli load.

gpt4cli load some-file.ts another-file.ts
gpt4cli load src/components -r # load a whole directory
gpt4cli load src --tree # load a directory layout (file names only)
gpt4cli load src/**/*.ts # load files matching a glob pattern
gpt4cli load https://raw.githubusercontent.com/khulnasoft/gpt4cli/main/README.md # load the text content of a url
gpt4cli load images/mockup.png # load an image

Now send your prompt. You can pass it in as a file:

gpt4cli tell -f prompt.txt

Write it in vim:

gpt4cli tell # tell with no arguments opens vim so you can write your prompt there

Or pass it inline (use enter for line breaks):

gpt4cli tell "add a new line chart showing the number of foobars over time to components/charts.tsx"

Gpt4cli will make a plan for your task and then implement that plan in code. The changes won't yet be applied to your project files. Instead, they'll accumulate in Gpt4cli's sandbox.

To learn about reviewing changes, iterating on the plan, and applying changes to your project, continue with the full quickstart.


Docs  🛠️


Build complex software with LLMs  🌟

⚡️  Changes are accumulated in a protected sandbox so that you can review them before automatically applying them to your project files. Built-in version control allows you to easily go backwards and try a different approach. Branches allow you to try multiple approaches and compare the results.

📑  Manage context efficiently in the terminal. Easily add files or entire directories to context, and keep them updated automatically as you work so that models always have the latest state of your project.

🧠  By default, Gpt4cli relies on the OpenAI API and requires an OPENAI_API_KEY environment variable. You can also use it with a wide range of other models, including Anthropic Claude, Google Gemini, Mixtral, Llama and many more via OpenRouter.ai, Together.ai, or any other OpenAI-compatible provider.

✅  Gpt4cli supports Mac, Linux, FreeBSD, and Windows. It runs from a single binary with no dependencies.


Why Gpt4cli?  🤔

🏗️  Go beyond autocomplete to build complex functionality with AI.
🚫  Stop the mouse-centered, copy-pasting madness of coding with ChatGPT.
⚡️  Ensure the model always has the latest versions of files in context.
🪙  Retain granular control over what's in the model's context and how many tokens you're using.
⏪  Rewind, iterate, and retry as needed until you get your prompt just right.
🌱  Explore multiple approaches with branches.
🔀  Run tasks in the background or work on multiple tasks in parallel.
🎛️  Try different models and temperatures, then compare results.


Roadmap  🗺️

🧠  Support for open source models, Google Gemini, and Anthropic Claude in addition to OpenAI  ✅ released
🖼️  Support for multi-modal models—add images and screenshots to context ✅ released
🤝  Plan sharing and team collaboration
🖥️  VSCode and JetBrains extensions
📦  Community plugins and modules
🔌  Github integration
🌐  Web dashboard and GUI
🔐  SOC2 compliance
🛩️  Fine-tuned models

This list will grow and be prioritized based on your feedback.


Discussion and discord  💬

Speaking of feedback, feel free to give yours, ask questions, report a bug, or just hang out:


Contributors  👥

⭐️  Please star, fork, explore, and contribute to Gpt4cli. There's a lot of work to do and so much that can be improved.

Work on tests, evals, prompts, and bug fixes is especially appreciated.

Here's an overview on setting up a development environment.