Metadata-Version: 2.4
Name: yaca
Version: 0.1.1a2
Summary: Multi-provider LLM agent with an interactive REPL
Project-URL: Homepage, https://git.sr.ht/~kristjansson/yaca
Project-URL: Repository, https://git.sr.ht/~kristjansson/yaca
Author-email: Andrew Christianson <and@rew.dev>
License: MIT License
        
        Copyright (c) 2026 Andrew Christianson
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agent,ai,anthropic,cerebras,cli,groq,llm,openai,repl,tool-use
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Terminals
Requires-Python: >=3.14
Requires-Dist: anthropic>=0.104.1
Requires-Dist: cerebras-cloud-sdk>=1.67.0
Requires-Dist: groq>=1.2.0
Requires-Dist: keyring>=25.7.0
Requires-Dist: openai>=2.38.0
Requires-Dist: pexpect>=4.9.0
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: pydantic>=2.13.4
Requires-Dist: pyfzf>=0.3.1
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich>=14.0.0
Description-Content-Type: text/markdown

# yaca — Yet Another Crafty Agent

A multi-provider LLM agent with an interactive terminal REPL. Switch between
Anthropic, OpenAI, Groq, Cerebras, and LM Studio mid-session; stream output;
run tools; branch conversation threads.

## Install

```sh
pip install yaca
# or
uv tool install yaca
```

Requires Python 3.14+.

## Quick start

Create a `yaca.yaml` in your working directory:

```yaml
defaults:
  provider: anthropic/main
  model: claude-sonnet-4-6

providers:
  - type: anthropic
    id: main
```

Store your API key (written to the OS keyring):

```sh
yaca
> /connect anthropic/main
```

Or export it as an environment variable:

```sh
export ANTHROPIC_API_KEY=sk-ant-...
```

Then run:

```sh
yaca
```

## Configuration

`yaca.yaml` is read from the current working directory. The `defaults` block
sets the starting provider, model, effort level, and reasoning budget. The
`providers` list declares every provider available in the session.

```yaml
defaults:
  provider: anthropic/main
  model: claude-sonnet-4-6
  effort: low          # off | low | medium | high

providers:
  - type: anthropic
    id: main

  - type: openai_responses
    id: openai

  - type: groq
    id: groq

  - type: cerebras
    id: cerebras

  - type: lmstudio_chat
    id: local
```

## Providers

| Type | Backend | Auth env var |
|---|---|---|
| `anthropic` | Anthropic Messages API | `ANTHROPIC_API_KEY` |
| `openai_chat` | OpenAI Chat Completions | `OPENAI_API_KEY` |
| `openai_responses` | OpenAI Responses API | `OPENAI_API_KEY` |
| `groq` | Groq | `GROQ_API_KEY` |
| `cerebras` | Cerebras Cloud | `CEREBRAS_API_KEY` |
| `lmstudio_chat` | LM Studio (Chat) | — |
| `lmstudio_responses` | LM Studio (Responses) | — |
| `lmstudio_anthropic` | LM Studio (Anthropic) | — |

LM Studio providers connect to `localhost:1234` and require no API key.

## REPL commands

| Command | Description |
|---|---|
| `/model [name]` | Pick a provider and model interactively or by name |
| `/effort <level>[:<budget>]` | Set reasoning effort; `off` to disable |
| `/connect [type/id]` | Store an API key in the OS keyring |
| `/print` | Dump current thread as JSON |
| `/tools` | List registered tools with schemas |
| `/quit` | Exit |

## Tools

yaca ships with tools for filesystem access and interactive shell sessions:

- **ListFiles / ReadFile** — list and read local files
- **Editor sessions** — open and interact with editor buffers
- **Interactive sessions** — spawn and drive terminal processes (pexpect by
  default; `--tmux-tools` to use tmux-backed sessions instead)

## License

MIT
