mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-16 14:24:56 +01:00
docs: sync
This commit is contained in:
@@ -230,6 +230,12 @@ You can also define agents using markdown files in `~/.config/opencode/agent/` o
|
|||||||
|
|
||||||
You can disable providers that are loaded automatically through the `disabled_providers` option. This is useful when you want to prevent certain providers from being loaded even if their credentials are available.
|
You can disable providers that are loaded automatically through the `disabled_providers` option. This is useful when you want to prevent certain providers from being loaded even if their credentials are available.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Formatters
|
||||||
|
|
||||||
|
You can configure code formatters through the `formatter` option. See [Formatters documentation](/docs/formatters) for more details.
|
||||||
|
|
||||||
```json title="opencode.json"
|
```json title="opencode.json"
|
||||||
{
|
{
|
||||||
"$schema": "https://opencode.ai/config.json",
|
"$schema": "https://opencode.ai/config.json",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Let's get started.
|
|||||||
To use opencode, you'll need:
|
To use opencode, you'll need:
|
||||||
|
|
||||||
1. A modern terminal emulator like:
|
1. A modern terminal emulator like:
|
||||||
|
|
||||||
- [WezTerm](https://wezterm.org), cross-platform
|
- [WezTerm](https://wezterm.org), cross-platform
|
||||||
- [Alacritty](https://alacritty.org), cross-platform
|
- [Alacritty](https://alacritty.org), cross-platform
|
||||||
- [Ghostty](https://ghostty.org), Linux and macOS
|
- [Ghostty](https://ghostty.org), Linux and macOS
|
||||||
@@ -40,26 +41,10 @@ You can also install it with the following:
|
|||||||
- **Using Node.js**
|
- **Using Node.js**
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<TabItem label="npm">
|
<TabItem label="npm">```bash npm install -g opencode-ai ```</TabItem>
|
||||||
```bash
|
<TabItem label="Bun">```bash bun install -g opencode-ai ```</TabItem>
|
||||||
npm install -g opencode-ai
|
<TabItem label="pnpm">```bash pnpm install -g opencode-ai ```</TabItem>
|
||||||
```
|
<TabItem label="Yarn">```bash yarn global add opencode-ai ```</TabItem>
|
||||||
</TabItem>
|
|
||||||
<TabItem label="Bun">
|
|
||||||
```bash
|
|
||||||
bun install -g opencode-ai
|
|
||||||
```
|
|
||||||
</TabItem>
|
|
||||||
<TabItem label="pnpm">
|
|
||||||
```bash
|
|
||||||
pnpm install -g opencode-ai
|
|
||||||
```
|
|
||||||
</TabItem>
|
|
||||||
<TabItem label="Yarn">
|
|
||||||
```bash
|
|
||||||
yarn global add opencode-ai
|
|
||||||
```
|
|
||||||
</TabItem>
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
- **Using Homebrew on macOS**
|
- **Using Homebrew on macOS**
|
||||||
@@ -271,4 +256,4 @@ Here's an [example conversation](https://opencode.ai/s/4XP1fce5) with opencode.
|
|||||||
|
|
||||||
And that's it! You are now a pro at using opencode.
|
And that's it! You are now a pro at using opencode.
|
||||||
|
|
||||||
To make it your own, we recommend [picking a theme](/docs/themes), [customizing the keybinds](/docs/keybinds), or playing around with the [opencode config](/docs/config).
|
To make it your own, we recommend [picking a theme](/docs/themes), [customizing the keybinds](/docs/keybinds), [configuring code formatters](/docs/formatters), or playing around with the [opencode config](/docs/config).
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ This mode is useful when you want the AI to analyze code, suggest changes, or cr
|
|||||||
|
|
||||||
You can switch between modes during a session using the _Tab_ key. Or your configured `switch_mode` keybind.
|
You can switch between modes during a session using the _Tab_ key. Or your configured `switch_mode` keybind.
|
||||||
|
|
||||||
|
See also: [Formatters](/docs/formatters) for information about code formatting configuration.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Configure
|
## Configure
|
||||||
@@ -99,6 +101,7 @@ tools:
|
|||||||
---
|
---
|
||||||
|
|
||||||
You are in code review mode. Focus on:
|
You are in code review mode. Focus on:
|
||||||
|
|
||||||
- Code quality and best practices
|
- Code quality and best practices
|
||||||
- Potential bugs and edge cases
|
- Potential bugs and edge cases
|
||||||
- Performance implications
|
- Performance implications
|
||||||
@@ -281,6 +284,7 @@ tools:
|
|||||||
You are in debug mode. Your primary goal is to help investigate and diagnose issues.
|
You are in debug mode. Your primary goal is to help investigate and diagnose issues.
|
||||||
|
|
||||||
Focus on:
|
Focus on:
|
||||||
|
|
||||||
- Understanding the problem through careful analysis
|
- Understanding the problem through careful analysis
|
||||||
- Using bash commands to inspect system state
|
- Using bash commands to inspect system state
|
||||||
- Reading relevant files and logs
|
- Reading relevant files and logs
|
||||||
@@ -304,6 +308,7 @@ tools:
|
|||||||
You are in refactoring mode. Focus on improving code quality without changing functionality.
|
You are in refactoring mode. Focus on improving code quality without changing functionality.
|
||||||
|
|
||||||
Priorities:
|
Priorities:
|
||||||
|
|
||||||
- Improve code readability and maintainability
|
- Improve code readability and maintainability
|
||||||
- Apply consistent naming conventions
|
- Apply consistent naming conventions
|
||||||
- Reduce code duplication
|
- Reduce code duplication
|
||||||
|
|||||||
Reference in New Issue
Block a user