Skip to content

Commit f93911b

Browse files
Adam WespiserAdam Wespiser
Adam Wespiser
authored and
Adam Wespiser
committed
readme format
1 parent cceb0b3 commit f93911b

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ brew cask install confcrypt
1515
2. At the root of this repo, run `stack install`. (Takes 10-15 minutes.)
1616

1717
## Using confcrypt
18-
- create a config
18+
- **create a config**
1919
`confcrypt create <filename>` creates a new empty confcrypt config named `<filename>.econf`. Internally, it looks like this:
2020
```
2121
# confcrypt schema
@@ -36,52 +36,52 @@ brew cask install confcrypt
3636
# TIMEOUT_MS : Int
3737
# TIMEOUT_MS = 300
3838
```
39-
- read a config
40-
`confcrypt rsa read --key <filename> <filename>`
39+
- **read a config**
40+
`confcrypt rsa read --key <filename> <filename>`
4141
This command reads in the provided file, decrypts the configuration variables using the provided key, then prints them to stdout. This allows you to pipe the results to other utilities. Returns 0 on success.
42-
- add a parameter
43-
`confcrypt rsa add --key <filename> --name <String> --type <SchemaType> --vaue <String> --in-place <filename>
44-
Adds a new confguration parameter to the file. `--name` and `--value` are required, while `--type` and `--in-place`are optional.
42+
- **add a parameter**
43+
`confcrypt rsa add --key <filename> --name <String> --type <SchemaType> --vaue <String> --in-place <filename>`
44+
Adds a new confguration parameter to the file. `--name` and `--value` are required, while `--type` and `--in-place`are optional.
4545
If `--type` is provided, the schema record will be added immediately before the config variable.
4646
`--in-place` toggles whether to overwrite the provided file or emit the results to stdout.
4747
In total this adds two lines to the file. Returns 0 on sccess.
48-
- remove a parameter
49-
`confcrypt delete --name <String> --in-place <filename>`
50-
Removes an existing config parameter & associated schema. Returns 0 on success or 1 if the parameter is not found in the file.
48+
- **remove a parameter**
49+
`confcrypt delete --name <String> --in-place <filename>`
50+
Removes an existing config parameter & associated schema. Returns 0 on success or 1 if the parameter is not found in the file.
5151
`--in-place` toggles whether to overwrite the provided file or emit the results to stdout.
52-
- edit a parameter in-place
53-
`confcrypt rsa edit --key <filename> --name <String> --value <String> --type <SchemaType> --in-place <filename>`
54-
Modifies an existing configuration parameter in place, leaving all other lines unchanged.
52+
- **edit a parameter in-place**
53+
`confcrypt rsa edit --key <filename> --name <String> --value <String> --type <SchemaType> --in-place <filename>`
54+
Modifies an existing configuration parameter in place, leaving all other lines unchanged.
5555
While this isn't how it's actually implemented, this operation is equivalent to piping `confcrypt read` to a new file, editing the parameter, then reencrypting it.
5656
`--in-place` toggles whether to overwrite the provided file or emit the results to stdout.
57-
- validate a config
58-
`confcrypt rsa validate --key <filename> <filename>`
57+
- **validate a config**
58+
`confcrypt rsa validate --key <filename> <filename>`
5959
Checks that each config parameter matches the type of its schema. All errors are accumulated and returned at the end, with a response code equal to the number of failures.
6060
61-
- Using Amazon KMS instead of a local key
61+
- **Using Amazon KMS instead of a local key**
6262
The `rsa` command tree exists under `aws`, which changes the behavior of the `--key` parameter to represent a KMS key id rather than an on-disk rsa key file. The otherwise the semantics of the commands are identical between `rsa` and `kms` branches.
6363
6464
## The confcrypt file format
65-
```
66-
# confcrypt schema
67-
# Configuration parameters may be either a String, Int, or Boolean
68-
# Parameter schema take the following shape:
69-
# schema := [term | value | comment]
70-
# term := confname : type
71-
# confname := [a-z,A-Z,_,0-9]
72-
# type := String | Int | Boolean
73-
# value := confname = String
74-
# comment := # String
75-
#
76-
# For example:
77-
# DB_CONN_STR : String
78-
# DB_CONN_STR = Connection String
79-
# USE_SSL : Boolean
80-
# USE_SSL = True
81-
# TIMEOUT_MS : Int
82-
# TIMEOUT_MS = 300
83-
```
65+
```
66+
# confcrypt schema
67+
# Configuration parameters may be either a String, Int, or Boolean
68+
# Parameter schema take the following shape:
69+
# schema := [term | value | comment]
70+
# term := confname : type
71+
# confname := [a-z,A-Z,_,0-9]
72+
# type := String | Int | Boolean
73+
# value := confname = String
74+
# comment := # String
75+
#
76+
# For example:
77+
# DB_CONN_STR : String
78+
# DB_CONN_STR = Connection String
79+
# USE_SSL : Boolean
80+
# USE_SSL = True
81+
# TIMEOUT_MS : Int
82+
# TIMEOUT_MS = 300
83+
```
8484
85-
*Note* confcrypt files must end with a trailing newline.
85+
*Note:* confcrypt files must end with a trailing newline.
8686
87-
While the default config created via `confcrypt new ...` places the schema on line `n` and parameters on `n+1`, there's no required ordering for the file. In fact, you can choose to entirely omit the schema and only store configuration paraemters in an `econf` file, but this will cause `confcrypt validate` to fail.
87+
While the default config created via `confcrypt new ...` places the schema on line `n` and parameters on `n+1`, there's no required ordering for the file. In fact, you can choose to entirely omit the schema and only store configuration paraemters in an `econf` file, but this will cause `confcrypt validate` to fail.

0 commit comments

Comments
 (0)