Skip to content

Latest commit

 

History

History
47 lines (26 loc) · 2.78 KB

TUTORIAL.md

File metadata and controls

47 lines (26 loc) · 2.78 KB

Tutorial - Project Overview: aicode

This tutorial is aimed at explaining the basic overview of the aicode project, constructed by Pablo Schaffner. This project is a command-line driven application that provides automation support for code development. Think of this application as a powerful tool for automating tedious tasks and enhancing productivity.

Baseline

The root folder of the application consists of several integral files:

  • package.json: This file contains meta-data about your app, along with its dependencies. Aicode uses numerous packages such as yargs for command-line parsing, glob for directory parsing, dotenv for environment variable management, and more.

  • index.js: This JavaScript file is the primary entry point of the application. It initializes the command-line interface (CLI) using yargs, handles user-inputs, and initiates the appropriate actions based on the inputs. It is here where most action queries are directed and served by referencing other files in the 'actions' directory.

  • example_usage.md: This file includes some example commands that you can use with the application.

  • README.md: The README provides a basic introductory overview to the project, its features, and some usage examples.

  • TUTORIAL.md: A tutorial guide for understanding the AI Code project.

  • helpers/codeBlocks.js: This helper file runs JavaScript code blocks that provide the context for handling user actions.

  • actions: This directory contains different markdown files, each representing possible AI Code commands. These action commands can be anything from writing a tutorial to answering a user query.

In summary, the aicode is basically made of command-line interface parsing and action handling logic, which are centered around the index.js file, and a set of 'action' markdown files inside the actions folder. Each of these 'actions' are designed to handle a specific request from the user input.

How to Use AICODE

Using the application is relatively simple. Here are few examples:

  • To generate a ReadMe file for your project's root, you can simply run:
aicode 'document this project'
  • To ask how many lines of code are in a specific JavaScript file, you can ask:
aicode 'count the number of lines of index.js'

Creating Custom Actions

Perhaps what's most exciting with aicode is the ability for you to create your own user commands. You can easily do that by adding your command markdown file inside the actions directory.

In conclusion, the aicode tool provides you a cleverly automated workflow for managing your code development process. You can simply interact with the CLI, instruct it with your needs, and let the tool do the tedious work, making you focus more on solving problems and creating remarkable products.

Generated by aicode