Skip to content

A Ruby gem that automatically generates a context file containing information about your Rails application's models, controllers, and environment.

License

Notifications You must be signed in to change notification settings

calebl/autocontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autocontext

Autocontext is a Ruby gem that automatically generates a context file containing information about your Rails application's models, controllers, and environment. This context can then be used in conversations with LLMs to help them understand your application.

Installation

Add this line to your application's Gemfile:

gem 'autocontext'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install autocontext

Usage

To generate the autocontext file, run:

rake autocontext:generate

This will create a .autocontext file in your Rails application's root directory containing:

  • Ruby and Rails versions
  • List of controllers
  • List of models with their:
    • Table names
    • File paths
    • Associations

Future Work

  • For larger projects, generate the context around specific controllers or models instead of the entire application.
  • Include view code in the context.
  • Add more details to controller descriptions.

Development

Checkout the repo and run bundle install.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yourusername/autocontext.

License

The gem is available as open source under the terms of the MIT License.

About

A Ruby gem that automatically generates a context file containing information about your Rails application's models, controllers, and environment.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages