|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +--- |
| 4 | + |
| 5 | +# Scope |
| 6 | + |
| 7 | +Scope allows teams to define development config for engineers. Scope is a tool for engineers, to make them more productive. |
| 8 | + |
| 9 | +The config falls into three major categories: |
| 10 | +- [Local setup](./commands/doctor.md) |
| 11 | +- [Error debugging locally](models/ScopeKnownError.md) |
| 12 | +- [Generate great bug reports](./commands/report.md) |
| 13 | + |
| 14 | +## Config |
| 15 | + |
| 16 | +Configuration for `scope` is done via Kubernetes-like yaml files that live inside the repo. By default, scope will search up for the config directory `.scope` and ready `*.yaml` and `*.yml` files. |
| 17 | + |
| 18 | +That means `.scope/foo.yaml` will be parsed as a config file, but `scope/foo.yaml` will not (notice the missing `.` before `scope`). |
| 19 | + |
| 20 | +A config file looks like |
| 21 | + |
| 22 | +```yaml |
| 23 | +apiVersion: scope.github.com/v1alpha |
| 24 | +kind: <kind> |
| 25 | +metadata: |
| 26 | + name: a useful name |
| 27 | +spec: |
| 28 | + ... |
| 29 | +``` |
| 30 | +
|
| 31 | +Currently, the only supported `apiVersion` is `scope.github.com/v1alpha`. Using `apiVersion` allows scope to evolve the config file and keep older versions of the config compatible. |
| 32 | + |
| 33 | +Unlike Kubernetes, the `name` field can be any string, without any DNS related constraints. |
| 34 | + |
| 35 | +## CLI Options |
| 36 | +All commands support the following options |
| 37 | + |
| 38 | +```text |
| 39 | +Usage: scope [OPTIONS] <COMMAND> |
| 40 | +
|
| 41 | +Options: |
| 42 | + -d, --debug... A level of verbosity, and can be used multiple times |
| 43 | + -w, --warn Enable warn logging |
| 44 | + -e, --error Disable everything but error logging |
| 45 | + --extra-config <EXTRA_CONFIG> Add a paths to search for configuration. By default, `scope` will search up for `.scope` directories and attempt to load `.yml` and `.yaml` files for config. If the config directory is somewhere else, specifying this option will _add_ the paths/files to the loaded config [env: SCOPE_CONFIG_DIR=] |
| 46 | + --disable-default-config When set, default config files will not be loaded and only specified config will be loaded [env: SCOPE_DISABLE_DEFAULT_CONFIG=] |
| 47 | + -C, --working-dir <WORKING_DIR> Override the working directory |
| 48 | + --run-id <RUN_ID> When outputting logs, or other files, the run-id is the unique value that will define where these go. In the case that the run-id is re-used, the old values will be overwritten [env: SCOPE_RUN_ID=] |
| 49 | + -h, --help Print help (see more with '--help') |
| 50 | + -V, --version Print version |
| 51 | +``` |
| 52 | + |
| 53 | +Normally, you will not need to set any of these files. |
0 commit comments