Skip to content

alymohamedhassan/ai-coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Coder

This is a simple CLI tool that can help you with simple developer tasks, like creating projects with frameworks, opening the project directly from terminal, getting code snippets. $ aicoder

Hint: This is not a tool that competes with Copilot or AWS CodeWhisperer

Install

Linux

  • Download the latest release
  • Execute the install_linux.sh file with sudo permissions $ sudo ./install_linux.sh
    • This will automatically download the binary from github and install it on your /usr/local/bin directory.

Windows

  • Download the latest windows release
  • Add the binary to your path in you environmental variables

Setup

For the first time, you will need to setup the tool with some configurations. As soon as you get the installation ready run $ aicoder setup or $ aicoder and select Setup

  1. This will ask you to enter the path of the directory you want to store your projects in.
  2. This tool's AI Assistant depends on Google Palm 2 API, create an API Key and insert it.

Running it

$ aicoder

There are 2 applications:-

- AI Assistant
- Projects
- Scripts

Applications

AI Assistant

Shortcut

$ aicoder ai

This application allows you to communicate with an LLM and if the response had some code, it will opt you to either, (save it, run it, or copy it).

1- A Text Input will show with the title Prompt > , and this is to allow you to enter your own prompt.

Example:- Prompt > Write a docker compose file with nginx

2- You will see an output like this

Language: YAML
Code ------------------------

version: '3'

services:
  nginx:
    image: nginx:latest
    container_name: nginx
    restart: always
    ports:
      - 80:80
    volumes:
      - ./conf/nginx.conf:/etc/nginx/conf.d/default.conf
      - ./www:/var/www/html

Do you want to execute this code or save it? r (Run) / s (Save) / c (Copy) / q (quit): 

a. The language parameter shows you the language of the code, and this does not always show up, it may show as Language: b. The Text under the Code ---------------- is the code generated by the LLM c. The last this is a question that asks you to run it in the terminal (if it was a bash script, for example), save it, copy it to clipboard.

Hint:- If you want to save it to a project, you can do that under the (Save) option.

Projects

This application allows you to open or create new Projects.

Shortcut

$ aicoder p

This application allows you to create or open a project directly from the tool. It has two options:

  1. List Projects, and these are the list of projects in the directory specified in the configurations
  2. New Project, and this allows you to create a new project and a script to initiate it

Scripts

This application allows you to execute scripts that are saved in your configurations.

Shortcut

$ aicoder s

Configuration

Shortcut

$ aicoder c

This allows you to change tool configurations. For now, there is only one, which is adding project frameworks installer. A project framework installer is a script that you use to create a new project by a specific framework, Django for example.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published