create_chatgpt_app

Crates.iocreate_chatgpt_app
lib.rscreate_chatgpt_app
version0.1.0
sourcesrc
created_at2023-04-17 13:32:39.681322
updated_at2023-04-17 13:32:39.681322
descriptionA CLI tool to create a new Rocket webapp with ChatGPT integration.
homepage
repository
max_upload_size
id841485
size45,688
Ben Greenberg (hummusonrails)

documentation

README

Create ChatGPT App

Create ChatGPT apps with Rust and Rocket.

Crates.io License: MIT Contributing Code of Conduct Visitors Made with Love

Create ChatGPT App works on macOS, Windows, and Linux.
If something doesn’t work, please file an issue.
If you have questions or need help, please ask in GitHub Discussions.

Quick Overview

cargo install create-chatgpt-app
create-chatgpt-app my-app
cd my-app
cargo run

Then open http://localhost:8000/ to see your app.

When you’re ready to deploy to production, create a release build with cargo build --release.

Get Started Immediately

You don’t need to install or configure tools like Rocket or ChatGPT API.
They are preconfigured and hidden so that you can focus on the code.

Create a project, and you’re good to go.

Creating an App

You’ll need to have Rust and Cargo installed on your local development machine. We recommend using the latest stable version. You can use rustup to manage Rust versions.

To create a new app, follow these steps:

cargo install create-chatgpt-app
create-chatgpt-app my-app

It will create a directory called my-app inside the current folder.
Inside that directory, it will generate the initial project structure:

my-app
├── README.md
├── Cargo.toml
├── src
│   ├── main.rs
│   ├── chatgpt.rs
└── templates
    └── index.html.hbs

No configuration or complicated folder structures, only the files you need to build your app.
Once the installation is done, you can open your project folder:

cd my-app

Inside the newly created project, you can run some built-in commands:

cargo run

Runs the app in development mode.
Open http://localhost:8000 to view it in the browser.

The page will automatically reload if you make changes to the code.
You will see the build errors and lint warnings in the console.

cargo build --release

Builds the app for production to the target/release folder.
It correctly optimizes the build for the best performance.

The build is minified and the filenames include the hashes.

Your app is ready to be deployed.

Contributing

Contributions are welcome! If you'd like to improve Create ChatGPT App or suggest new features, please submit a pull request or create an issue. More information on contributing to the project can be found in the contributing guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt