vasted 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vasted-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- vasted-0.1.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- vasted-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- vasted-0.1.0/.github/pull_request_template.md +17 -0
- vasted-0.1.0/.github/workflows/ci.yml +20 -0
- vasted-0.1.0/.github/workflows/publish.yml +64 -0
- vasted-0.1.0/.gitignore +15 -0
- vasted-0.1.0/AGENTS.md +66 -0
- vasted-0.1.0/CHANGELOG.md +17 -0
- vasted-0.1.0/CLAUDE.md +30 -0
- vasted-0.1.0/CODE_OF_CONDUCT.md +29 -0
- vasted-0.1.0/CONTRIBUTING.md +46 -0
- vasted-0.1.0/LICENSE +21 -0
- vasted-0.1.0/PKG-INFO +232 -0
- vasted-0.1.0/README.md +174 -0
- vasted-0.1.0/RELEASING.md +63 -0
- vasted-0.1.0/SECURITY.md +28 -0
- vasted-0.1.0/app/__init__.py +9 -0
- vasted-0.1.0/app/cli.py +34 -0
- vasted-0.1.0/app/client_config.py +83 -0
- vasted-0.1.0/app/commands/__init__.py +27 -0
- vasted-0.1.0/app/commands/common.py +38 -0
- vasted-0.1.0/app/commands/completions.py +12 -0
- vasted-0.1.0/app/commands/config.py +43 -0
- vasted-0.1.0/app/commands/down.py +42 -0
- vasted-0.1.0/app/commands/logs.py +56 -0
- vasted-0.1.0/app/commands/profile.py +64 -0
- vasted-0.1.0/app/commands/rotate_token.py +12 -0
- vasted-0.1.0/app/commands/serve.py +20 -0
- vasted-0.1.0/app/commands/setup.py +513 -0
- vasted-0.1.0/app/commands/status.py +36 -0
- vasted-0.1.0/app/commands/token.py +35 -0
- vasted-0.1.0/app/commands/up.py +210 -0
- vasted-0.1.0/app/commands/usage.py +30 -0
- vasted-0.1.0/app/config.py +188 -0
- vasted-0.1.0/app/defaults.py +16 -0
- vasted-0.1.0/app/models.py +170 -0
- vasted-0.1.0/app/persistence.py +81 -0
- vasted-0.1.0/app/proxy.py +516 -0
- vasted-0.1.0/app/service.py +509 -0
- vasted-0.1.0/app/sizing.py +195 -0
- vasted-0.1.0/app/state.py +38 -0
- vasted-0.1.0/app/usage.py +157 -0
- vasted-0.1.0/app/user_config.py +137 -0
- vasted-0.1.0/app/vast.py +889 -0
- vasted-0.1.0/bot.py +132 -0
- vasted-0.1.0/docs/assets/.gitkeep +0 -0
- vasted-0.1.0/docs/assets/demo.gif +0 -0
- vasted-0.1.0/pyproject.toml +62 -0
- vasted-0.1.0/tests/test_config.py +280 -0
- vasted-0.1.0/tests/test_models.py +82 -0
- vasted-0.1.0/tests/test_proxy.py +131 -0
- vasted-0.1.0/tests/test_service.py +388 -0
- vasted-0.1.0/tests/test_sizing.py +104 -0
- vasted-0.1.0/tests/test_up.py +83 -0
- vasted-0.1.0/tests/test_usage.py +72 -0
- vasted-0.1.0/tests/test_vast.py +267 -0
- vasted-0.1.0/tests/test_version.py +14 -0
- vasted-0.1.0/uv.lock +660 -0
- vasted-0.1.0/vasted +6 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report incorrect behavior or regressions
|
|
4
|
+
title: "[bug] "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
|
|
11
|
+
What happened?
|
|
12
|
+
|
|
13
|
+
## Reproduction
|
|
14
|
+
|
|
15
|
+
Exact commands and steps:
|
|
16
|
+
|
|
17
|
+
1.
|
|
18
|
+
2.
|
|
19
|
+
3.
|
|
20
|
+
|
|
21
|
+
## Expected behavior
|
|
22
|
+
|
|
23
|
+
What did you expect to happen?
|
|
24
|
+
|
|
25
|
+
## Environment
|
|
26
|
+
|
|
27
|
+
- OS:
|
|
28
|
+
- Python version:
|
|
29
|
+
- `uv` version:
|
|
30
|
+
- `vasted` version/commit:
|
|
31
|
+
|
|
32
|
+
## Logs
|
|
33
|
+
|
|
34
|
+
Paste relevant logs/tracebacks (redact secrets).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Propose a new capability or UX improvement
|
|
4
|
+
title: "[feature] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
What problem are you trying to solve?
|
|
12
|
+
|
|
13
|
+
## Proposed solution
|
|
14
|
+
|
|
15
|
+
Describe your preferred solution.
|
|
16
|
+
|
|
17
|
+
## Alternatives considered
|
|
18
|
+
|
|
19
|
+
What else did you consider?
|
|
20
|
+
|
|
21
|
+
## Additional context
|
|
22
|
+
|
|
23
|
+
Anything else (examples, links, prior art).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe what this PR changes and why.
|
|
4
|
+
|
|
5
|
+
## Changes
|
|
6
|
+
|
|
7
|
+
-
|
|
8
|
+
|
|
9
|
+
## Validation
|
|
10
|
+
|
|
11
|
+
- [ ] `uv run ruff check .`
|
|
12
|
+
- [ ] `uv run mypy app tests`
|
|
13
|
+
- [ ] `uv run pytest -q`
|
|
14
|
+
|
|
15
|
+
## Notes
|
|
16
|
+
|
|
17
|
+
Any migration, compatibility, or operational notes.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v4
|
|
12
|
+
- uses: astral-sh/setup-uv@v4
|
|
13
|
+
- name: Sync deps
|
|
14
|
+
run: uv sync --extra dev
|
|
15
|
+
- name: Ruff
|
|
16
|
+
run: uv run ruff check .
|
|
17
|
+
- name: Mypy
|
|
18
|
+
run: uv run mypy app tests bot.py
|
|
19
|
+
- name: Pytest
|
|
20
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: publish-package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
repository:
|
|
7
|
+
description: "Target repository"
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- testpypi
|
|
12
|
+
- pypi
|
|
13
|
+
default: testpypi
|
|
14
|
+
publish:
|
|
15
|
+
description: "Actually publish package"
|
|
16
|
+
required: true
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: astral-sh/setup-uv@v4
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: uv build
|
|
28
|
+
- name: Validate metadata
|
|
29
|
+
run: uvx twine check dist/*
|
|
30
|
+
- name: Upload artifacts
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: dist
|
|
34
|
+
path: dist/*
|
|
35
|
+
|
|
36
|
+
publish-testpypi:
|
|
37
|
+
if: ${{ inputs.publish && inputs.repository == 'testpypi' }}
|
|
38
|
+
needs: build
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write
|
|
42
|
+
environment: testpypi
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: dist
|
|
47
|
+
path: dist
|
|
48
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
49
|
+
with:
|
|
50
|
+
repository-url: https://test.pypi.org/legacy/
|
|
51
|
+
|
|
52
|
+
publish-pypi:
|
|
53
|
+
if: ${{ inputs.publish && inputs.repository == 'pypi' }}
|
|
54
|
+
needs: build
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
permissions:
|
|
57
|
+
id-token: write
|
|
58
|
+
environment: pypi
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/download-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: dist
|
|
63
|
+
path: dist
|
|
64
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
vasted-0.1.0/.gitignore
ADDED
vasted-0.1.0/AGENTS.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Guidance for automation agents operating this repository.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Run `vasted` commands in fully unattended mode without hanging on interactive prompts.
|
|
8
|
+
|
|
9
|
+
## Non-Interactive Command Patterns
|
|
10
|
+
|
|
11
|
+
Use these command forms for automation:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# 1) Configure without wizard prompts
|
|
15
|
+
uv run vasted setup --non-interactive \
|
|
16
|
+
--vast-api-key "$VASTED_API_KEY" \
|
|
17
|
+
--bearer-token "$VASTED_BEARER_TOKEN" \
|
|
18
|
+
--client openclaw \
|
|
19
|
+
--deployment-mode local_pc \
|
|
20
|
+
--model qwen3-coder-30b \
|
|
21
|
+
--quality balanced \
|
|
22
|
+
--gpu-mode auto
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# 2) Launch worker without confirmation prompts
|
|
27
|
+
uv run vasted up --non-interactive --yes --jinja --model qwen3-coder-30b --quality balanced --gpu-mode auto --no-serve
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 3) Poll status/usage
|
|
32
|
+
uv run vasted status --verbose
|
|
33
|
+
uv run vasted usage
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 4) Teardown safely for automation
|
|
38
|
+
uv run vasted down --force
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Important Behavior
|
|
42
|
+
|
|
43
|
+
- `vasted setup --non-interactive` never opens the interactive setup wizard.
|
|
44
|
+
- `vasted up --non-interactive` will fail if a confirmation is needed (for example budget overage).
|
|
45
|
+
- Add `--yes` to `vasted up` to auto-confirm and avoid failures in unattended jobs.
|
|
46
|
+
- `--client openclaw|opencode|custom` sets persisted defaults for jinja template behavior.
|
|
47
|
+
- For OpenClaw/chat-agent use cases, keep `--jinja` enabled (default).
|
|
48
|
+
- For raw completion-style workloads, pass `--no-jinja` if needed.
|
|
49
|
+
- Prefer `--no-serve` in headless environments where proxy process management is external.
|
|
50
|
+
|
|
51
|
+
## Required Environment Variables
|
|
52
|
+
|
|
53
|
+
- `VASTED_API_KEY`: Vast.ai API key (required for non-interactive setup if `--vast-api-key` is not passed).
|
|
54
|
+
- `VASTED_BEARER_TOKEN`: Optional stable proxy token. If omitted, one is generated.
|
|
55
|
+
- `VASTED_CLIENT`: Optional persisted client preset (`openclaw`, `opencode`, `custom`).
|
|
56
|
+
- `VASTED_LLAMA_JINJA`: Optional persisted jinja default (`true/false`).
|
|
57
|
+
|
|
58
|
+
## Validation Commands
|
|
59
|
+
|
|
60
|
+
Before opening PRs:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv run ruff check .
|
|
64
|
+
uv run mypy app tests bot.py
|
|
65
|
+
uv run pytest -q
|
|
66
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on Keep a Changelog, and this project follows Semantic Versioning.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Open-source community docs and templates.
|
|
12
|
+
- Release prep docs/workflow for manual TestPyPI/PyPI publishing.
|
|
13
|
+
- Version sync test between `pyproject.toml` and `app.__version__`.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Improved `down` edge-case handling and usage/billing reporting.
|
vasted-0.1.0/CLAUDE.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Vasted
|
|
2
|
+
|
|
3
|
+
Personal GPU launcher for on-demand LLM inference on Vast.ai.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
```bash
|
|
7
|
+
uv sync
|
|
8
|
+
uv run vasted setup
|
|
9
|
+
uv run vasted serve
|
|
10
|
+
uv run vasted up
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Stack
|
|
14
|
+
- Python 3.12+, uv only
|
|
15
|
+
- rich (TUI/output), pyyaml (config), httpx (proxy/HTTP), click (CLI)
|
|
16
|
+
- vastai SDK for Vast.ai API
|
|
17
|
+
- Optional: python-telegram-bot
|
|
18
|
+
|
|
19
|
+
## Architecture
|
|
20
|
+
- `app/` — core modules (config, state, models, vast, proxy, usage)
|
|
21
|
+
- `vasted` — CLI entry point (thin wrapper over app/)
|
|
22
|
+
- `bot.py` — optional Telegram adapter
|
|
23
|
+
|
|
24
|
+
## Key Rules
|
|
25
|
+
1. CLI calls core functions directly — never bot handlers
|
|
26
|
+
2. Proxy is THE stable endpoint; worker URL is internal only
|
|
27
|
+
3. Config (user prefs) and state (active worker) are separate files
|
|
28
|
+
4. Bearer token is fixed by user at setup; worker auth is hidden
|
|
29
|
+
5. llama.cpp with GGUF models only (v1)
|
|
30
|
+
6. Use raw Docker image launch flow (no Vast templates): `ghcr.io/ggml-org/llama.cpp:server-cuda` + onstart script
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Standard
|
|
4
|
+
|
|
5
|
+
This project is committed to a respectful, harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
Examples of expected behavior:
|
|
8
|
+
|
|
9
|
+
- Be respectful in feedback and discussion.
|
|
10
|
+
- Assume good intent and ask clarifying questions.
|
|
11
|
+
- Focus on technical issues, not people.
|
|
12
|
+
|
|
13
|
+
Examples of unacceptable behavior:
|
|
14
|
+
|
|
15
|
+
- Harassment, insults, or discriminatory language.
|
|
16
|
+
- Personal attacks or sustained hostile behavior.
|
|
17
|
+
- Publishing private information without permission.
|
|
18
|
+
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
This Code of Conduct applies in project spaces, including issues, pull requests, and related discussions.
|
|
22
|
+
|
|
23
|
+
## Enforcement
|
|
24
|
+
|
|
25
|
+
Project maintainers may remove, edit, or reject comments, commits, code, and other contributions not aligned with this Code of Conduct.
|
|
26
|
+
|
|
27
|
+
## Reporting
|
|
28
|
+
|
|
29
|
+
Report behavior issues to project maintainers through private channels when possible.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Contributing to `vasted`
|
|
2
|
+
|
|
3
|
+
Thanks for contributing.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
uv sync --extra dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Before Opening a PR
|
|
12
|
+
|
|
13
|
+
Run the full local checks:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv run ruff check .
|
|
17
|
+
uv run mypy app tests
|
|
18
|
+
uv run pytest -q
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Pull Request Guidelines
|
|
22
|
+
|
|
23
|
+
- Keep PRs focused and small when possible.
|
|
24
|
+
- Add or update tests when behavior changes.
|
|
25
|
+
- Update docs (`README.md`, command help text) when UX changes.
|
|
26
|
+
- Use clear commit messages explaining intent.
|
|
27
|
+
|
|
28
|
+
## Code Style
|
|
29
|
+
|
|
30
|
+
- Python 3.12+.
|
|
31
|
+
- `ruff` enforces lint/format expectations.
|
|
32
|
+
- Prefer explicit typing on new/modified interfaces.
|
|
33
|
+
- Keep command output user-oriented and actionable.
|
|
34
|
+
|
|
35
|
+
## Reporting Bugs
|
|
36
|
+
|
|
37
|
+
Use GitHub Issues with:
|
|
38
|
+
|
|
39
|
+
- Exact command(s) run
|
|
40
|
+
- Relevant config (redact secrets)
|
|
41
|
+
- Expected vs actual behavior
|
|
42
|
+
- Logs or traceback
|
|
43
|
+
|
|
44
|
+
## Security Issues
|
|
45
|
+
|
|
46
|
+
Do not open public issues for sensitive vulnerabilities. See `SECURITY.md`.
|
vasted-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 vasted contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
vasted-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vasted
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Personal GPU launcher for on-demand LLM inference on Vast.ai
|
|
5
|
+
Project-URL: Homepage, https://github.com/deeflect/vasted
|
|
6
|
+
Project-URL: Repository, https://github.com/deeflect/vasted
|
|
7
|
+
Project-URL: Issues, https://github.com/deeflect/vasted/issues
|
|
8
|
+
Author: vasted contributors
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 vasted contributors
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: cli,inference,llama.cpp,llm,proxy,vast.ai
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Operating System :: OS Independent
|
|
36
|
+
Classifier: Programming Language :: Python :: 3
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
39
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
40
|
+
Requires-Python: >=3.12
|
|
41
|
+
Requires-Dist: click>=8.1.7
|
|
42
|
+
Requires-Dist: httpx>=0.27.0
|
|
43
|
+
Requires-Dist: keyring>=25.0.0
|
|
44
|
+
Requires-Dist: pyyaml>=6.0.1
|
|
45
|
+
Requires-Dist: rich>=13.7.1
|
|
46
|
+
Requires-Dist: starlette>=0.37.2
|
|
47
|
+
Requires-Dist: uvicorn>=0.30.0
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: httpx[test]; extra == 'dev'
|
|
50
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
51
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
52
|
+
Requires-Dist: pytest-asyncio; extra == 'dev'
|
|
53
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
54
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
55
|
+
Provides-Extra: telegram
|
|
56
|
+
Requires-Dist: python-telegram-bot>=21.0; extra == 'telegram'
|
|
57
|
+
Description-Content-Type: text/markdown
|
|
58
|
+
|
|
59
|
+
# vasted
|
|
60
|
+
|
|
61
|
+
[](https://github.com/deeflect/vasted/actions/workflows/ci.yml)
|
|
62
|
+
[](./LICENSE)
|
|
63
|
+
|
|
64
|
+
`vasted` is a CLI that launches on-demand Vast.ai GPU workers for `llama.cpp` GGUF inference and exposes a stable OpenAI-compatible `/v1` endpoint.
|
|
65
|
+
|
|
66
|
+
Built by [deeflect.com](https://deeflect.com) · Follow on X: [x.com/deeflectcom](https://x.com/deeflectcom)
|
|
67
|
+
|
|
68
|
+
## Demo
|
|
69
|
+
|
|
70
|
+

|
|
71
|
+
|
|
72
|
+
## Why `vasted`
|
|
73
|
+
|
|
74
|
+
- Stable client endpoint while worker URLs rotate.
|
|
75
|
+
- Setup wizard for local machine and VPS deployments.
|
|
76
|
+
- Non-interactive automation mode for agents/CI.
|
|
77
|
+
- OpenAI-compatible proxy for tools that expect `/v1` APIs.
|
|
78
|
+
- Session usage and cost tracking.
|
|
79
|
+
- Optional Telegram bot control commands.
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
- Python `3.12+`
|
|
84
|
+
- [`uv`](https://docs.astral.sh/uv/)
|
|
85
|
+
- Vast.ai account + API key
|
|
86
|
+
- Optional: Telegram bot token (`telegram` extra)
|
|
87
|
+
|
|
88
|
+
## Install
|
|
89
|
+
|
|
90
|
+
### Use from source (recommended while iterating)
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
git clone https://github.com/deeflect/vasted.git
|
|
94
|
+
cd vasted
|
|
95
|
+
uv sync --extra dev
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Run CLI commands from the repo:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
uv run vasted --help
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Install as a tool
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
uv tool install "git+https://github.com/deeflect/vasted.git"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Upgrade later:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
uv tool upgrade vasted
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Quick Start
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
uv run vasted setup
|
|
120
|
+
uv run vasted up
|
|
121
|
+
uv run vasted status --verbose
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Client connection values after setup:
|
|
125
|
+
|
|
126
|
+
- Base URL: `http://<host>:<port>/v1`
|
|
127
|
+
- Auth header: `Authorization: Bearer <token>`
|
|
128
|
+
|
|
129
|
+
When `proxy_host` is `0.0.0.0`, use your real machine/VPS IP or domain in clients.
|
|
130
|
+
|
|
131
|
+
## Automation / Unattended Mode
|
|
132
|
+
|
|
133
|
+
Use non-interactive commands to avoid prompts:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
uv run vasted setup --non-interactive \
|
|
137
|
+
--vast-api-key "$VASTED_API_KEY" \
|
|
138
|
+
--bearer-token "$VASTED_BEARER_TOKEN" \
|
|
139
|
+
--client openclaw \
|
|
140
|
+
--deployment-mode local_pc \
|
|
141
|
+
--model qwen3-coder-30b \
|
|
142
|
+
--quality balanced \
|
|
143
|
+
--gpu-mode auto
|
|
144
|
+
|
|
145
|
+
uv run vasted up --non-interactive --yes --jinja --model qwen3-coder-30b --quality balanced --gpu-mode auto --no-serve
|
|
146
|
+
uv run vasted status --verbose
|
|
147
|
+
uv run vasted usage
|
|
148
|
+
uv run vasted down --force
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Environment variables accepted by `setup --non-interactive`:
|
|
152
|
+
|
|
153
|
+
- `VASTED_API_KEY`
|
|
154
|
+
- `VASTED_BEARER_TOKEN`
|
|
155
|
+
- `VASTED_CLIENT` (`openclaw`, `opencode`, `custom`)
|
|
156
|
+
- `VASTED_LLAMA_JINJA` (`true`/`false`)
|
|
157
|
+
- `VASTED_MODEL`, `VASTED_QUALITY`, `VASTED_GPU_MODE`, `VASTED_GPU_PRESET`
|
|
158
|
+
- `VASTED_DEPLOYMENT_MODE`, `VASTED_PROXY_HOST`, `VASTED_PROXY_PORT`, `VASTED_PUBLIC_HOST`
|
|
159
|
+
|
|
160
|
+
## Client Profiles and Jinja Behavior
|
|
161
|
+
|
|
162
|
+
`setup` supports client presets that define default `llama.cpp --jinja` behavior:
|
|
163
|
+
|
|
164
|
+
- `--client openclaw`: jinja on by default
|
|
165
|
+
- `--client opencode`: jinja off by default
|
|
166
|
+
- `--client custom`: keep/manual behavior
|
|
167
|
+
|
|
168
|
+
Per launch override is still available:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
uv run vasted up --jinja
|
|
172
|
+
uv run vasted up --no-jinja
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Command Reference
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
vasted setup [--non-interactive] [--manual] [--client openclaw|opencode|custom]
|
|
179
|
+
vasted up [--model ...] [--quality ...] [--gpu-mode auto|manual] [--gpu-preset ...] [--profile ...] [--max-price ...] [--jinja|--no-jinja] [--yes] [--non-interactive] [--serve|--no-serve]
|
|
180
|
+
vasted down [--force]
|
|
181
|
+
vasted status [--verbose]
|
|
182
|
+
vasted logs [--instance-id N] [--tail N]
|
|
183
|
+
vasted usage
|
|
184
|
+
vasted token show [--full]
|
|
185
|
+
vasted token rotate
|
|
186
|
+
vasted rotate-token
|
|
187
|
+
vasted config show
|
|
188
|
+
vasted profile list|add|use|remove
|
|
189
|
+
vasted completions <bash|zsh|fish>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Telegram Bot (Optional)
|
|
193
|
+
|
|
194
|
+
Install telegram extra and run:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
uv sync --extra telegram
|
|
198
|
+
uv run python bot.py
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Development
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
uv run ruff check .
|
|
205
|
+
uv run mypy app tests bot.py
|
|
206
|
+
uv run pytest -q
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Project Layout
|
|
210
|
+
|
|
211
|
+
- `app/commands/*`: CLI command handlers
|
|
212
|
+
- `app/service.py`: worker lifecycle + launch policy
|
|
213
|
+
- `app/proxy.py`: OpenAI-compatible reverse proxy
|
|
214
|
+
- `app/vast.py`: Vast API integration + startup script generation
|
|
215
|
+
- `app/usage.py`: token/time/cost accounting
|
|
216
|
+
- `app/user_config.py`: persistent config + keyring integration
|
|
217
|
+
- `app/state.py`: runtime state persistence
|
|
218
|
+
- `bot.py`: optional Telegram control plane
|
|
219
|
+
|
|
220
|
+
## Security
|
|
221
|
+
|
|
222
|
+
- Keep Vast API keys and bearer tokens private.
|
|
223
|
+
- Prefer localhost binds unless remote access is required.
|
|
224
|
+
- See [SECURITY.md](./SECURITY.md) for disclosure policy.
|
|
225
|
+
|
|
226
|
+
## Contributing
|
|
227
|
+
|
|
228
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md) and run the validation commands before opening a PR.
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
MIT — see [LICENSE](./LICENSE).
|