You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+58-53
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,8 @@ hbox offers the following features:
17
17
-**Support for Pipes**: Supports the use of pipes in `hbox run`, enabling efficient command chaining.
18
18
-**Convenient Shims**: Creates `shims` (alias shortcuts) for all installed packages, simplifying command entry from `hbox run <package alias> <commands>` to `<package alias> <commands>`.
19
19
-**Accessible Internal Binaries**: Provides direct access to internal binaries within images. Users can override the default entrypoint to access essential tools and utilities within containers directly.
20
-
-**Customizable Environment Variables**: Allows setting environment variables for each package, enabling finer control over runtime configurations.
20
+
-**Customizable Environment Variables**: Allows setting environment variables for each package, enabling finer control over runtime configurations.]()
21
+
-**Support for Docker and Podman**: Provides seamless support for both Docker and Podman container engines, offering flexibility in container runtime choices.
21
22
22
23
## Installation
23
24
@@ -139,9 +140,64 @@ These examples should provide a quick start guide for you to understand the basi
139
140
140
141
## Configuration
141
142
143
+
### Configuration via config.json
144
+
145
+
The general configuration of hbox is managed by the `$HBOX_DIR/config.json` file. Currently, you can control the container engine, how logs are used and enable some experimental features:
146
+
147
+
```json
148
+
{
149
+
"engine": "docker",
150
+
"logs": {
151
+
"enabled": true,
152
+
"level": "debug",
153
+
"strategy": "truncate"
154
+
},
155
+
"experimental": {
156
+
"capture_stdout": false,
157
+
"capture_stderr": false
158
+
}
159
+
}
160
+
```
161
+
162
+
#### Properties
163
+
164
+
The `config.json` file is used to control how hbox should behave. Below are the details of each property available in this configuration file.
|`engine`|`string`| Indicates what container engine to use. Possible values: `docker`, `podman`. Example: `docker`|
169
+
|`logs`|`object`| Configuration for logging behavior. |
170
+
|`logs.enabled`|`boolean`| Indicates if logging is enabled. Example: `true`|
171
+
|`logs.level`|`string`| Specifies the logging level. Possible values: `debug`, `info`, `warn`, `error`. Example: `debug`|
172
+
|`logs.strategy`|`string`| Strategy for handling log files. Possible values: `append`, `truncate`. Example: `truncate`|
173
+
|`experimental`|`object`| Configuration for experimental features. |
174
+
|`experimental.capture_stdout`|`boolean`| Indicates if standard output should be captured and sent to logs. Regardless of this option, stdout will always be printed normally. Example: `false`|
175
+
|`experimental.capture_stderr`|`boolean`| Indicates if standard error should be captured and sent to logs. Regardless of this option, stderr will always be printed normally. Example: `false`|
176
+
177
+
#### Property Details
178
+
179
+
-**engine**: Specifies whether to use `docker` or `podman` as a container engine. `docker` is the default.
180
+
181
+
-**logs**: This object configures logging behavior for hbox.
182
+
-`enabled`: A boolean indicating if logging is enabled. If set to `true`, logging is active.
183
+
-`level`: Specifies the verbosity of the logs. Options include:
184
+
-`debug`: Detailed information typically useful for developers.
185
+
-`info`: General information about the application's operation.
186
+
-`warn`: Warnings about potentially problematic situations.
-`strategy`: Determines how log files are managed. Options include:
189
+
-`append`: Adds new log entries to the end of existing log files.
190
+
-`truncate`: Overwrites existing log files with new entries.
191
+
192
+
-**experimental**: This object contains settings for experimental features that are not yet fully supported.
193
+
-`capture_stdout`: A boolean indicating if the standard output of commands should be captured and sent to logs. Regardless of this option, stdout will always be printed normally.
194
+
-`capture_stderr`: A boolean indicating if the standard error of commands should be captured and sent to logs. Regardless of this option, stderr will always be printed normally.
195
+
196
+
These properties allow you to customize the behavior of hbox, particularly how it handles logging and experimental features, providing better control over the application's operation.
197
+
142
198
### Shims
143
199
144
-
hbox utilizes shims and a configuration file to effectively manage your installed packages. There are two types of shims: _package shims_ and _binary shims_.
200
+
hbox utilizes shims to effectively manage your installed packages. There are two types of shims: _package shims_ and _binary shims_.
145
201
146
202
#### Package Shims
147
203
@@ -307,57 +363,6 @@ We also set `-c` as the default command and specified that all arguments should
The general configuration of hbox is managed by the `$HBOX_DIR/config.json` file. Currently, you can control how logs are used and enable some experimental features:
313
-
314
-
```json
315
-
{
316
-
"logs": {
317
-
"enabled": true,
318
-
"level": "debug",
319
-
"strategy": "truncate"
320
-
},
321
-
"experimental": {
322
-
"capture_stdout": false,
323
-
"capture_stderr": false
324
-
}
325
-
}
326
-
```
327
-
328
-
#### Properties
329
-
330
-
The `config.json` file is used to control how hbox should behave. Below are the details of each property available in this configuration file.
|`logs`|`object`| Configuration for logging behavior. |
335
-
|`logs.enabled`|`boolean`| Indicates if logging is enabled. Example: `true`|
336
-
|`logs.level`|`string`| Specifies the logging level. Possible values: `debug`, `info`, `warn`, `error`. Example: `debug`|
337
-
|`logs.strategy`|`string`| Strategy for handling log files. Possible values: `append`, `truncate`. Example: `truncate`|
338
-
|`experimental`|`object`| Configuration for experimental features. |
339
-
|`experimental.capture_stdout`|`boolean`| Indicates if standard output should be captured and sent to logs. Regardless of this option, stdout will always be printed normally. Example: `false`|
340
-
|`experimental.capture_stderr`|`boolean`| Indicates if standard error should be captured and sent to logs. Regardless of this option, stderr will always be printed normally. Example: `false`|
341
-
342
-
#### Property Details
343
-
344
-
-**logs**: This object configures logging behavior for hbox.
345
-
-`enabled`: A boolean indicating if logging is enabled. If set to `true`, logging is active.
346
-
-`level`: Specifies the verbosity of the logs. Options include:
347
-
-`debug`: Detailed information typically useful for developers.
348
-
-`info`: General information about the application's operation.
349
-
-`warn`: Warnings about potentially problematic situations.
-`strategy`: Determines how log files are managed. Options include:
352
-
-`append`: Adds new log entries to the end of existing log files.
353
-
-`truncate`: Overwrites existing log files with new entries.
354
-
355
-
-**experimental**: This object contains settings for experimental features that are not yet fully supported.
356
-
-`capture_stdout`: A boolean indicating if the standard output of commands should be captured and sent to logs. Regardless of this option, stdout will always be printed normally.
357
-
-`capture_stderr`: A boolean indicating if the standard error of commands should be captured and sent to logs. Regardless of this option, stderr will always be printed normally.
358
-
359
-
These properties allow you to customize the behavior of hbox, particularly how it handles logging and experimental features, providing better control over the application's operation.
360
-
361
366
### Package Version Management
362
367
363
368
hbox maintains a directory `$HBOX_DIR/versions` that tracks the current version of each package. Each package has a file in this directory, managed by hbox, and should not be manually edited.
0 commit comments