• Stars
    star
    294
  • Rank 141,303 (Top 3 %)
  • Language
    TypeScript
  • Created almost 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flame AI: CLI for Interactive AI-Powered React Native Upgrades

Flame AI πŸ”₯

Flame AI is a CLI for interacting with OpenAI and doing codemods and codegen. It includes an interactive mode and several other specialized commands.

Flame AI screenshot

To run Flame, you need Node v18+ installed and have access to an OpenAI gpt-4 token key. If you need access to gpt-4, here's how to get it.

Flame works via npx:

npx flame --help

Commands

To see all commands, including some exciting experimental features, check out the Command Reference.

Upgrade: React Native

Flame AI's most effective command is for upgrading React Native apps.

Run this in the root of your React Native app:

# one-shot upgrade
npx flame upgrade react-native

# recommended interactive mode (much cooler):
npx flame upgrade react-native --interactive

Here's the command with all available options:

npx flame upgrade react-native --interactive --from=0.72.2 --to=auto --list --only=somefile.mm

Read more about flame upgrade react-native in the Command Reference.

Philosophy

AI (specifically large language models like OpenAI's ChatGPT) is a powerful tool. Flame AI is built to be a minimalist CLI that brings a great developer experience and useful tools for making code modifications (codemods) and code generation.

Given that Infinite Red is a React Native consultancy, the bulk of the built-in tools for Flame will be tuned for React Native development; however, the CLI is built to be extensible and we welcome contributions from the community.

A note about costs

Note that Flame AI costs a nominal amount of money to run, via OpenAI's API pricing. In our experiments, running a full React Native upgrade will cost about $0.05 USD or less. We frequently hit around $5 per day total cost when testing it over and over during a full work day. You must ensure you watch the CLI while it's working to ensure it doesn't get stuck in a loop and run up your bill. We are not responsible for any costs incurred by using Flame AI. We don't want those bills either, so we are regularly adding features and checks to avoid these sorts of issues. At this point, running Flame AI in an automated / unmonitored fashion is not recommended.

Limitations

  • You must have gpt-4 access for Flame AI to be useful. Our experiments with gpt-3.5-turbo have been very underwhelming.
  • The biggest limitation for FlameAI is the lack of prompt size. Currently, we're working with gpt-4, which has a token size of 8192 tokens (around 24k characters). This sounds like a lot, but considering a single code file of 200 lines can take up north of 10k characters, it is very limiting. When we have access to gpt-4-32k, we'll be able to do much more. Despite that, we've made impressive progress with the current token size.
  • LLMs are not perfect. They can hallucinate, miss stuff, and be generally weird. We're working on ways to mitigate this, but it's a limitation of current generation AI technology.

Contributing, modifying, running locally

See the Contributing Guide.

Get Help

If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.

Feel free to join our community Slack and join the #flame-ai-cli channel here: https://community.infinite.red.

License

Copyright (c) 2023 Jamon Holmgren & Infinite Red, Inc.

This project is open source and licensed under the MIT License.

More Repositories

1

ProMotion

ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby.
Ruby
1,265
star
2

react-native-colo-loco

Colocate your native modules and components with your JavaScript/JSX files.
JavaScript
292
star
3

qub

Qub is a CLI and QB64 web framework for building websites with QBasic. Star this repo!
Visual Basic 6.0
132
star
4

mst-async-storage

Brings AsyncStorage support to mobx-state-tree for React Native projects
TypeScript
31
star
5

bluebun

Bun-powered CLI library, inspired by Gluegun
TypeScript
29
star
6

rocket-elm

A small game where you pilot a rocket ship around. Written in Elm for learning.
HTML
28
star
7

path

Elm pathfinding demo by Jamon Holmgren and Chris Krycho
Elm
27
star
8

bacon-cheat-sheet

RubyMotion Bacon Specs Cheat Sheet
23
star
9

jamon.dev

Jamon Holmgren's personal website, built in QBasic (yes, really)
HTML
22
star
10

promotion-demo

Introducing ProMotion
Ruby
21
star
11

motion-table

MotionTable is a RubyMotion gem that makes it easy to handle UITableViews from a UITableViewController.
Ruby
20
star
12

textbox.page

Just a simple textbox for pasting text into
HTML
20
star
13

pave

Command line tools for Concrete5 websites. Star this repo if you're a Concrete5 developer who values automation!
Ruby
20
star
14

TrailBlazers

Live Coded React Native App -- from my talk at React Live Amsterdam 2019
TypeScript
17
star
15

motion-tab

MotionTab is a RubyMotion gem for making UITabBars easier to implement.
Ruby
16
star
16

active_tax

A Ruby gem for retrieving local sales tax rates from various government APIs.
Ruby
16
star
17

demo-sparrow

Attempt at implementing the Sparrow game engine in RubyMotion
Ruby
15
star
18

slackminder

Slack reminders desktop app
JavaScript
13
star
19

promotion-template

Simple template to start off right in ProMotion for RubyMotion
Ruby
11
star
20

PlayerPopularity

Rate NBA players
TypeScript
11
star
21

space-ball

An Electron-powered game. Manage a club in a fictional sport, Space Ball.
JavaScript
10
star
22

espn_app

Sample ProMotion / RubyMotion app using TDD
Ruby
9
star
23

mem-watcher

Helps you keep an eye on your RubyMotion iOS app's memory and CPU usage.
Ruby
9
star
24

dotfiles

My dotfiles
Shell
8
star
25

compressor

Concatenates your RubyMotion source files for faster compile times.
Ruby
7
star
26

acr-talk

Ancient City Ruby -- Talk Repo -- Jamon Holmgren / Morgan Laco
TypeScript
7
star
27

ArabCup

TypeScript
6
star
28

js

JS Playground, optimized for mobile
HTML
5
star
29

viper

Auto snake case for Objective-C methods in RubyMotion. It's called "Viper" because it's dangerous. ;-)
Ruby
5
star
30

