Metadata-Version: 2.4
Name: vibewithai
Version: 0.1.0
Summary: AI-powered engineering assistant embedded directly in your Python projects.
Project-URL: Homepage, https://github.com/ragulraj-d/vibewithai
Project-URL: Documentation, https://github.com/ragulraj-d/vibewithai/tree/main/docs
Project-URL: Repository, https://github.com/ragulraj-d/vibewithai
Project-URL: Changelog, https://github.com/ragulraj-d/vibewithai/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/ragulraj-d/vibewithai/issues
Author-email: ragulraj-d <raguldhamu007@gmail.com>
License: MIT License
        
        Copyright (c) 2026 ragulraj-d
        
        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: ai,code-review,developer-tools,llm,refactoring,static-analysis
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: platformdirs>=4.2
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Provides-Extra: analysis
Requires-Dist: bandit>=1.7; extra == 'analysis'
Requires-Dist: libcst>=1.4; extra == 'analysis'
Requires-Dist: radon>=6.0; extra == 'analysis'
Requires-Dist: ruff>=0.5; extra == 'analysis'
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: black>=24.4; extra == 'dev'
Requires-Dist: coverage[toml]>=7.5; extra == 'dev'
Requires-Dist: libcst>=1.4; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: radon>=6.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# vibewithai

**An AI engineering assistant embedded directly in your Python project.**

```python
import vibewithai

# One call. Any keys, any order, no provider names.
vibewithai.login("sk-proj-...", "AIza...", "sk-ant-...")

result = vibewithai.check()
if not result.passed:
    for finding in result.findings_at_or_above(vibewithai.Severity.HIGH):
        print(f"{finding.location}: {finding.title}")
```

Static analysis runs locally first; the AI is asked only about what local tools
cannot answer. Every command returns a structured result object, so the same call
works in a terminal, a CI job, a notebook, or a web service.

---

## Status

**0.1.0 — first release.** The full pipeline works end to end: project scanning,
static analysis, context building, 16 AI providers with automatic failover, 19
commands, and a CLI. 799 tests, 89% coverage, `mypy --strict` clean.

Being a first release, the AI-backed commands have had far more automated testing
than real-world mileage. Treat their output as a capable reviewer's opinion, not
as ground truth — which is why every finding carries a `confidence` score and a
`source` telling you whether it came from a deterministic tool or a model.

## Supported providers

All 16 work with just an API key — no vendor SDKs, no extra dependencies.

| | |
|---|---|
| **Frontier** | OpenAI · Anthropic Claude · Google Gemini · xAI Grok |
| **Aggregators** | OpenRouter · Together AI · Fireworks AI · Hugging Face · GitHub Models |
| **Direct** | DeepSeek · Mistral AI · Cohere · Groq · Perplexity |
| **Enterprise** | Azure OpenAI |
| **Local** | Ollama — no key required |

Adding one is a single entry in `providers/specs.py`; see the
[developer guide](docs/developer-guide.md).

> **Not yet supported:** AWS Bedrock, Google Vertex AI and OCI Generative AI need
> cloud-native request signing (SigV4, service-account JWTs) rather than a bearer
> token. They are planned; until then, reach those models through OpenRouter or
> an OpenAI-compatible gateway.

## Installation

```bash
pip install vibewithai

# with local static-analysis backends (ruff, bandit, radon, libcst)
pip install "vibewithai[analysis]"
```

Requires **Python 3.11+**.

## Quick start

### Authenticate

Pass keys positionally in any order. The provider is detected from the key itself
and verified with a lightweight health check:

```python
import vibewithai

vibewithai.login(
    "sk-proj-xxxxxxxx",  # OpenAI
    "AIzaSyxxxxxxxx",  # Google Gemini
    "xai-xxxxxxxx",  # xAI (Grok)
    "sk-ant-xxxxxxxx",  # Anthropic
)
```

With no arguments, `login()` resolves credentials from the environment and stored
configuration, and falls back to a locally running Ollama if nothing else is
available:

```python
vibewithai.login()  # env vars → stored credentials → local Ollama
```

Or stay entirely out of the code:

```bash
export VIBEWITHAI_OPENAI_API_KEY=sk-proj-...
# conventional per-provider variables are honoured too
export ANTHROPIC_API_KEY=sk-ant-...
```

### Analyse

```python
result = vibewithai.review()

result.status  # Status.WARNING
result.summary  # "3 issues found across 2 files"
result.findings  # list[Finding]
result.suggestions  # list[Suggestion]
result.confidence  # 0.0 – 1.0
result.execution_time  # seconds
result.usage.total_tokens

result.to_dict()  # JSON-serialisable, safe to log
```

Results are iterable and truthy, so ergonomic checks read naturally:

```python
if not vibewithai.check():
    raise SystemExit(1)
```

## Configuration

Layered, highest precedence first:

1. Arguments passed to the call
2. `VIBEWITHAI_*` environment variables
3. Project config — `vibewithai.toml`, `.vibewithai.toml`, or `[tool.vibewithai]` in `pyproject.toml`
4. User config — `<user config dir>/config.toml`
5. Built-in defaults

```toml
# vibewithai.toml
default_provider = "openai"
offline = false
max_context_tokens = 12000

[providers.openai]
model = "gpt-4o-mini"
timeout = 60.0

[analysis]
analyzers = ["ast", "ruff", "bandit"]
blocking_severity = "high"

[cache]
enabled = true
ttl = 86400
```

**Credentials are never read from project config files** — only from the
environment or the user-level credential store — so a key cannot be committed to
version control by accident. See [docs/configuration.md](docs/configuration.md).

## Safety guarantees

These are enforced in code, not merely documented:

- **Nothing is written without confirmation.** Commands that would modify your
  workspace raise `ConfirmationRequiredError` unless you explicitly opt in, and
  they snapshot the original file first.
- **Generated code is never executed.** Ever. It is returned to you as data.
- **Writes cannot escape the project root.** Every destination path is validated.
- **Secrets cannot leak through logs.** `Secret` masks itself in `repr()`,
  `str()`, and f-strings; a redaction filter scrubs credential-shaped text from
  every log record before it is emitted.
- **Credential files are owner-only.** `0600` on the file, `0700` on its
  directory, with a warning if permissions loosen.

## Documentation

| Guide | |
|---|---|
| [Installation](docs/installation.md) | Supported platforms and extras |
| [Quick start](docs/quickstart.md) | First run, walkthrough |
| [Configuration](docs/configuration.md) | Every setting and env var |
| [Architecture](docs/architecture.md) | Layering and design decisions |
| [API reference](docs/api-reference.md) | Public surface |
| [Developer guide](docs/developer-guide.md) | Adding providers and analyzers |
| [Troubleshooting](docs/troubleshooting.md) | Common failures and fixes |
| [FAQ](docs/faq.md) | |

## Contributing

Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) and our
[Code of Conduct](CODE_OF_CONDUCT.md). To report a vulnerability, follow
[SECURITY.md](SECURITY.md) rather than opening a public issue.

## License

[MIT](LICENSE)
