{"id":18225890,"url":"https://github.com/danielbodnar/claude-cli","last_synced_at":"2025-04-08T04:28:33.137Z","repository":{"id":269199298,"uuid":"882803358","full_name":"danielbodnar/claude-cli","owner":"danielbodnar","description":"🤖 Claude CLI: An elegant interactive CLI for Anthropic's Claude API, built with TypeScript and Bun.js. By claude for claude.","archived":false,"fork":false,"pushed_at":"2024-11-17T21:11:36.000Z","size":216,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T03:17:20.826Z","etag":null,"topics":["ai","anthropic","anthropic-claude","bun","claude","claude-3-5-sonnet","claude-ai","cli","llms"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielbodnar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-03T19:52:35.000Z","updated_at":"2025-02-09T16:15:37.000Z","dependencies_parsed_at":"2024-12-21T18:13:32.111Z","dependency_job_id":"93c5e5f8-c585-4150-bca7-2be593a157ff","html_url":"https://github.com/danielbodnar/claude-cli","commit_stats":null,"previous_names":["danielbodnar/claude-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbodnar%2Fclaude-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbodnar%2Fclaude-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbodnar%2Fclaude-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbodnar%2Fclaude-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielbodnar","download_url":"https://codeload.github.com/danielbodnar/claude-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247778114,"owners_count":20994417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","anthropic-claude","bun","claude","claude-3-5-sonnet","claude-ai","cli","llms"],"created_at":"2024-11-04T03:03:03.439Z","updated_at":"2025-04-08T04:28:33.131Z","avatar_url":"https://github.com/danielbodnar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🤖 Claude CLI\n\n\u003e An elegant interactive CLI for Anthropic's Claude API, built with TypeScript and Bun.js\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## 📚 Table of Contents\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n- [Features](#-features)\n- [Installation](#-installation)\n- [Usage](#-usage)\n  - [Basic Commands](#basic-commands)\n  - [Templates](#templates)\n  - [Session Management](#session-management)\n- [Configuration](#-configuration)\n- [Examples](#-examples)\n- [Development](#-development)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n\u003c/details\u003e\n\n## ✨ Features\n\n- 🎯 Interactive chat sessions with Claude\n- 📝 Smart code detection and file saving\n- 🎨 Beautiful console interface with syntax highlighting\n- 💾 Auto-save and session replay\n- 🔄 Rate limiting and error handling\n- 📦 Template support for common use cases\n- 🧪 Dry-run mode for testing\n- 🔍 Type-safe configuration with Zod\n\n## 🚀 Installation\n\n```bash\n# Using bun\nbun install -g claude-cli\n\n# Using npm\nnpm install -g claude-cli\n```\n\n## 🎮 Usage\n\n### Basic Commands\n\n```bash\n# Start a new chat session\nclaude-cli chat\n\n# Use a specific template\nclaude-cli chat --template rust\n\n# Replay a previous session\nclaude-cli replay \u003csession-id\u003e\n\n# Show help\nclaude-cli --help\n```\n\n### Templates\n\n\u003cdetails\u003e\n\u003csummary\u003eAvailable Templates\u003c/summary\u003e\n\n```typescript twoslash\n// @filename: templates.ts\nconst templates = {\n  rust: {\n    name: 'Rust Expert',\n    description: 'Expert Rust development assistance',\n    systemPrompt: `You are an expert Rust developer...`\n  },\n  typescript: {\n    name: 'TypeScript Expert',\n    description: 'Expert TypeScript development assistance',\n    systemPrompt: `You are an expert TypeScript developer...`\n  }\n}\n```\n\n\u003c/details\u003e\n\n### Session Management\n\nSessions are automatically saved in `.claude-sessions` directory as YAML files:\n\n```yaml\nid: abc123\nstartTime: 1234567890\nmessages:\n  - role: user\n    content: Hello\n    timestamp: 1234567890\n  - role: assistant\n    content: Hi! How can I help you today?\n    timestamp: 1234567891\ncodeBlocks:\n  - filename: example.rs\n    language: rust\n    content: |\n      fn main() {\n          println!(\"Hello, world!\");\n      }\n```\n\n## ⚙️ Configuration\n\nCreate a `.claude-cli.config.ts` file in your project root:\n\n```typescript twoslash\n// @filename: config.ts\nexport default {\n  templates: {\n    // Custom templates\n    myTemplate: {\n      name: 'My Template',\n      description: 'Custom template',\n      systemPrompt: 'Your system prompt here',\n    }\n  },\n  defaults: {\n    outputDir: './output',\n    model: 'claude-3-7-sonnet-latest',\n    autoSave: true,\n    sessionDir: './.claude-sessions',\n  }\n}\n```\n\n## 📝 Examples\n\n\u003cdetails\u003e\n\u003csummary\u003eBasic Chat Session\u003c/summary\u003e\n\n```bash\n$ claude-cli chat\n🤖 Welcome to Claude CLI!\n💭 Your message: Help me write a Rust function to calculate Fibonacci numbers\n\n┌─────────────────────────────────────────────────────\n│ Claude:\n│ I'll help you create an efficient Rust function for calculating Fibonacci numbers.\n│ Here's an implementation using dynamic programming:\n│\n│ 📄 fib.rs\n│ fn fibonacci(n: u64) -\u003e u64 {\n│     if n \u003c= 1 {\n│         return n;\n│     }\n│\n│     let mut a = 0;\n│     let mut b = 1;\n│\n│     for _ in 2..=n {\n│         let temp = a + b;\n│         a = b;\n│         b = temp;\n│     }\n│\n│     b\n│ }\n│\n│ Would you like me to save this file?\n└─────────────────────────────────────────────────────\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eUsing Templates\u003c/summary\u003e\n\n```bash\n$ claude-cli chat --template rust\n🤖 Rust Expert Mode Activated!\n💭 Your message: How do I read a large JSON file efficiently?\n...\n```\n\n\u003c/details\u003e\n\n## 🛠️ Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/danielbodnar/claude-cli.git\n\n# Install dependencies\nbun install\n\n# Build\nbun run build\n\n# Run tests\nbun test\n\n# Run locally\nbun run dev\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nMIT License - see the [LICENSE](LICENSE) file for details\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  Made with ❤️ using Bun.js and TypeScript\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbodnar%2Fclaude-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielbodnar%2Fclaude-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbodnar%2Fclaude-cli/lists"}