dropship

[WIP] A CLI for setting up deployments to a DigitalOcean Droplet
Shell
4
star
31

phpGenesis

A lightweight php framework featuring layouts, automatic routing, pretty urls, phpActiveRecord integration and more.
PHP
4
star
32

echoes

TypeScript
4
star
33

promotion-motion-kit

MotionKit/ProMotion demo example
Ruby
4
star
34

motion-docs

(Deprecated) Access RubyMotion documentation from your REPL
Ruby
4
star
35

promotion-tutorial

A RubyMotion App Using ProMotion
Ruby
4
star
36

demo-blazers-highlights

Demonstration ProMotion/RubyMotion app showing NBA highlights from Youtube
Ruby
3
star
37

promotion-formotion

Example showing ProMotion 0.7 and Formotion working together.
Ruby
3
star
38

st

Space transport text-based game
TypeScript
3
star
39

promotion-styling

Styling guide for ProMotion, a RubyMotion framework
Ruby
3
star
40

RNL-ReactNativeStorybook

TypeScript
3
star
41

poikas

Suomi Poikas team website
TypeScript
3
star
42

mobx-state-tree-demo

JavaScript
3
star
43

jamon-electron-demo

TypeScript
2
star
44

OTAHack

TypeScript
2
star
45

motion-aws

Provides iOS and OSX connectivity to AWS services.
Ruby
2
star
46

NBAPlayers

TypeScript
2
star
47

rails_version

Rails gem for https://railsversion.herokuapp.com.
Ruby
2
star
48

WebViewPing

Java
2
star
49

OwlPlay

TypeScript
2
star
50

IgniteSnack

TypeScript
2
star
51

terve-sync

TypeScript
2
star
52

motion-motion

RubyMotion, now with more Motion!
Ruby
2
star
53

testdata

Repo for test data
1
star
54

toaster

RubyMotion-android "Toast" gem.
Ruby
1
star
55

TwitterApp

#TwitterCodeClass app https://twitter.com/jamonholmgren/status/1182354802233106432
JavaScript
1
star
56

terve-demo

TypeScript
1
star
57

CodeOptimization

Java
1
star
58

Diff

TypeScript
1
star
59

Zamboni

Swift
1
star
60

NativeIntegration

TypeScript
1
star
61

blazers-schedule

1
star
62

iced-tea

Objective-C
1
star
63

PizzaApp

Java
1
star
64

SecretSanta

Swift
1
star
65

codecounter

Twitter live demo of building a Gluegun app
TypeScript
1
star
66

timeline

Experimental Twitter replacement that nobody will read
1
star
67

TodoRealm

Java
1
star
68

FastingApp

TypeScript
1
star
69

blade

Fun little command-line adventure game
Ruby
1
star
70

SwipeApp

TypeScript
1
star
71

HexMap

GameMaker Studio 2 - Hex Map generator
Game Maker Language
1
star
72

BroRPG

JavaScript
1
star
73

clearsight_ruby_gem

Internal gem for ClearSight Studio common operations.
Ruby
1
star
74

jamon-cli

JavaScript
1
star
75

Attack5

Reprisal of an old game I made in my teens, using GameMaker Studio 2
Yacc
1
star