diff options
| author | Dax Raad <[email protected]> | 2025-05-31 14:41:00 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-31 14:41:00 -0400 |
| commit | 3b746162d27a32a851aa257455042b5a86ec017c (patch) | |
| tree | 94f7d24c39735d28f0fa17f726b02c2cfbc6266a /README.md | |
| parent | 6df19f1828a0b98d476b2d0929aea67f61832717 (diff) | |
| download | opencode-3b746162d27a32a851aa257455042b5a86ec017c.tar.gz opencode-3b746162d27a32a851aa257455042b5a86ec017c.zip | |
run formatter
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 39 |
1 files changed, 21 insertions, 18 deletions
@@ -83,6 +83,7 @@ You can configure OpenCode using environment variables: | `AZURE_OPENAI_ENDPOINT` | For Azure OpenAI models | | `AZURE_OPENAI_API_KEY` | For Azure OpenAI models (optional when using Entra ID) | | `AZURE_OPENAI_API_VERSION` | For Azure OpenAI models | + ### Configuration File Structure ```json @@ -205,7 +206,7 @@ To use bedrock models with OpenCode you need three things. 1. Valid AWS credentials (the env vars: `AWS_SECRET_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION`) 2. Access to the corresponding model in AWS Bedrock in your region. - a. You can request access in the AWS console on the Bedrock -> "Model access" page. + a. You can request access in the AWS console on the Bedrock -> "Model access" page. 3. A correct configuration file. You don't need the `providers` key. Instead you have to prefix your models per agent with `bedrock.` and then a valid model. For now only Claude 3.7 is supported. ```json @@ -226,10 +227,10 @@ To use bedrock models with OpenCode you need three things. "maxTokens": 80, "reasoningEffort": "" } - }, + } } ``` - + ## Interactive Mode Usage ```bash @@ -295,26 +296,26 @@ These flags are mutually exclusive - you can use either `--allowedTools` or `--e OpenCode supports the following output formats in non-interactive mode: -| Format | Description | -| ------ | -------------------------------------- | -| `text` | Plain text output (default) | -| `json` | Output wrapped in a JSON object | +| Format | Description | +| ------ | ------------------------------- | +| `text` | Plain text output (default) | +| `json` | Output wrapped in a JSON object | The output format is implemented as a strongly-typed `OutputFormat` in the codebase, ensuring type safety and validation when processing outputs. ## Command-line Flags -| Flag | Short | Description | -| ----------------- | ----- | ---------------------------------------------------------- | -| `--help` | `-h` | Display help information | -| `--debug` | `-d` | Enable debug mode | -| `--cwd` | `-c` | Set current working directory | -| `--prompt` | `-p` | Run a single prompt in non-interactive mode | -| `--output-format` | `-f` | Output format for non-interactive mode (text, json) | -| `--quiet` | `-q` | Hide spinner in non-interactive mode | -| `--verbose` | | Display logs to stderr in non-interactive mode | -| `--allowedTools` | | Restrict the agent to only use specified tools | -| `--excludedTools` | | Prevent the agent from using specified tools | +| Flag | Short | Description | +| ----------------- | ----- | --------------------------------------------------- | +| `--help` | `-h` | Display help information | +| `--debug` | `-d` | Enable debug mode | +| `--cwd` | `-c` | Set current working directory | +| `--prompt` | `-p` | Run a single prompt in non-interactive mode | +| `--output-format` | `-f` | Output format for non-interactive mode (text, json) | +| `--quiet` | `-q` | Hide spinner in non-interactive mode | +| `--verbose` | | Display logs to stderr in non-interactive mode | +| `--allowedTools` | | Restrict the agent to only use specified tools | +| `--excludedTools` | | Prevent the agent from using specified tools | ## Keyboard Shortcuts @@ -483,6 +484,7 @@ You don't need to define all colors. Any undefined colors will fall back to the ### Shell Configuration OpenCode allows you to configure the shell used by the `bash` tool. By default, it uses: + 1. The shell specified in the config file (if provided) 2. The shell from the `$SHELL` environment variable (if available) 3. Falls back to `/bin/bash` if neither of the above is available @@ -577,6 +579,7 @@ RUN grep -R "$SEARCH_PATTERN" $DIRECTORY ``` When you run a command with arguments, OpenCode will prompt you to enter values for each unique placeholder. Named arguments provide several benefits: + - Clear identification of what each argument represents - Ability to use the same argument multiple times - Better organization for commands with multiple inputs |
