koide 10ac60062f
All checks were successful
Deploy Docusaurus Site / deploy (push) Successful in 53s
Add: Codebuff local deployment one-liner article and script
2026-03-05 06:36:15 +00:00

52 lines
1.5 KiB
Markdown

---
sidebar_position: 2
title: Codebuffをローカル展開するワンライナー
description: OpenRouter + Codebuffをローカル環境に最短で導入する手順
hide_table_of_contents: false
displayed_sidebar: null
image: /img/codebuff-local-oneliner-banner.png
---
# Codebuffをローカル展開するワンライナー
Codebuffを手元マシンでサクッと使えるようにするための最短手順です。
## 前提
- Node.js 18+
- `OPENROUTER_API_KEY` を取得済み
## ワンライナー
```bash title="セットアップ一発実行"
export OPENROUTER_API_KEY="sk-or-xxx" && curl -sL https://www.techswan.online/scripts/codebuff-local-setup.sh | bash
```
特定のプロジェクトディレクトリを指定する場合は以下:
```bash title="プロジェクト指定"
export OPENROUTER_API_KEY="sk-or-xxx" && curl -sL https://www.techswan.online/scripts/codebuff-local-setup.sh | bash -s -- ~/my-project
```
## 何をしているか
1. `npm i -g codebuff`
2. プロジェクトへ移動
3. `/init` 実行(`knowledge.md` と `.agents` を生成)
4. `codebuff` 起動準備
## 使い方のコツ
- 初回は「まずプロジェクトの構造を説明して」から始める
- 次に「小さな修正」を頼んで挙動を掴む
- いきなり大改修より、段階的に指示した方が安定
## 参考リンク
- [Codebuff GitHub](https://github.com/CodebuffAI/codebuff)
- [OpenRouter Models](https://openrouter.ai/models)
---
*この記事は2026年3月時点の情報です。*