Skip to content

Commit 11193cb

Browse files
committed
fix: change default config file to flamingock-cli.yml
1 parent 207f4ba commit 11193cb

File tree

6 files changed

+40
-40
lines changed

6 files changed

+40
-40
lines changed

cli/flamingock-cli/CLI-README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ After building, `flamingock-cli-dist/` contains:
7676
- **`flamingock-cli.jar`** - Self-contained executable JAR with all dependencies
7777
- **`flamingock`** - Unix/Linux/macOS executable shell script
7878
- **`flamingock.bat`** - Windows executable batch file
79-
- **`flamingock.yml`** - Sample configuration file
79+
- **`flamingock-cli.yml`** - Sample configuration file
8080

8181
## Configuration
8282

@@ -130,7 +130,7 @@ flamingock:
130130
131131
### Configuration File Resolution
132132
1. Command line argument: `--config /path/to/file.yml`
133-
2. Default: `flamingock.yml` in current directory
133+
2. Default: `flamingock-cli.yml` in bin directory
134134

135135
## Architecture
136136

cli/flamingock-cli/CLI_SPECIFICATION.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ flamingock [command] [operation] [options]
88

99
## General Principles
1010

11-
- The CLI is **lightweight**:
12-
- It only builds an `OpsClient` via the `OpsClientBuilder`.
13-
- All business logic is delegated to the `OpsClient` (or components it delegates to).
11+
- The CLI is **lightweight**:
12+
- It only builds an `OpsClient` via the `OpsClientBuilder`.
13+
- All business logic is delegated to the `OpsClient` (or components it delegates to).
1414
- The CLI only parses input, calls `OpsClient`, and formats output.
15-
16-
- Default behavior:
17-
- `flamingock audit list` (with no flags) → shows the **current snapshot** (latest state per change).
15+
16+
- Default behavior:
17+
- `flamingock audit list` (with no flags) → shows the **current snapshot** (latest state per change).
1818
- Flags modify or filter the behavior.
1919

2020
---
@@ -31,11 +31,11 @@ flamingock audit list
3131
```
3232

3333
**Options:**
34-
- `--issues` (boolean, no value) → only audits with issues
35-
- `--history` (boolean, no value) → full chronological audit history (all states, ordered by time)
36-
- `--since <date>` (string, ISO-8601, e.g. `2025-01-01T00:00:00`) → list audits since a given date
37-
- `--limit <n>` (integer) → pagination limit
38-
- `--page <n>` (integer) → pagination page
34+
- `--issues` (boolean, no value) → only audits with issues
35+
- `--history` (boolean, no value) → full chronological audit history (all states, ordered by time)
36+
- `--since <date>` (string, ISO-8601, e.g. `2025-01-01T00:00:00`) → list audits since a given date
37+
- `--limit <n>` (integer) → pagination limit
38+
- `--page <n>` (integer) → pagination page
3939

4040
**Examples:**
4141
```bash
@@ -58,8 +58,8 @@ flamingock audit mark --change-unit <id> --state <state>
5858
```
5959

6060
**Options:**
61-
- `--change-unit <id>` / `-c <id>` → the changeId (required)
62-
- `--state <state>` / `-s <state>` → the state to mark (`APPLIED` or `ROLLED_BACK`) (required)
61+
- `--change-unit <id>` / `-c <id>` → the changeId (required)
62+
- `--state <state>` / `-s <state>` → the state to mark (`APPLIED` or `ROLLED_BACK`) (required)
6363

6464
**Examples:**
6565
```bash
@@ -71,7 +71,7 @@ flamingock audit mark -c CU123 -s ROLLED_BACK
7171

7272
## Global Options
7373

74-
- `--config <file>` / `-c <file>` → path to configuration file (default: `flamingock.yml`)
74+
- `--config <file>` / `-c <file>` → path to configuration file (default: `flamingock-cli.yml`)
7575
- `--help` / `-h` → show help information
7676
- `--version` / `-V` → show version information
7777

@@ -80,8 +80,8 @@ flamingock audit mark -c CU123 -s ROLLED_BACK
8080
## Summary
8181

8282
- Command structure: `flamingock [command] [operation] [options]`
83-
- For now, only the `audit` command is implemented with:
84-
- `list` (default snapshot, optional filters `--issues`, `--history`, `--since`, pagination)
83+
- For now, only the `audit` command is implemented with:
84+
- `list` (default snapshot, optional filters `--issues`, `--history`, `--since`, pagination)
8585
- `mark` (force a state for a change)
8686
- The CLI is a thin layer: config → build OpsClient → call → format result.
8787

@@ -93,4 +93,4 @@ flamingock audit mark -c CU123 -s ROLLED_BACK
9393
- **History flag**: Use `--history` to get the full chronological audit history.
9494
- **Issues flag**: Use `--issues` to filter for only entries with problems.
9595
- **Since flag**: Use `--since` with ISO-8601 format to filter by date.
96-
- **Pagination**: Client-side pagination is supported with `--limit` and `--page` flags.
96+
- **Pagination**: Client-side pagination is supported with `--limit` and `--page` flags.

