Metadata-Version: 2.4
Name: bardgent
Version: 1.0.1
Summary: A command-line coding agent (OpenAI-compatible API; default NVIDIA Nemotron)
Author-email: Bardia Emamgholizadeh <bardia.egzz@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/bardiaegz/BardGent
Project-URL: Repository, https://github.com/bardiaegz/BardGent
Project-URL: Issues, https://github.com/bardiaegz/BardGent/issues
Keywords: cli,agent,coding-agent,llm
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai
Requires-Dist: requests
Requires-Dist: beautifulsoup4
Requires-Dist: rich
Requires-Dist: prompt-toolkit
Requires-Dist: python-dotenv
Dynamic: license-file

# Bardgent

A terminal coding agent with tools for files, shell, web, memory, skills, sub-agents, and scheduled tasks.

**PyPI:** [https://pypi.org/project/bardgent/](https://pypi.org/project/bardgent/)

---

## Install

Requires **Python 3.8+**.

```bash
pip install bardgent
```

Or with [pipx](https://pipx.pypa.io/) (recommended for CLI apps — isolated env + command on PATH):

```bash
pipx install bardgent
```

Upgrade later:

```bash
pip install --upgrade bardgent
# or
pipx upgrade bardgent
```

---

## Configure API key

The env var name is historical (`GEMINI_API_KEY`). Any OpenAI-compatible key works with the configured base URL (default: NVIDIA).

### Recommended: config file

Create a `.env` file in the Bardgent config directory.

**macOS / Linux**

```bash
mkdir -p ~/.bardgent
nano ~/.bardgent/.env
```

**Windows (PowerShell)**

```powershell
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.bardgent"
notepad "$env:USERPROFILE\.bardgent\.env"
```

Put this line in the file (no spaces around `=`):

```env
GEMINI_API_KEY=your_key_here
```

Optional:

```env
TELEGRAM_BOT_TOKEN=optional_telegram_bot_token
```

| OS | Config directory | Env file |
|----|------------------|----------|
| macOS / Linux | `~/.bardgent/` | `~/.bardgent/.env` |
| Windows | `%USERPROFILE%\.bardgent\` | `%USERPROFILE%\.bardgent\.env` |

### Alternative: environment variable

**macOS / Linux**

```bash
export GEMINI_API_KEY=your_key_here
```

**Windows (PowerShell)**

```powershell
$env:GEMINI_API_KEY = "your_key_here"
```

---

## Run

```bash
bardgent
```

If the command is not found after `pip install`, use:

```bash
python -m bardgent
```

On Windows, if `python` is not found, try:

```powershell
py -m bardgent
```

---

## Defaults

| Setting | Value |
|---------|--------|
| API base | `https://integrate.api.nvidia.com/v1` |
| Model | `nvidia/nemotron-3-ultra-550b-a55b` |
| Config dir | `~/.bardgent/` (Windows: `%USERPROFILE%\.bardgent\`) |

---

## Modes

| Mode | Behavior |
|------|----------|
| **normal** | Approve Write/Edit/Bash (and similar) per action |
| **auto** | Auto-approve non-dangerous actions; dangerous shell still prompts |
| **plan** | Read-only tools only; agent proposes a plan, then you choose how to execute |

Cycle with **Shift+Tab** or `/normal`, `/auto`, `/plan`.

---

## Tools (high level)

- **Files:** Read, Write, Edit, Undo, Glob, Grep
- **Shell:** Bash (cwd persists), background jobs via `ListJobs` / `Await`
- **Web:** WebSearch (DuckDuckGo), Fetch
- **Memory:** save / list / delete long-term notes (`~/.bardgent/Bardgent.md`)
- **Skills:** Claude Code–style `SKILL.md` packs; `/skills`, `/skill install <github_url>`
- **Delegation:** `Task` / `Tasks` (parallel sub-agents)
- **Schedule:** recurring or one-off tasks; `/schedule`, `/schedules`. A detached **scheduler daemon** keeps firing tasks after you close the terminal (auto-started with Bardgent). Manage with `/schedule daemon status|start|stop`. Log: `~/.bardgent/scheduler.log`.

---

## Project instructions

Place any of these in the project root (all that exist are loaded):

- `AGENTS.md`
- `.bardgent/AGENTS.md`, `.bardgent/instructions.md`, `.bardgent/RULES.md`

---

## Skills locations

1. `./.bardgent/skills/<name>/SKILL.md` (project)
2. `~/.bardgent/skills/<name>/SKILL.md` (user)
3. Package `skills/` (optional bundled defaults)

---

## Permissions

Per-project file: `.bardgent/permissions.json`

```json
{
  "auto_approve_bash_prefixes": ["git status", "pytest"],
  "auto_approve_tools": ["Fetch", "Write", "Edit"],
  "extra_dangerous_patterns": []
}
```

---

## Useful commands

Type `/help` in the REPL for the full list. Highlights: `/resume`, `/checkpoints`, `/restore`, `/telegram`, `/summary`, `/clear`.

---

## Develop from source

```bash
git clone https://github.com/bardiaegz/BardGent.git
cd BardGent
python -m venv venv

# macOS / Linux
source venv/bin/activate

# Windows (PowerShell)
# .\venv\Scripts\Activate.ps1

pip install -e .
bardgent
```

---

## License

MIT — use and modify as you like for personal / project use.
