Create ChatGPT apps with Rust and Rocket.
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.
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
.
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.
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:
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.
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.
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.
This project is licensed under the MIT License - see the LICENSE file for details.