firebase / firebase/firebase-tools
Support `--only` flag in `firebase init` for consistency with `firebase deploy`
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### Description
When running:
```sh
firebase init --only hosting
```
I get the following error:
```
error: unknown option '--only'
```
This was unexpected, since many Firebase developers (myself included) are used to running:
```sh
firebase deploy --only
```
It would be great if `firebase init` also supported the `--only` flag to align with this usage pattern. Even if it's just syntactic sugar for `firebase init hosting`, it would make the CLI feel more consistent and intuitive.
### Steps to Reproduce
1. Run `firebase init --only hosting`
2. Observe the error
### Expected Behavior
`firebase init --only hosting` should behave the same as `firebase init hosting`.
### Actual Behavior
The CLI throws an error saying `--only` is an unknown option.
### Additional Context
This might help reduce friction for developers transitioning between `deploy` and `init` commands.
I initially posted this on socials, where team member @mbleigh asked me to file a feature request: https://x.com/mbleigh/status/1915147194069557418
Contributor guide
Assessment
This issue has not been assessed yet.