Skip to content

Commit c445ebf

Browse files
feature: add config reset command to README
1 parent a1fd045 commit c445ebf

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,27 @@ Bootstraps the CLI configuration in your project's folder. This command creates
7171
- `--organization` (string): Organization name, required with `--api-token`
7272
- `--repository` (string): Repository name, required with `--api-token`
7373

74+
### `config reset` — Reset Configuration
75+
76+
Resets the Codacy configuration files and tool-specific configurations. This command overwrites existing configuration with either local default configurations or repository-specific configurations from Codacy.
77+
78+
```bash
79+
# Reset to local default configurations
80+
codacy-cli config reset
81+
82+
# Reset to repository-specific configurations from Codacy
83+
codacy-cli config reset --api-token <token> --provider <gh|gl|bb> --organization <org> --repository <repo>
84+
```
85+
86+
**Behavior:**
87+
- **Local mode**: Creates default configurations for all available tools
88+
- **Remote mode**: Fetches and applies repository-specific configurations from Codacy
89+
- Prevents accidental mode switching (remote to local requires explicit flags)
90+
- Overwrites existing `.codacy/codacy.yaml` and tool configurations
91+
- Creates or updates `.codacy/.gitignore` file
92+
93+
**Flags:** Same as `init` command (api-token, provider, organization, repository)
94+
7495
### `config discover` — Discover Project Languages
7596

7697
Scans a project directory to detect programming languages and automatically configures appropriate static analysis tools. This command updates both `languages-config.yaml` and `codacy.yaml` with relevant tools for detected languages.

0 commit comments

Comments
 (0)