feat(init): add -f as short alias for --force#329
Conversation
The import and sync commands already had -f, but init was missing it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds the -f short alias for the --force flag on the init command. No security vulnerabilities were found. However, while the implementation is correct, the change is incomplete as it's missing updates to documentation and tests.
|
|
||
| /// Overwrite existing configuration file | ||
| #[arg(long)] | ||
| #[arg(short, long)] |
There was a problem hiding this comment.
This change is incomplete without corresponding updates to documentation and tests.
- The documentation in
docs/cli/init.mdshould be updated to include the new-fflag. It appears this file is auto-generated, so you may need to run a script to update it. - A test case should be added to
test/init.batsto verify thatfnox init -fworks as expected and prevents future regressions. The test plan in the PR description indicates this is a pending task.
Please add these changes to complete the feature.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR adds
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CLI as fnox CLI (clap)
participant Init as InitCommand::run()
User->>CLI: fnox init -f (or --force)
CLI->>Init: force=true, global=false, skip_wizard=false
Init->>Init: config_path.exists() && !self.force → false (skip error)
Init->>Init: run_wizard() or Config::new()
Init->>User: ✓ Created new fnox configuration at '...'
User->>CLI: fnox init (no flag, file exists)
CLI->>Init: force=false
Init->>Init: config_path.exists() && !self.force → true
Init->>User: Error: "already exists. Use --force to overwrite."
|
### 🚀 Features - **(cloudflare)** add Cloudflare API token lease backend by [@jdx](https://github.com/jdx) in [#335](#335) - **(fido2)** bump demand to v2, mask PIN during typing by [@jdx](https://github.com/jdx) in [#334](#334) - **(init)** add -f as short alias for --force by [@jdx](https://github.com/jdx) in [#329](#329) - **(lease)** add --all flag, default to creating all leases by [@jdx](https://github.com/jdx) in [#337](#337) - **(lease)** add GitHub App installation token lease backend by [@jdx](https://github.com/jdx) in [#342](#342) ### 🐛 Bug Fixes - **(config)** fix directory locations to follow XDG spec by [@jdx](https://github.com/jdx) in [#336](#336) - **(exec)** use unix exec and exit silently on subprocess failure by [@jdx](https://github.com/jdx) in [#339](#339) - **(fido2)** remove duplicate touch prompt by [@jdx](https://github.com/jdx) in [#332](#332) - **(set)** write to lowest-priority existing config file by [@jdx](https://github.com/jdx) in [#331](#331) - **(tui)** skip providers requiring interactive auth by [@jdx](https://github.com/jdx) in [#333](#333) ### 🛡️ Security - **(ci)** retry lint step to handle transient pkl fetch failures by [@jdx](https://github.com/jdx) in [#341](#341) - **(mcp)** add MCP server for secret-gated AI agent access by [@jdx](https://github.com/jdx) in [#343](#343) - add guide for fnox sync by [@jdx](https://github.com/jdx) in [#328](#328) ### 🔍 Other Changes - share Rust cache across CI jobs by [@jdx](https://github.com/jdx) in [#340](#340)
Summary
-fshort flag for--forceon theinitcommandimportandsynccommands already had-f; this makes it consistentTest plan
cargo checkpassesfnox init -fworks as expected🤖 Generated with Claude Code
Note
Low Risk
Small CLI flag metadata change with no impact to config generation logic beyond how the option is invoked.
Overview
Adds
-fas a short option for theinitcommand’s--forceflag, aligning the CLI UX with other commands that already support-ffor overwrite/skip confirmations.Written by Cursor Bugbot for commit cf8853f. This will update automatically on new commits. Configure here.