Без опису

Kujtim Hoxha 770489761e chore: show API errors 7 місяців тому
.github 710f1be5f2 ci(pro): nightly 7 місяців тому
cmd f6a79e4131 feat: stream content in non-interactive mode (#133) 7 місяців тому
internal 770489761e chore: show API errors 7 місяців тому
scripts 75d920b349 fix: remove 7 місяців тому
vendor 3e820ececc chore(deps): update mcp-go (#155) 7 місяців тому
.gitattributes 27066d2dc0 chore: add instruction for `.golden` files on `.gitattributes` 7 місяців тому
.gitignore 70666363d1 chore: implement new logs 7 місяців тому
.golangci.yml 675835982c fix(ci): disable gomoddirectives linter 7 місяців тому
.goreleaser.yml 46fd08cfec ci: disable go mod proxying for now 7 місяців тому
CRUSH.md 11b65a0849 chode: remove old docs 7 місяців тому
LICENSE e3a62736db add license 9 місяців тому
README.md 5004105a64 docs(readme): simplify and cleanup readme 7 місяців тому
Taskfile.yaml 9eab1ba11e fix: resolve golangci-lint issues 7 місяців тому
crush.json c8d9a2b726 chore: remove mcp server 7 місяців тому
cspell.json e15702488f chore: add more tests and handle more cases 7 місяців тому
go.mod 3e820ececc chore(deps): update mcp-go (#155) 7 місяців тому
go.sum 3e820ececc chore(deps): update mcp-go (#155) 7 місяців тому
main.go 272d93110a chore: lint 7 місяців тому
sqlc.yaml 8daa6e774a add initial stuff 10 місяців тому

README.md

[!WARNING] 🚧 This is a pre-release under heavy, active development. Things are still in flux but we’re excited to share early progress.

Crush

Latest Release Build Status

Crush is a tool for building software with AI.

Installation

Nightly builds are available while Crush is in development.

  • Packages are available in Debian and RPM formats
  • Binaries are available for Linux and macOS

You can also just install it with go:

git clone [email protected]:charmbracelet/crush.git
cd crush
go install

Note that Crush doesn't support Windows yet, however Windows support is planned and in progress.

Getting Started

For now, the quickest way to get started is to set an environment variable for your preferred provider. Note that you can switch between providers mid- sessions, so you're welcome to set environment variables for multiple providers.

Environment Variable Provider
ANTHROPIC_API_KEY Anthropic
OPENAI_API_KEY OpenAI
GEMINI_API_KEY Google Gemini
VERTEXAI_PROJECT Google Cloud VertexAI (Gemini)
VERTEXAI_LOCATION Google Cloud VertexAI (Gemini)
GROQ_API_KEY Groq
AWS_ACCESS_KEY_ID AWS Bedrock (Claude)
AWS_SECRET_ACCESS_KEY AWS Bedrock (Claude)
AWS_REGION AWS Bedrock (Claude)
AZURE_OPENAI_ENDPOINT Azure OpenAI models
AZURE_OPENAI_API_KEY Azure OpenAI models (optional when using Entra ID)
AZURE_OPENAI_API_VERSION Azure OpenAI models

Configuration

For many use cases, Crush can be run with no config. That said, if you do need config, it can be added either local to the project itself, or globally. Configuration has the following priority:

  1. .crush.json
  2. crush.json
  3. $HOME/.config/crush/crush.json

LSPs

Crush can use LSPs for additional context to help inform its decisions, just like you would. LSPs can be added manually like so:

{
  "lsp": {
    "go": {
      "command": "gopls"
    },
    "typescript": {
      "command": "typescript-language-server",
      "args": ["--stdio"]
    },
    "nix": {
      "command": "alejandra"
    }
  }
}

OpenAI-Compatible APIs

Crush supports all OpenAI-compatible APIs. Here's an example configuration for Deepseek, which uses an OpenAI-compatible API. Don't forget to set DEEPSEEK_API_KEY in your environment.

{
  "providers": {
    "deepseek": {
      "provider_type": "openai",
      "base_url": "https://api.deepseek.com/v1",
      "models": [
        {
          "id": "deepseek-chat",
          "model": "Deepseek V3",
          "cost_per_1m_in": 0.27,
          "cost_per_1m_out": 1.1,
          "cost_per_1m_in_cached": 0.07,
          "cost_per_1m_out_cached": 1.1,
          "context_window": 64000,
          "default_max_tokens": 5000
        }
      ]
    }
  }
}

Whatcha think?

We’d love to hear your thoughts on this project. Feel free to drop us a note!

License

MIT


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source