cli/flamingock-cli/DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ curl http://localhost:8000/shell/
213213
**"Configuration file not found"**
214214
```bash
215215
# Debug: Check working directory
216-
./gradlew :cli:flamingock-cli:debugCli --args="--config $PWD/flamingock-cli-dist/flamingock.yml audit list"
216+
./gradlew :cli:flamingock-cli:debugCli --args="--config $PWD/flamingock-cli-dist/flamingock-cli.yml audit list"
217217
```
218218

219219
**"Failed to create OpsClient"**
@@ -226,7 +226,7 @@ export JAVA_OPTS="-Dorg.mongodb.driver.level=DEBUG"
226226
**"Multiple database configurations"**
227227
```bash
228228
# Validate YAML structure
229-
cat flamingock-cli-dist/flamingock.yml | grep -A5 "audit:"
229+
cat flamingock-cli-dist/flamingock-cli.yml | grep -A5 "audit:"
230230
```
231231

232232
#### Debug Log Analysis

cli/flamingock-cli/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cd flamingock-java
4747
```bash
4848
# Linux/macOS
4949
tar -xzf flamingock-cli-{version}.tar.gz
50-
50+
5151
# Windows (or use any ZIP tool)
5252
unzip flamingock-cli-{version}.zip
5353
```
@@ -56,7 +56,7 @@ cd flamingock-java
5656
```bash
5757
# Linux/macOS
5858
./flamingock-cli-{version}/bin/flamingock --help
59-
59+
6060
# Windows
6161
flamingock-cli-{version}\bin\flamingock.bat --help
6262
```
@@ -81,18 +81,18 @@ java -jar flamingock-cli.jar --help
8181

8282
## Configuration
8383

84-
Create a `flamingock.yml` configuration file (see `flamingock-sample.yml` for reference):
84+
Modify `flamingock-cli.yml` configuration file:
8585

8686
```yaml
8787
flamingock:
8888
service-identifier: "my-service"
89-
89+
9090
# For MongoDB
9191
audit:
9292
mongodb:
9393
connection-string: "mongodb://localhost:27017"
9494
database: "myapp"
95-
95+
9696
# For DynamoDB
9797
# audit:
9898
# dynamodb:
@@ -112,7 +112,7 @@ flamingock audit list # List all audit entries
112112
flamingock audit get -c <change-id> # Get specific audit entry
113113
flamingock audit fix -c <change-id> # Fix audit issue
114114

115-
# Issue operations
115+
# Issue operations
116116
flamingock issue list # List all issues
117117
flamingock issue get # Get next issue (or specific with -c)
118118
flamingock issue get -c <change-id> # Get specific issue
@@ -206,7 +206,7 @@ cli/flamingock-cli/
206206
│ │ ├── config/ # Configuration handling
207207
│ │ └── util/ # Utilities
208208
│ └── dist/ # Distribution resources
209-
│ └── flamingock-sample.yml # Sample configuration
209+
│ └── flamingock-cli.yml # Sample configuration
210210
└── build.gradle.kts # Build configuration
211211
```
212212

@@ -264,4 +264,4 @@ Apache License 2.0 - See [LICENSE](../../LICENSE) file for details.
264264

265265
- Documentation: https://docs.flamingock.io/cli
266266
- Issues: https://github.com/flamingock/flamingock-java/issues
267-
- Discussions: https://github.com/flamingock/flamingock-java/discussions
267+
- Discussions: https://github.com/flamingock/flamingock-java/discussions

cli/flamingock-cli/src/dist/flamingock-sample.yml renamed to cli/flamingock-cli/src/dist/flamingock-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Flamingock CLI Configuration Sample
2-
# Copy this file to flamingock.yml and modify as needed
2+
# Modify this file as needed
33

44
flamingock:
55
service-identifier: "flamingock-cli"

cli/flamingock-cli/src/main/java/io/flamingock/cli/FlamingockCli.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,26 @@
4747
)
4848
public class FlamingockCli implements Runnable {
4949

50-
@Option(names = {"-c", "--config"},
51-
description = "Path to configuration file. Global option - must be placed before commands. (default: flamingock.yml)",
50+
@Option(names = {"-c", "--config"},
51+
description = "Path to configuration file. Global option - must be placed before commands. (default: flamingock-cli.yml)",
5252
order = 0)
53-
private String configFile = "flamingock.yml";
54-
53+
private String configFile = "flamingock-cli.yml";
54+
5555
@Mixin
5656
private LoggingMixin loggingMixin;
5757

5858
public static void main(String[] args) {
5959
FlamingockCli cli = new FlamingockCli();
6060
CommandLine cmd = new CommandLine(cli);
61-
61+
6262
cmd.setExecutionStrategy(parseResult -> {
6363
cli.loggingMixin.initializeLogging();
6464
return new CommandLine.RunLast().execute(parseResult);
6565
});
66-
66+
6767
// Use custom exception handler for better error messages
6868
cmd.setExecutionExceptionHandler(new CliExceptionHandler());
69-
69+
7070
int exitCode = cmd.execute(args);
7171
System.exit(exitCode);
7272
}
@@ -75,12 +75,12 @@ public static void main(String[] args) {
7575
public void run() {
7676
// Initialize logging when any command is about to run
7777
loggingMixin.initializeLogging();
78-
78+
7979
// This runs when no subcommand is specified - show help
8080
new CommandLine(this).usage(System.out);
8181
}
82-
82+
8383
public String getConfigFile() {
8484
return configFile;
8585
}
86-
}
86+
}

0 commit comments

Comments
 (0)