Git Product home page Git Product logo

aiformat's Introduction

aiformat

aiformat.demo.0.0.3.mp4

aiformat is a simple tool you can use from the command line. It helps you select files and folders and change them into a format that AI assistants like Claude can understand.

This way, you can share code snippets and project structures faster and easier directly from the console, without having to copy and paste them manually.

This cli tool is built using Ink.

Updates

Mar 18 2024: Folder navigation support

  • Added searching inside deeply nested files.
  • Added the ability to expand/collapse folders with the Tab key.
  • Added emojis to differentiate between folders (๐Ÿ—‚๏ธ) and files (๐Ÿ“„).
  • Full code re-write, including ID based navigation.

Features

  • Interactively select files and folders from the current directory
  • Filter files and folders using a search query
  • Navigate through the list using arrow keys
  • Select/deselect items using left/right arrow keys
  • Convert selected files and folders into a format compatible with Claude
  • Automatically copy the formatted output to the clipboard

Install

To install aiformat, make sure you have Node.js installed on your system. Then, run the following command:

npm install --global aiformat

Usage

To use aiformat, navigate to the directory containing the files and folders you want to share with Claude. Then, run the following command:

aiformat

The CLI will display a list of files and folders in the current directory. You can navigate through the list using the up and down arrow keys. To select or deselect an item, use the left or right arrow keys.

You can also filter the list by typing a search query. The list will update in real-time as you type.

Once you have selected the desired files and folders, press Enter. The CLI will format the selected items into a structure that Claude can understand and automatically copy the output to your clipboard.

Example

cd /path/to/your/project
aiformat

aiformat example

Navigate through the list, select the desired files and folders, and press Enter. The formatted output will be copied to your clipboard, ready to be pasted into your conversation with your AI assistant.

The output is optimized for usage with Claude, by wrapping files with XML tags.

Example prompt:

Local Development

To start developing aiformat locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/farouqaldori/aiformat.git
  2. Change to the project directory:

    cd aiformat
  3. Install the dependencies:

    npm install
  4. Build the project:

    npm run build
  5. Link the package globally:

    npm link
  6. Now you can use the aiformat command globally to test your local changes.

Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

aiformat's People

Contributors

farouqaldori avatar robin-collins avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.