teardrop-cli 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.
- teardrop_cli-0.1.0/.github/workflows/publish.yml +50 -0
- teardrop_cli-0.1.0/.github/workflows/test.yml +38 -0
- teardrop_cli-0.1.0/.gitignore +211 -0
- teardrop_cli-0.1.0/.vscode/settings.json +4 -0
- teardrop_cli-0.1.0/LICENSE +21 -0
- teardrop_cli-0.1.0/PKG-INFO +384 -0
- teardrop_cli-0.1.0/README.md +327 -0
- teardrop_cli-0.1.0/pyproject.toml +73 -0
- teardrop_cli-0.1.0/src/teardrop_cli/__init__.py +1 -0
- teardrop_cli-0.1.0/src/teardrop_cli/_fixtures.py +132 -0
- teardrop_cli-0.1.0/src/teardrop_cli/_lazy.py +67 -0
- teardrop_cli-0.1.0/src/teardrop_cli/cli.py +41 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/__init__.py +0 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/agent.py +190 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/auth.py +270 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/billing.py +58 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/llm_config.py +376 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/marketplace.py +192 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/mcp.py +202 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/models.py +193 -0
- teardrop_cli-0.1.0/src/teardrop_cli/commands/tools.py +207 -0
- teardrop_cli-0.1.0/src/teardrop_cli/config.py +240 -0
- teardrop_cli-0.1.0/src/teardrop_cli/formatting.py +243 -0
- teardrop_cli-0.1.0/tests/conftest.py +157 -0
- teardrop_cli-0.1.0/tests/test_agent.py +68 -0
- teardrop_cli-0.1.0/tests/test_auth.py +184 -0
- teardrop_cli-0.1.0/tests/test_llm_config.py +387 -0
- teardrop_cli-0.1.0/tests/test_marketplace.py +102 -0
- teardrop_cli-0.1.0/tests/test_mcp.py +96 -0
- teardrop_cli-0.1.0/tests/test_models.py +185 -0
- teardrop_cli-0.1.0/tests/test_tools.py +88 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distribution
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.11"
|
|
19
|
+
|
|
20
|
+
- name: Install hatch
|
|
21
|
+
run: pip install hatch
|
|
22
|
+
|
|
23
|
+
- name: Build package
|
|
24
|
+
run: hatch build
|
|
25
|
+
|
|
26
|
+
- name: Store distribution packages
|
|
27
|
+
uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: python-package-distributions
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
name: Publish to PyPI
|
|
34
|
+
needs: build
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment:
|
|
37
|
+
name: pypi
|
|
38
|
+
url: https://pypi.org/p/teardrop-cli
|
|
39
|
+
permissions:
|
|
40
|
+
id-token: write # trusted publisher (OIDC)
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Download distributions
|
|
44
|
+
uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: python-package-distributions
|
|
47
|
+
path: dist/
|
|
48
|
+
|
|
49
|
+
- name: Publish to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["**"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, windows-latest]
|
|
17
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
cache: pip
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: pip install -e ".[dev]"
|
|
30
|
+
|
|
31
|
+
- name: Format
|
|
32
|
+
run: ruff format src/ tests/
|
|
33
|
+
|
|
34
|
+
- name: Lint
|
|
35
|
+
run: ruff check src/ tests/ --fix
|
|
36
|
+
|
|
37
|
+
- name: Test
|
|
38
|
+
run: pytest --tb=short -q
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
# Local Skills (Disable if needed)
|
|
210
|
+
.github/skills/
|
|
211
|
+
prompts/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 teardrop-ai
|
|
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.
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: teardrop-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Command-line interface for the Teardrop AI agent platform
|
|
5
|
+
Project-URL: Homepage, https://github.com/teardrop-ai/teardrop-cli
|
|
6
|
+
Project-URL: Repository, https://github.com/teardrop-ai/teardrop-cli
|
|
7
|
+
Project-URL: Issues, https://github.com/teardrop-ai/teardrop-cli/issues
|
|
8
|
+
Author: teardrop-ai
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 teardrop-ai
|
|
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: agent,ai,cli,crypto,teardrop
|
|
32
|
+
Classifier: Development Status :: 3 - Alpha
|
|
33
|
+
Classifier: Environment :: Console
|
|
34
|
+
Classifier: Intended Audience :: Developers
|
|
35
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
36
|
+
Classifier: Operating System :: OS Independent
|
|
37
|
+
Classifier: Programming Language :: Python :: 3
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
42
|
+
Requires-Python: >=3.11
|
|
43
|
+
Requires-Dist: eth-account>=0.13
|
|
44
|
+
Requires-Dist: keyring>=25.0
|
|
45
|
+
Requires-Dist: platformdirs>=4.0
|
|
46
|
+
Requires-Dist: rich>=13.0
|
|
47
|
+
Requires-Dist: teardrop-sdk>=0.1.3
|
|
48
|
+
Requires-Dist: tomli-w>=1.0
|
|
49
|
+
Requires-Dist: typer>=0.12
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: hatch>=1.12; extra == 'dev'
|
|
52
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
53
|
+
Requires-Dist: pytest-mock>=3.14; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
56
|
+
Description-Content-Type: text/markdown
|
|
57
|
+
|
|
58
|
+
# teardrop-cli
|
|
59
|
+
|
|
60
|
+
Command-line interface for the [Teardrop](https://teardrop.dev) crypto-native AI agent platform. Authenticate, run prompts against agents, manage marketplace earnings, configure MCP servers, and inspect organization tools.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Requirements
|
|
65
|
+
|
|
66
|
+
- Python ≥ 3.11
|
|
67
|
+
- A Teardrop account (email/password, M2M client credentials, Ethereum wallet, or pre-issued JWT)
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install teardrop-cli
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Verify the installation:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
teardrop --version
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Authentication
|
|
86
|
+
|
|
87
|
+
Credentials are resolved in this priority order at runtime:
|
|
88
|
+
|
|
89
|
+
| Priority | Source |
|
|
90
|
+
|----------|--------|
|
|
91
|
+
| 1 | `TEARDROP_TOKEN` env var (static JWT) |
|
|
92
|
+
| 2 | `TEARDROP_EMAIL` + `TEARDROP_SECRET` env vars |
|
|
93
|
+
| 3 | `TEARDROP_CLIENT_ID` + `TEARDROP_CLIENT_SECRET` env vars |
|
|
94
|
+
| 4 | System keyring |
|
|
95
|
+
| 5 | Config file (`~/.config/teardrop/config.toml`) |
|
|
96
|
+
|
|
97
|
+
### Login flows
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Email + password (interactive prompts if flags omitted)
|
|
101
|
+
teardrop auth login --email user@example.com --secret ••••
|
|
102
|
+
|
|
103
|
+
# Machine-to-machine (client credentials)
|
|
104
|
+
teardrop auth login --client-id <id> --client-secret <secret>
|
|
105
|
+
|
|
106
|
+
# Sign-In With Ethereum (EIP-4361)
|
|
107
|
+
# On macOS/Linux:
|
|
108
|
+
export TEARDROP_SIWE_PRIVATE_KEY=0x<private-key>
|
|
109
|
+
# On Windows (PowerShell):
|
|
110
|
+
$env:TEARDROP_SIWE_PRIVATE_KEY = "0x<private-key>"
|
|
111
|
+
# Then:
|
|
112
|
+
teardrop auth login --siwe
|
|
113
|
+
|
|
114
|
+
# Pre-issued JWT
|
|
115
|
+
teardrop auth login --token <jwt>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
teardrop auth whoami # show current identity
|
|
120
|
+
teardrop auth whoami --json # as JSON
|
|
121
|
+
teardrop auth logout # clear all stored credentials
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Override the API endpoint for any command with `--base-url <url>` (hidden flag).
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Billing
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Check account balance
|
|
132
|
+
teardrop billing balance
|
|
133
|
+
teardrop billing balance --json
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Account balance is used to run agents. When it reaches zero, you'll get `PaymentRequiredError` (exit code 2).
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Agent
|
|
141
|
+
|
|
142
|
+
### Run a prompt
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
teardrop agent run "Summarize the latest ETH gas trends"
|
|
146
|
+
|
|
147
|
+
# Continue an existing thread
|
|
148
|
+
teardrop agent run "Follow up on that" --thread-id <id>
|
|
149
|
+
|
|
150
|
+
# Override model
|
|
151
|
+
teardrop agent run "..." --model gpt-4o
|
|
152
|
+
|
|
153
|
+
# Machine-readable: one JSON object per line (SSE event passthrough)
|
|
154
|
+
teardrop agent run "..." --json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Streaming output renders Markdown live in the terminal. Tool calls are shown inline as they execute. A usage summary (input/output tokens + cost) is printed at the end.
|
|
158
|
+
|
|
159
|
+
**Exit codes:**
|
|
160
|
+
|
|
161
|
+
| Code | Meaning |
|
|
162
|
+
|------|---------|
|
|
163
|
+
| 0 | Success |
|
|
164
|
+
| 2 | Insufficient account balance (`PaymentRequiredError`) — use `teardrop billing balance` to check |
|
|
165
|
+
| 3 | Rate limited (`RateLimitError`) |
|
|
166
|
+
| 5 | Agent stream error |
|
|
167
|
+
| 130 | Interrupted (`Ctrl-C`) |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## Marketplace
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Current balance
|
|
175
|
+
teardrop marketplace balance
|
|
176
|
+
teardrop marketplace balance --json
|
|
177
|
+
|
|
178
|
+
# Earnings history
|
|
179
|
+
teardrop marketplace earnings
|
|
180
|
+
teardrop marketplace earnings --limit 50 --cursor <cursor>
|
|
181
|
+
|
|
182
|
+
# Withdraw USDC
|
|
183
|
+
teardrop marketplace withdraw --amount-usdc 100 --payout-address 0x...
|
|
184
|
+
teardrop marketplace withdraw --amount-usdc 100 --payout-address 0x... --yes # skip confirm
|
|
185
|
+
|
|
186
|
+
# Register payout address for marketplace listings
|
|
187
|
+
teardrop marketplace publish --payout-address 0x...
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## MCP Servers
|
|
193
|
+
|
|
194
|
+
Manage Model Context Protocol servers attached to your organization.
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# List registered servers
|
|
198
|
+
teardrop mcp list
|
|
199
|
+
|
|
200
|
+
# Add a server
|
|
201
|
+
teardrop mcp add --name "my-server" --url https://mcp.example.com
|
|
202
|
+
teardrop mcp add --name "secure" --url https://mcp.example.com \
|
|
203
|
+
--auth-type bearer --auth-token <token>
|
|
204
|
+
|
|
205
|
+
# Discover tools exposed by a server
|
|
206
|
+
teardrop mcp discover <server-id>
|
|
207
|
+
|
|
208
|
+
# Remove a server
|
|
209
|
+
teardrop mcp remove <server-id>
|
|
210
|
+
teardrop mcp remove <server-id> --yes # skip confirm
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Tools
|
|
216
|
+
|
|
217
|
+
Inspect and dry-run validate organization tools.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# List all tools
|
|
221
|
+
teardrop tools list
|
|
222
|
+
teardrop tools list --json
|
|
223
|
+
|
|
224
|
+
# Show a tool's schema and optionally validate input
|
|
225
|
+
teardrop tools test <tool-id>
|
|
226
|
+
teardrop tools test <tool-id> --input '{"param": "value"}'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`--input` performs local validation: checks required fields are present and types match the schema before any network call.
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## LLM Configuration
|
|
234
|
+
|
|
235
|
+
Configure organization-level LLM settings, including model selection, routing preference, and bring-your-own-key (BYOK) support.
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Get current config
|
|
239
|
+
teardrop llm-config get org-1
|
|
240
|
+
teardrop llm-config get org-1 --json
|
|
241
|
+
|
|
242
|
+
# Set config with provider and model
|
|
243
|
+
teardrop llm-config set org-1 \
|
|
244
|
+
--provider anthropic \
|
|
245
|
+
--model claude-haiku-4-5-20251001
|
|
246
|
+
|
|
247
|
+
# Set with routing preference
|
|
248
|
+
teardrop llm-config set org-1 \
|
|
249
|
+
--provider anthropic \
|
|
250
|
+
--model claude-haiku-4-5-20251001 \
|
|
251
|
+
--routing cost
|
|
252
|
+
|
|
253
|
+
# Set advanced options
|
|
254
|
+
teardrop llm-config set org-1 \
|
|
255
|
+
--provider openai \
|
|
256
|
+
--model gpt-4o \
|
|
257
|
+
--max-tokens 8000 \
|
|
258
|
+
--temperature 0.7 \
|
|
259
|
+
--timeout-seconds 60
|
|
260
|
+
|
|
261
|
+
# Bring-your-own-key (BYOK)
|
|
262
|
+
teardrop llm-config set org-1 \
|
|
263
|
+
--provider openai \
|
|
264
|
+
--model gpt-4o \
|
|
265
|
+
--byok-key $OPENAI_API_KEY
|
|
266
|
+
|
|
267
|
+
# Read key from stdin (more secure)
|
|
268
|
+
cat $key_file | teardrop llm-config set org-1 \
|
|
269
|
+
--provider openai \
|
|
270
|
+
--model gpt-4o \
|
|
271
|
+
--byok-key -
|
|
272
|
+
|
|
273
|
+
# Self-hosted model
|
|
274
|
+
teardrop llm-config set org-1 \
|
|
275
|
+
--provider openai \
|
|
276
|
+
--model llama2-70b \
|
|
277
|
+
--api-base https://gpu-cluster.internal.example.com:8000/v1 \
|
|
278
|
+
--byok-key $LOCAL_TOKEN
|
|
279
|
+
|
|
280
|
+
# Rotate API key
|
|
281
|
+
teardrop llm-config set org-1 \
|
|
282
|
+
--provider anthropic \
|
|
283
|
+
--model claude-sonnet-4-20250514 \
|
|
284
|
+
--rotate-key
|
|
285
|
+
|
|
286
|
+
# Delete custom config (revert to global defaults)
|
|
287
|
+
teardrop llm-config delete org-1
|
|
288
|
+
teardrop llm-config delete org-1 --yes # skip confirm
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Supported providers:** `anthropic`, `openai`, `google`, `openrouter`
|
|
292
|
+
|
|
293
|
+
**Routing preferences:** `default`, `cost`, `speed`, `quality`
|
|
294
|
+
|
|
295
|
+
**Validation:**
|
|
296
|
+
- Temperature: 0.0–2.0
|
|
297
|
+
- Max tokens: 1–200,000
|
|
298
|
+
- Timeout: ≥ 1 second
|
|
299
|
+
- API key handling: keys sent only over TLS; warnings shown for insecure practices
|
|
300
|
+
|
|
301
|
+
**Caching:**
|
|
302
|
+
- Config is cached locally for 5 minutes; use `--no-cache` to force refresh
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Models & Benchmarks
|
|
307
|
+
|
|
308
|
+
View the model catalogue with performance metrics and discover your organization's actual usage.
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
# Public model benchmarks (no auth required)
|
|
312
|
+
teardrop models benchmarks
|
|
313
|
+
teardrop models benchmarks --json
|
|
314
|
+
|
|
315
|
+
# Organization-scoped metrics (auth required)
|
|
316
|
+
teardrop models benchmarks --org org-1
|
|
317
|
+
teardrop models benchmarks --org org-1 --json
|
|
318
|
+
|
|
319
|
+
# Bypass cache
|
|
320
|
+
teardrop models benchmarks --no-cache
|
|
321
|
+
teardrop models benchmarks --org org-1 --force-refresh
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
The public benchmark table shows:
|
|
325
|
+
- Model identifiers and display names
|
|
326
|
+
- Quality tier (1–3)
|
|
327
|
+
- P95 latency (ms)
|
|
328
|
+
- Pricing (cost per 1k tokens in/out)
|
|
329
|
+
- 7-day usage stats (total runs)
|
|
330
|
+
|
|
331
|
+
Organization-scoped metrics show your org's actual performance:
|
|
332
|
+
- Number of runs
|
|
333
|
+
- Average latency
|
|
334
|
+
- Average cost per run
|
|
335
|
+
- Total cost (7-day sum)
|
|
336
|
+
- Tokens per second
|
|
337
|
+
|
|
338
|
+
**Caching:**
|
|
339
|
+
- Public benchmarks: 10 minutes local cache
|
|
340
|
+
- Organization benchmarks: always fresh (no cache)
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Configuration
|
|
345
|
+
|
|
346
|
+
The config file lives at the platform-appropriate path (e.g., `~/.config/teardrop/config.toml` on Linux/macOS). It is created automatically on first login and restricted to owner-read (`0o600` on POSIX).
|
|
347
|
+
|
|
348
|
+
Sensitive secrets (passwords, tokens) are stored in the **system keyring**; only non-secret fields (email, client_id) are written to the config file.
|
|
349
|
+
|
|
350
|
+
```toml
|
|
351
|
+
# ~/.config/teardrop/config.toml
|
|
352
|
+
base_url = "https://api.teardrop.dev" # optional override
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Development
|
|
358
|
+
|
|
359
|
+
To contribute to `teardrop-cli`, clone the repository and install in editable mode with dev dependencies:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
git clone https://github.com/teardrop-ai/teardrop-cli
|
|
363
|
+
cd teardrop-cli
|
|
364
|
+
pip install -e ".[dev]"
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Run tests:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
pytest
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Lint and format:
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
ruff check src tests
|
|
377
|
+
ruff format src tests
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Testing utilities** in `src/teardrop_cli/_fixtures.py`:
|
|
381
|
+
- `make_jwt_payload(sub, org, role)` — mock JWT payload
|
|
382
|
+
- `make_sse_events(text)` — mock SSE event sequence (text chunk → usage → done)
|
|
383
|
+
|
|
384
|
+
All async tests use `asyncio_mode = "auto"` (configured in `pyproject.toml`).
|