on main help sign in
chore: rename OpenCode -> Crush
commit2ea3947d259ccbf4a47d11bd15599dbb279c43ce authorKujtim Hoxha <kujtimii.h@gmail.com> dateSat 7 Jun 2025, 21:09 (1 year ago) parent5baebf7
14 files changed+52−52
OpenCode.md+1−1 README.md+26−26 cmd/root.go+1−1 cmd/schema/README.md+2−2 cmd/schema/main.go+4−4 internal/config/config.go+2−2 internal/fileutil/ls.go+1−1 internal/llm/agent/mcp-tools.go+2−2 internal/llm/prompt/coder.go+4−4 internal/llm/prompt/task.go+1−1 internal/llm/provider/provider.go+1−1 internal/tui/components/dialog/init.go+1−1 internal/tui/components/dialogs/commands/commands.go+2−2 opencode-schema.json+4−4
OpenCode.md+1−1
@@ -1,4 +1,4 @@
1−# OpenCode Development Guide
1+# Crush Development Guide
22
33## Build/Test/Lint Commands
44
README.md+26−26
@@ -1,4 +1,4 @@
1−# ⌬ OpenCode
1+# ⌬ Crush
22
33<p align="center"><img src="https://github.com/user-attachments/assets/9ae61ef6-70e5-4876-bc45-5bcb4e52c714" width="800"></p>
44
@@ -8,10 +8,10 @@ A powerful terminal-based AI assistant for developers, providing intelligent cod
88
99## Overview
1010
11−OpenCode is a Go-based CLI application that brings AI assistance to your terminal. It provides a TUI (Terminal User Interface) for interacting with various AI models to help with coding tasks, debugging, and more.
11+Crush is a Go-based CLI application that brings AI assistance to your terminal. It provides a TUI (Terminal User Interface) for interacting with various AI models to help with coding tasks, debugging, and more.
1212
1313<p>For a quick video overview, check out
14−<a href="https://www.youtube.com/watch?v=P8luPmEa1QI"><img width="25" src="https://upload.wikimedia.org/wikipedia/commons/0/09/YouTube_full-color_icon_%282017%29.svg"> OpenCode + Gemini 2.5 Pro: BYE Claude Code! I'm SWITCHING To the FASTEST AI Coder!</a></p>
14+<a href="https://www.youtube.com/watch?v=P8luPmEa1QI"><img width="25" src="https://upload.wikimedia.org/wikipedia/commons/0/09/YouTube_full-color_icon_%282017%29.svg"> Crush + Gemini 2.5 Pro: BYE Claude Code! I'm SWITCHING To the FASTEST AI Coder!</a></p>
1515
1616<a href="https://www.youtube.com/watch?v=P8luPmEa1QI"><img width="550" src="https://i3.ytimg.com/vi/P8luPmEa1QI/maxresdefault.jpg"></a><p>
1717
@@ -64,7 +64,7 @@ go install github.com/charmbracelet/crush@latest
6464
6565## Configuration
6666
67−OpenCode looks for configuration in the following locations:
67+Crush looks for configuration in the following locations:
6868
6969- `$HOME/.crush.json`
7070- `$XDG_CONFIG_HOME/crush/.crush.json`
@@ -72,7 +72,7 @@ OpenCode looks for configuration in the following locations:
7272
7373### Auto Compact Feature
7474
75−OpenCode includes an auto compact feature that automatically summarizes your conversation when it approaches the model's context window limit. When enabled (default setting), this feature:
75+Crush includes an auto compact feature that automatically summarizes your conversation when it approaches the model's context window limit. When enabled (default setting), this feature:
7676
7777- Monitors token usage during your conversation
7878- Automatically triggers summarization when usage reaches 95% of the model's context window
@@ -89,7 +89,7 @@ You can enable or disable this feature in your configuration file:
8989
9090### Environment Variables
9191
92−You can configure OpenCode using environment variables:
92+You can configure Crush using environment variables:
9393
9494| Environment Variable | Purpose |
9595| -------------------------- | ------------------------------------------------------ |
@@ -110,7 +110,7 @@ You can configure OpenCode using environment variables:
110110
111111### Shell Configuration
112112
113−OpenCode allows you to configure the shell used by the bash tool. By default, it uses the shell specified in the `SHELL` environment variable, or falls back to `/bin/bash` if not set.
113+Crush allows you to configure the shell used by the bash tool. By default, it uses the shell specified in the `SHELL` environment variable, or falls back to `/bin/bash` if not set.
114114
115115You can override this in your configuration file:
116116
@@ -190,7 +190,7 @@ This is useful if you want to use a different shell than your default system she
190190
191191## Supported AI Models
192192
193−OpenCode supports a variety of AI models from different providers:
193+Crush supports a variety of AI models from different providers:
194194
195195### OpenAI
196196
@@ -247,7 +247,7 @@ OpenCode supports a variety of AI models from different providers:
247247## Usage
248248
249249```bash
250−# Start OpenCode
250+# Start Crush
251251crush
252252
253253# Start with debug logging
@@ -259,7 +259,7 @@ crush -c /path/to/project
259259
260260## Non-interactive Prompt Mode
261261
262−You can run OpenCode in non-interactive mode by passing a prompt directly as a command-line argument. This is useful for scripting, automation, or when you want a quick answer without launching the full TUI.
262+You can run Crush in non-interactive mode by passing a prompt directly as a command-line argument. This is useful for scripting, automation, or when you want a quick answer without launching the full TUI.
263263
264264```bash
265265# Run a single prompt and print the AI's response to the terminal
@@ -272,13 +272,13 @@ crush -p "Explain the use of context in Go" -f json
272272crush -p "Explain the use of context in Go" -q
273273```
274274
275−In this mode, OpenCode will process your prompt, print the result to standard output, and then exit. All permissions are auto-approved for the session.
275+In this mode, Crush will process your prompt, print the result to standard output, and then exit. All permissions are auto-approved for the session.
276276
277−By default, a spinner animation is displayed while the model is processing your query. You can disable this spinner with the `-q` or `--quiet` flag, which is particularly useful when running OpenCode from scripts or automated workflows.
277+By default, a spinner animation is displayed while the model is processing your query. You can disable this spinner with the `-q` or `--quiet` flag, which is particularly useful when running Crush from scripts or automated workflows.
278278
279279### Output Formats
280280
281−OpenCode supports the following output formats in non-interactive mode:
281+Crush supports the following output formats in non-interactive mode:
282282
283283| Format | Description |
284284| ------ | ------------------------------- |
@@ -369,7 +369,7 @@ The output format is implemented as a strongly-typed `OutputFormat` in the codeb
369369
370370## AI Assistant Tools
371371
372−OpenCode's AI assistant has access to various tools to help with coding tasks:
372+Crush's AI assistant has access to various tools to help with coding tasks:
373373
374374### File and Code Tools
375375
@@ -395,7 +395,7 @@ OpenCode's AI assistant has access to various tools to help with coding tasks:
395395
396396## Architecture
397397
398−OpenCode is built with a modular architecture:
398+Crush is built with a modular architecture:
399399
400400- **cmd**: Command-line interface using Cobra
401401- **internal/app**: Core application services
@@ -410,7 +410,7 @@ OpenCode is built with a modular architecture:
410410
411411## Custom Commands
412412
413−OpenCode supports custom commands that can be created by users to quickly send predefined prompts to the AI assistant.
413+Crush supports custom commands that can be created by users to quickly send predefined prompts to the AI assistant.
414414
415415### Creating Custom Commands
416416
@@ -449,7 +449,7 @@ This creates a command called `user:prime-context`.
449449
450450### Command Arguments
451451
452−OpenCode supports named arguments in custom commands using placeholders in the format `$NAME` (where NAME consists of uppercase letters, numbers, and underscores, and must start with a letter).
452+Crush supports named arguments in custom commands using placeholders in the format `$NAME` (where NAME consists of uppercase letters, numbers, and underscores, and must start with a letter).
453453
454454For example:
455455
@@ -461,7 +461,7 @@ RUN git grep --author="$AUTHOR_NAME" -n .
461461RUN grep -R "$SEARCH_PATTERN" $DIRECTORY
462462```
463463
464−When you run a command with arguments, OpenCode will prompt you to enter values for each unique placeholder. Named arguments provide several benefits:
464+When you run a command with arguments, Crush will prompt you to enter values for each unique placeholder. Named arguments provide several benefits:
465465
466466- Clear identification of what each argument represents
467467- Ability to use the same argument multiple times
@@ -487,16 +487,16 @@ The content of the command file will be sent as a message to the AI assistant.
487487
488488### Built-in Commands
489489
490−OpenCode includes several built-in commands:
490+Crush includes several built-in commands:
491491
492492| Command | Description |
493493| ------------------ | --------------------------------------------------------------------------------------------------- |
494−| Initialize Project | Creates or updates the OpenCode.md memory file with project-specific information |
494+| Initialize Project | Creates or updates the Crush.md memory file with project-specific information |
495495| Compact Session | Manually triggers the summarization of the current session, creating a new session with the summary |
496496
497497## MCP (Model Context Protocol)
498498
499−OpenCode implements the Model Context Protocol (MCP) to extend its capabilities through external tools. MCP provides a standardized way for the AI assistant to interact with external services and tools.
499+Crush implements the Model Context Protocol (MCP) to extend its capabilities through external tools. MCP provides a standardized way for the AI assistant to interact with external services and tools.
500500
501501### MCP Features
502502
@@ -537,7 +537,7 @@ Once configured, MCP tools are automatically available to the AI assistant along
537537
538538## LSP (Language Server Protocol)
539539
540−OpenCode integrates with Language Server Protocol to provide code intelligence features across multiple programming languages.
540+Crush integrates with Language Server Protocol to provide code intelligence features across multiple programming languages.
541541
542542### LSP Features
543543
@@ -576,13 +576,13 @@ While the LSP client implementation supports the full LSP protocol (including co
576576
577577## Using a self-hosted model provider
578578
579−OpenCode can also load and use models from a self-hosted (OpenAI-like) provider.
579+Crush can also load and use models from a self-hosted (OpenAI-like) provider.
580580This is useful for developers who want to experiment with custom models.
581581
582582### Configuring a self-hosted provider
583583
584584You can use a self-hosted model by setting the `LOCAL_ENDPOINT` environment variable.
585−This will cause OpenCode to load and use the models from the specified endpoint.
585+This will cause Crush to load and use the models from the specified endpoint.
586586
587587```bash
588588LOCAL_ENDPOINT=http://localhost:1235/v1
@@ -625,7 +625,7 @@ go build -o crush
625625
626626## Acknowledgments
627627
628−OpenCode gratefully acknowledges the contributions and support from these key individuals:
628+Crush gratefully acknowledges the contributions and support from these key individuals:
629629
630630- [@isaacphi](https://github.com/isaacphi) - For the [mcp-language-server](https://github.com/isaacphi/mcp-language-server) project which provided the foundation for our LSP client implementation
631631- [@adamdottv](https://github.com/adamdottv) - For the design direction and UI/UX architecture
@@ -634,7 +634,7 @@ Special thanks to the broader open source community whose tools and libraries ha
634634
635635## License
636636
637−OpenCode is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
637+Crush is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
638638
639639## Contributing
640640
cmd/root.go+1−1
@@ -23,7 +23,7 @@ import (
2323var rootCmd = &cobra.Command{
2424 Use: "crush",
2525 Short: "Terminal-based AI assistant for software development",
26− Long: `OpenCode is a powerful terminal-based AI assistant that helps with software development tasks.
26+ Long: `Crush is a powerful terminal-based AI assistant that helps with software development tasks.
2727It provides an interactive chat interface with AI capabilities, code analysis, and LSP integration
2828to assist developers in writing, debugging, and understanding code directly from the terminal.`,
2929 Example: `
cmd/schema/README.md+2−2
@@ -1,6 +1,6 @@
1−# OpenCode Configuration Schema Generator
1+# Crush Configuration Schema Generator
22
3−This tool generates a JSON Schema for the OpenCode configuration file. The schema can be used to validate configuration files and provide autocompletion in editors that support JSON Schema.
3+This tool generates a JSON Schema for the Crush configuration file. The schema can be used to validate configuration files and provide autocompletion in editors that support JSON Schema.
44
55## Usage
66
cmd/schema/main.go+4−4
@@ -38,8 +38,8 @@ func main() {
3838func generateSchema() map[string]any {
3939 schema := map[string]any{
4040 "$schema": "http://json-schema.org/draft-07/schema#",
41− "title": "OpenCode Configuration",
42− "description": "Configuration schema for the OpenCode application",
41+ "title": "Crush Configuration",
42+ "description": "Configuration schema for the Crush application",
4343 "type": "object",
4444 "properties": map[string]any{},
4545 }
@@ -91,8 +91,8 @@ func generateSchema() map[string]any {
9191 "CLAUDE.local.md",
9292 "crush.md",
9393 "crush.local.md",
94− "OpenCode.md",
95− "OpenCode.local.md",
94+ "Crush.md",
95+ "Crush.local.md",
9696 "OPENCODE.md",
9797 "OPENCODE.local.md",
9898 },
internal/config/config.go+2−2
@@ -112,8 +112,8 @@ var defaultContextPaths = []string{
112112 "CLAUDE.local.md",
113113 "crush.md",
114114 "crush.local.md",
115− "OpenCode.md",
116− "OpenCode.local.md",
115+ "Crush.md",
116+ "Crush.local.md",
117117 "OPENCODE.md",
118118 "OPENCODE.local.md",
119119}
internal/fileutil/ls.go+1−1
@@ -63,7 +63,7 @@ var CommonIgnorePatterns = []string{
6363 ".Spotlight-V100",
6464 ".fseventsd",
6565
66− // OpenCode
66+ // Crush
6767 ".crush",
6868}
6969
internal/llm/agent/mcp-tools.go+2−2
@@ -46,7 +46,7 @@ func runTool(ctx context.Context, c MCPClient, toolName string, input string) (t
4646 initRequest := mcp.InitializeRequest{}
4747 initRequest.Params.ProtocolVersion = mcp.LATEST_PROTOCOL_VERSION
4848 initRequest.Params.ClientInfo = mcp.Implementation{
49− Name: "OpenCode",
49+ Name: "Crush",
5050 Version: version.Version,
5151 }
5252
@@ -140,7 +140,7 @@ func getTools(ctx context.Context, name string, m config.MCPServer, permissions
140140 initRequest := mcp.InitializeRequest{}
141141 initRequest.Params.ProtocolVersion = mcp.LATEST_PROTOCOL_VERSION
142142 initRequest.Params.ClientInfo = mcp.Implementation{
143− Name: "OpenCode",
143+ Name: "Crush",
144144 Version: version.Version,
145145 }
146146
internal/llm/prompt/coder.go+4−4
@@ -25,7 +25,7 @@ func CoderPrompt(provider models.ModelProvider) string {
2525}
2626
2727const baseOpenAICoderPrompt = `
28−You are operating as and within the OpenCode CLI, a terminal-based agentic coding assistant built by OpenAI. It wraps OpenAI models to enable natural language interaction with a local codebase. You are expected to be precise, safe, and helpful.
28+You are operating as and within the Crush CLI, a terminal-based agentic coding assistant built by OpenAI. It wraps OpenAI models to enable natural language interaction with a local codebase. You are expected to be precise, safe, and helpful.
2929
3030You can:
3131- Receive user prompts, project context, and files.
@@ -71,17 +71,17 @@ You MUST adhere to the following criteria when executing the task:
7171- Remember the user does not see the full output of tools
7272`
7373
74−const baseAnthropicCoderPrompt = `You are OpenCode, an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
74+const baseAnthropicCoderPrompt = `You are Crush, an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
7575
7676IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure.
7777
7878# Memory
79−If the current working directory contains a file called OpenCode.md, it will be automatically added to your context. This file serves multiple purposes:
79+If the current working directory contains a file called Crush.md, it will be automatically added to your context. This file serves multiple purposes:
80801. Storing frequently used bash commands (build, test, lint, etc.) so you can use them without searching each time
81812. Recording the user's code style preferences (naming conventions, preferred libraries, etc.)
82823. Maintaining useful information about the codebase structure and organization
8383
84−When you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to OpenCode.md. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to OpenCode.md so you can remember it for next time.
84+When you spend time searching for commands to typecheck, lint, build, or test, you should ask the user if it's okay to add those commands to Crush.md. Similarly, when learning about code style preferences or important codebase information, ask if it's okay to add that to Crush.md so you can remember it for next time.
8585
8686# Tone and style
8787You should be concise, direct, and to the point. When you run a non-trivial bash command, you should explain what the command does and why you are running it, to make sure the user understands what you are doing (this is especially important when you are running a command that will make changes to the user's system).
internal/llm/prompt/task.go+1−1
@@ -7,7 +7,7 @@ import (
77)
88
99func TaskPrompt(_ models.ModelProvider) string {
10− agentPrompt := `You are an agent for OpenCode. Given the user's prompt, you should use the tools available to you to answer the user's question.
10+ agentPrompt := `You are an agent for Crush. Given the user's prompt, you should use the tools available to you to answer the user's question.
1111Notes:
12121. IMPORTANT: You should be concise, direct, and to the point, since your responses will be displayed on a command line interface. Answer the user's question directly, without elaboration, explanation, or details. One word answers are best. Avoid introductions, conclusions, and explanations. You MUST avoid text before/after your response, such as "The answer is <answer>.", "Here is the content of the file..." or "Based on the information provided, the answer is..." or "Here is what I will do next...".
13132. When relevant, share file names and code snippets relevant to the query
internal/llm/provider/provider.go+1−1
@@ -131,7 +131,7 @@ func NewProvider(providerName models.ModelProvider, opts ...ProviderClientOption
131131 WithOpenAIBaseURL("https://openrouter.ai/api/v1"),
132132 WithOpenAIExtraHeaders(map[string]string{
133133 "HTTP-Referer": "crush.ai",
134− "X-Title": "OpenCode",
134+ "X-Title": "Crush",
135135 }),
136136 )
137137 return &baseProvider[OpenAIClient]{
internal/tui/components/dialog/init.go+1−1
@@ -108,7 +108,7 @@ func (m InitDialogCmp) View() string {
108108 explanation := t.S().Text.
109109 Width(maxWidth).
110110 Padding(0, 1).
111− Render("Initialization generates a new OpenCode.md file that contains information about your codebase, this file serves as memory for each project, you can freely add to it to help the agents be better at their job.")
111+ Render("Initialization generates a new Crush.md file that contains information about your codebase, this file serves as memory for each project, you can freely add to it to help the agents be better at their job.")
112112
113113 question := t.S().Text.
114114 Width(maxWidth).
internal/tui/components/dialogs/commands/commands.go+2−2
@@ -226,9 +226,9 @@ func (c *commandDialogCmp) defaultCommands() []Command {
226226 {
227227 ID: "init",
228228 Title: "Initialize Project",
229− Description: "Create/Update the OpenCode.md memory file",
229+ Description: "Create/Update the Crush.md memory file",
230230 Handler: func(cmd Command) tea.Cmd {
231− prompt := `Please analyze this codebase and create a OpenCode.md file containing:
231+ prompt := `Please analyze this codebase and create a Crush.md file containing:
232232 1. Build/lint/test commands - especially for running a single test
233233 2. Code style guidelines including imports, formatting, types, naming conventions, error handling, etc.
234234
opencode-schema.json+4−4
@@ -97,7 +97,7 @@
9797 "type": "object"
9898 }
9999 },
100− "description": "Configuration schema for the OpenCode application",
100+ "description": "Configuration schema for the Crush application",
101101 "properties": {
102102 "agents": {
103103 "additionalProperties": {
@@ -218,8 +218,8 @@
218218 "CLAUDE.local.md",
219219 "crush.md",
220220 "crush.local.md",
221− "OpenCode.md",
222− "OpenCode.local.md",
221+ "Crush.md",
222+ "Crush.local.md",
223223 "OPENCODE.md",
224224 "OPENCODE.local.md"
225225 ],
@@ -397,6 +397,6 @@
397397 "type": "string"
398398 }
399399 },
400− "title": "OpenCode Configuration",
400+ "title": "Crush Configuration",
401401 "type": "object"
402402}