-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: add firebase init aitools command. #8807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
taeold
wants to merge
15
commits into
master
Choose a base branch
from
dl-init-ai-tools
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
042b6f2
feat: add firebase init ai-tools command.
taeold a39560d
feat: add firebase init ai-tools command
taeold ab9b821
refactor: rename ai-tools to aitools throughout codebase
taeold 10139aa
feat: add Claude Code support and smart config updates for aitools
taeold ab11aee
robust impl
taeold 0f90775
improve init flow.
taeold 9d9b2c3
revampt impl for better update exp.
taeold a414da9
Merge branch 'master' into dl-init-ai-tools
taeold ca5a190
Update prompts/FIREBASE_FUNCTIONS.md
taeold e6de47c
Update prompts/FIREBASE_FUNCTIONS.md
taeold db495ba
respond to gemini review.
taeold 30d688e
remove accidentally commited mcp tools.
taeold e686006
formatter.
taeold 0543c9b
simplify tests.
taeold 73d41d5
Merge branch 'master' into dl-init-ai-tools
taeold File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,7 @@ | |
"cross-spawn": "^7.0.5", | ||
"csv-parse": "^5.0.4", | ||
"deep-equal-in-any-order": "^2.0.6", | ||
"diff": "^5.0.0", | ||
"exegesis": "^4.2.0", | ||
"exegesis-express": "^4.0.0", | ||
"express": "^4.16.4", | ||
|
@@ -189,6 +190,7 @@ | |
"@types/cors": "^2.8.10", | ||
"@types/cross-spawn": "^6.0.1", | ||
"@types/deep-equal-in-any-order": "^1.0.3", | ||
"@types/diff": "^5.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"@types/express": "^4.17.0", | ||
"@types/express-serve-static-core": "^4.17.8", | ||
"@types/fs-extra": "^9.0.13", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Firebase CLI Context | ||
|
||
<project-structure> | ||
``` | ||
project/ | ||
├── firebase.json # Main configuration | ||
├── .firebaserc # Project aliases | ||
├── firestore.rules # Security rules | ||
├── functions/ # Cloud Functions | ||
├── public/ # Hosting files | ||
└── firebase-debug.log # Created when CLI commands fail | ||
``` | ||
</project-structure> | ||
|
||
## Common Commands | ||
|
||
<example> | ||
```bash | ||
# Initialize new features | ||
firebase init hosting | ||
firebase init functions | ||
firebase init firestore | ||
|
||
# Deploy everything or specific services | ||
|
||
firebase deploy | ||
firebase deploy --only hosting | ||
firebase deploy --only functions:processOrder,functions:sendEmail | ||
firebase deploy --except functions | ||
|
||
# Switch between projects | ||
|
||
firebase use staging | ||
firebase use production | ||
|
||
```` | ||
</example> | ||
|
||
## Local Development | ||
|
||
<example> | ||
```bash | ||
# Start all emulators | ||
firebase emulators:start | ||
|
||
# Start specific emulators | ||
firebase emulators:start --only functions,firestore | ||
|
||
# Common emulator URLs | ||
# Emulator UI: http://localhost:4000 | ||
# Functions: http://localhost:5001 | ||
# Firestore: http://localhost:8080 | ||
# Hosting: http://localhost:5000 | ||
```` | ||
|
||
</example> | ||
|
||
## Debugging Failed Commands | ||
|
||
<example> | ||
```bash | ||
# When any firebase command fails | ||
cat firebase-debug.log # Contains detailed error traces | ||
|
||
# Common fixes for errors in debug log | ||
|
||
firebase login --reauth # Fix authentication errors | ||
firebase use # Fix wrong project errors | ||
|
||
```` | ||
</example> | ||
|
||
## Complete Workflow Example | ||
|
||
<example> | ||
```bash | ||
# Clone and setup a Firebase project | ||
git clone https://github.com/example/my-app | ||
cd my-app | ||
|
||
# Initialize Firebase in existing project | ||
firebase init | ||
|
||
# Start local development | ||
firebase emulators:start | ||
|
||
# Make changes, then deploy to staging | ||
firebase use staging | ||
firebase deploy | ||
|
||
# Deploy to production | ||
firebase use production | ||
firebase deploy --only hosting,firestore | ||
```` | ||
|
||
</example> | ||
|
||
## Service Detection in firebase.json | ||
|
||
<example> | ||
```json | ||
{ | ||
"hosting": { | ||
"public": "dist", | ||
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"] | ||
}, | ||
"functions": { | ||
"source": "functions", | ||
"runtime": "nodejs20" | ||
}, | ||
"firestore": { | ||
"rules": "firestore.rules", | ||
"indexes": "firestore.indexes.json" | ||
}, | ||
"emulators": { | ||
"functions": { "port": 5001 }, | ||
"firestore": { "port": 8080 }, | ||
"hosting": { "port": 5000 } | ||
} | ||
} | ||
``` | ||
</example> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
diff
package is added as a dependency, but it doesn't seem to be used anywhere in the codebase. To keep dependencies minimal, please remove it if it's not needed.