Metadata-Version: 2.4
Name: opencode-go-usage-analyzer
Version: 0.2.0
Summary: CLI that displays OpenCode Go workspace usage from the web dashboard
Project-URL: Homepage, https://github.com/henriqueSFernandes/opencode-go-usage-analyzer
Project-URL: Repository, https://github.com/henriqueSFernandes/opencode-go-usage-analyzer
Project-URL: Issues, https://github.com/henriqueSFernandes/opencode-go-usage-analyzer/issues
Author: Henrique Sardo Fernandes
License: MIT
License-File: LICENSE
Keywords: cli,monitoring,opencode,usage
Classifier: Development Status :: 3 - Alpha
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.14.3
Requires-Dist: requests>=2.33.1
Requires-Dist: rich>=15.0.0
Provides-Extra: dev
Requires-Dist: build>=1.3.0; extra == 'dev'
Requires-Dist: pytest>=8.4.2; extra == 'dev'
Requires-Dist: ruff>=0.13.3; extra == 'dev'
Description-Content-Type: text/markdown

## opencode-go-usage-analyzer

CLI tool to display OpenCode Go workspace usage limits from the web dashboard.

### Features

- Shows Rolling/Weekly/Monthly usage with a colorized terminal table.
- Interactive authentication prompt (workspace ID + auth token).
- Local session persistence by default.
- `--no-remember` mode for one-off runs without touching local session storage.
- `--logout` to clear the saved local session quickly.

### Requirements

- Python 3.10+
- `uv` (recommended) or `pip`

### Install

#### With uv (recommended)

```bash
uv tool install opencode-go-usage-analyzer
```

#### From source

```bash
git clone https://github.com/henriqueSFernandes/opencode-go-usage-analyzer.git
cd opencode-go-usage-analyzer
uv sync
uv run opencode-usage --help
```

### Usage

```bash
opencode-usage
```

On first run, the CLI prompts for:

- Workspace ID
- Auth token (`auth` cookie value)

By default, credentials are saved to `.opencode/session.json` and reused automatically.

### Command options

```bash
opencode-usage --no-remember
opencode-usage --logout
```

- `--no-remember`: do not read or write the local session file.
- `--logout`: delete the local saved session and exit.

### Development

```bash
uv sync --extra dev
uv run opencode-usage --help
uv build
```

### License

MIT. See `LICENSE`.
