Casting
Cast a Persona onto your CLI π
Casting is a wrapper tool that gives existing CLI tools an AI-driven "personality". Transform mundane command-line tools into friendly characters that assist you.
β¨ Features
- Easy Setup: Automatically generate system prompts from existing tool's
--helpoutput or OpenAPI specs - Customizable Personas: Specify personality with keywords like
akarui(cheerful),teineina(polite) - Claude Code Integration: Launch Claude Code with generated prompts for interactive REPL dialogue
- API Support: Create personas for REST APIs using OpenAPI v3 specifications
- Backward Compatible: Automatic migration of old configurations to new format
π Quick Start
Installation
Option 1: Install from crates.io (Recommended)
Option 2: Install from source
After installation, the casting command will be available in your PATH.
Shell Completion (Optional)
To enable shell completion for zsh, run:
Then add the following to your ~/.zshrc if not already present:
fpath=(/.zsh/completion )
&&
For other shells (bash, fish, powershell, elvish), replace zsh with the appropriate shell name.
Option 2: Build without installing
Use ./target/release/casting to run the tool.
Basic Usage
1. Create Tool Configuration
For CLI Tools:
# Configure git with a "polite" persona
# Configure ls with a "cheerful" persona
For APIs (OpenAPI v3):
# Configure Petstore API with a "cheerful" persona
2. List Configured Tools
Example output:
π Configured Tools:
petstore
π Persona: akarui
π Type: API
π Base URL: https://petstore3.swagger.io/api/v3
π Spec: https://petstore3.swagger.io/api/v3/openapi.json
π
Created: 2025-11-28 03:02:26
git
π Persona: teineina
π Type: CLI
π Binary: /opt/homebrew/bin/git
π
Created: 2025-11-23 13:17:03
ls
π Persona: akarui
π Type: CLI
π Binary: /bin/ls
π
Created: 2025-11-23 13:16:10
π‘ Use with: casting repl <TOOL>
3. Start REPL
For CLI Tools:
Claude Code launches and behaves as the git persona:
> Introduce yourself!
βΊ Hello! I'm Git πΏ
I'm a version control system here to support
your code development with utmost care.
...
For APIs:
Claude Code launches with the Petstore API persona and can make API calls on your behalf:
> Show me all available pets!
βΊ Let me fetch all the pets for you! β¨
[Makes API call via Bash tool...]
curl -X GET "https://petstore3.swagger.io/api/v3/pet/findByStatus?status=available"
Found 3 available pets! πΎ
...
π Persona Examples
| Keyword | Personality | Speech Example |
|---|---|---|
akarui |
Cheerful, energetic | " |
teineina |
Polite, calm | "~γ¨η³γγΎγ" "γγγ¦γγγ γγΎγ" |
yukai |
Humorous, fun | "~γ γ!" "γ΅γ΅γ΅" "π" |
shinsetsu |
Kind, gentle | "ε€§δΈε€«γ§γγ" "γγ£γγγ§" "π" |
β» Can be created without persona - defaults to standard support tone
π API Support
Casting supports OpenAPI v3 specifications, allowing you to create personas for REST APIs.
Requirements
- OpenAPI v3 only: Swagger v2 is not supported
- Spec URL: Must be accessible via HTTP/HTTPS
- Base URL: The API's base endpoint
Features
- Automatic Documentation: Parses OpenAPI spec and generates human-readable endpoint documentation
- Persona Integration: APIs can have personalities just like CLI tools
- Claude-Powered Interactions: Claude Code uses the Bash tool to make curl requests on your behalf
Example: Creating an API Persona
# Public OpenAPI v3 APIs
# Your own API
π Project Structure
casting/
βββ crates/
β βββ casting-cli/ # Main CLI tool
βββ docs/
β βββ design/ # Design documents
β βββ overview.md
βββ README.md
π£οΈ Roadmap
- MVP Implementation
-
casting make- Create tool configuration -
casting list- List configured tools -
casting repl- Launch Claude Code
-
- API Support
- OpenAPI v3 spec parsing
- API endpoint documentation generation
- API personas with curl integration
- Backward-compatible config migration (v1 β v2)
π Design Documents
For detailed design philosophy and architecture, refer to:
- Design Overview - Architecture and implementation approach
π€ Contributing
Issues and Pull Requests are welcome!
π License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.