stimulir 0.1.164__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.
- stimulir-0.1.164/PKG-INFO +195 -0
- stimulir-0.1.164/README.md +171 -0
- stimulir-0.1.164/pyproject.toml +39 -0
- stimulir-0.1.164/setup.cfg +4 -0
- stimulir-0.1.164/stimulir.egg-info/PKG-INFO +195 -0
- stimulir-0.1.164/stimulir.egg-info/SOURCES.txt +23 -0
- stimulir-0.1.164/stimulir.egg-info/dependency_links.txt +1 -0
- stimulir-0.1.164/stimulir.egg-info/entry_points.txt +2 -0
- stimulir-0.1.164/stimulir.egg-info/requires.txt +3 -0
- stimulir-0.1.164/stimulir.egg-info/top_level.txt +1 -0
- stimulir-0.1.164/stimulir_cli/__init__.py +3 -0
- stimulir-0.1.164/stimulir_cli/auth.py +221 -0
- stimulir-0.1.164/stimulir_cli/commands/__init__.py +1 -0
- stimulir-0.1.164/stimulir_cli/commands/byok.py +129 -0
- stimulir-0.1.164/stimulir_cli/commands/compute.py +207 -0
- stimulir-0.1.164/stimulir_cli/commands/infer.py +122 -0
- stimulir-0.1.164/stimulir_cli/commands/keys.py +114 -0
- stimulir-0.1.164/stimulir_cli/commands/lab.py +545 -0
- stimulir-0.1.164/stimulir_cli/commands/models.py +37 -0
- stimulir-0.1.164/stimulir_cli/commands/usage.py +105 -0
- stimulir-0.1.164/stimulir_cli/commands/workspace.py +45 -0
- stimulir-0.1.164/stimulir_cli/config.py +147 -0
- stimulir-0.1.164/stimulir_cli/http.py +146 -0
- stimulir-0.1.164/stimulir_cli/main.py +90 -0
- stimulir-0.1.164/stimulir_cli/render.py +96 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stimulir
|
|
3
|
+
Version: 0.1.164
|
|
4
|
+
Summary: Stimulir Console CLI — workspaces, API keys, BYOK, usage, inference, lab and compute.
|
|
5
|
+
License: Proprietary
|
|
6
|
+
Project-URL: Homepage, https://www.stimulir.com
|
|
7
|
+
Project-URL: Documentation, https://www.stimulir.com/docs/cli/installation
|
|
8
|
+
Project-URL: Changelog, https://github.com/stimulir/stimulir-console/releases
|
|
9
|
+
Keywords: stimulir,hybrie,inference,lora,peft,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: typer>=0.12
|
|
22
|
+
Requires-Dist: rich>=13.7
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
|
|
25
|
+
# stimulir CLI
|
|
26
|
+
|
|
27
|
+
Command-line interface for the Stimulir Console platform — workspaces, API
|
|
28
|
+
keys, BYOK credentials, usage/billing, inference, and HybrIE lab/compute.
|
|
29
|
+
|
|
30
|
+
Built with Python 3.11+, [Typer](https://typer.tiangolo.com),
|
|
31
|
+
[Rich](https://rich.readthedocs.io), and [httpx](https://www.python-httpx.org).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Once published to PyPI:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install stimulir
|
|
39
|
+
stimulir --help
|
|
40
|
+
# or run without installing:
|
|
41
|
+
uvx stimulir --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
From this repo (development):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv tool install ./cli # isolated tool from the local source
|
|
48
|
+
# or, for live-editing development:
|
|
49
|
+
cd cli && uv venv && uv pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
> **Conda/miniconda note:** if you use plain `pip install -e` instead of uv, Anaconda
|
|
53
|
+
> Python builds skip the `__editable__.*.pth` hook, so the editable install silently
|
|
54
|
+
> fails to import (`ModuleNotFoundError: stimulir_cli`). uv avoids this entirely.
|
|
55
|
+
|
|
56
|
+
## Login
|
|
57
|
+
|
|
58
|
+
Log in with your Stimulir account — auth defaults are baked in, nothing to
|
|
59
|
+
configure:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
stimulir login
|
|
63
|
+
# prompts for email + password, stores tokens in ~/.stimulir/credentials.json (0600)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
(Non-production environments can override the auth endpoint via
|
|
67
|
+
`SUPABASE_URL` / `SUPABASE_ANON_KEY` env vars or `~/.stimulir/config.json`.)
|
|
68
|
+
|
|
69
|
+
Already have a JWT from the console web app? Paste it:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
stimulir login --token <supabase-jwt>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Sessions auto-refresh using the stored refresh token. Inspect or end your
|
|
76
|
+
session with:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
stimulir whoami
|
|
80
|
+
stimulir logout
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Select a workspace
|
|
84
|
+
|
|
85
|
+
Most commands are scoped to a workspace (business profile):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
stimulir workspace list
|
|
89
|
+
stimulir workspace use <workspace-id>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Commands
|
|
93
|
+
|
|
94
|
+
### API keys (`hyb_*` inference keys)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
stimulir keys create --name cli --env prod --expires-in-days 90 --save
|
|
98
|
+
stimulir keys list --include-revoked
|
|
99
|
+
stimulir keys revoke <key-id>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The plaintext key is shown exactly once; `--save` stores it in
|
|
103
|
+
`~/.stimulir/credentials.json` so `stimulir infer` can use it.
|
|
104
|
+
|
|
105
|
+
### BYOK provider credentials
|
|
106
|
+
|
|
107
|
+
Providers: `openai`, `anthropic`, `google_gemini`, `mistral`, `aws_bedrock`,
|
|
108
|
+
`azure_openai`, `together_ai`, `nebius`.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
stimulir byok add --provider anthropic --label "prod key" # secret prompted without echo
|
|
112
|
+
stimulir byok list
|
|
113
|
+
stimulir byok verify <credential-id>
|
|
114
|
+
stimulir byok remove <credential-id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Usage & billing
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
stimulir usage --window 30d --group-by model
|
|
121
|
+
stimulir billing snapshot
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Inference
|
|
125
|
+
|
|
126
|
+
Uses a `hyb_*` API key (`stimulir keys create --save` or `STIMULIR_API_KEY`):
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
stimulir infer chat "Summarise IFRS 16 in one paragraph" --model hybrie-mid
|
|
130
|
+
stimulir infer chat "Write a haiku about ledgers" --model hybrie-small --stream
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### HybrIE lab (training + eval)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
stimulir lab train sft --family qwen3-4b --lora-rank 8 --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/sft
|
|
137
|
+
stimulir lab train d2l --family qwen3-4b --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/d2l
|
|
138
|
+
stimulir lab train rl --family qwen3-4b --environment niah --prompts 64 --group-size 8 --policy hypernet --lr 1e-5 --kl-beta 0.05
|
|
139
|
+
stimulir lab jobs list
|
|
140
|
+
stimulir lab jobs get <job-id>
|
|
141
|
+
stimulir lab jobs cancel <job-id>
|
|
142
|
+
stimulir lab eval niah --family qwen3-4b --checkpoint-dir ~/hybrie-mounts/d2l-artifacts/<job>/checkpoint --examples 200 --seed 42
|
|
143
|
+
stimulir lab eval adapter --family qwen3-4b --adapter-dir ~/adapters/invoices-lora --examples 200 --seed 42
|
|
144
|
+
stimulir lab eval rl --family qwen3-4b --environment niah --policy hypernet --checkpoint-dir runs/rl/<job> --tasks 50 --pass-threshold 0.8
|
|
145
|
+
stimulir lab adapters list
|
|
146
|
+
stimulir lab adapters get <adapter-id>
|
|
147
|
+
stimulir lab adapters load <adapter-id>
|
|
148
|
+
stimulir lab adapters unload <adapter-id>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Compute (GPU offers + instances + peers)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
stimulir compute offers
|
|
155
|
+
stimulir compute up <offer-id> --count 2
|
|
156
|
+
stimulir compute list
|
|
157
|
+
stimulir compute status <instance-id>
|
|
158
|
+
stimulir compute down <instance-id>
|
|
159
|
+
stimulir compute peers list
|
|
160
|
+
stimulir compute peers add --name lambda-a100 --grpc http://10.0.0.5:9090 --realtime http://10.0.0.5:8011
|
|
161
|
+
stimulir compute peers remove <peer-id>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Models
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
stimulir models
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## HybrIE routing
|
|
171
|
+
|
|
172
|
+
`lab`, `compute`, and `models` go through the console proxy
|
|
173
|
+
(`{api_base}/api/v1/hybrie/*`, Supabase JWT + workspace header) by default.
|
|
174
|
+
To talk to a HybrIE runtime directly, pass `--endpoint http://host:port` on
|
|
175
|
+
any of those commands, or persist it in `~/.stimulir/config.json` as
|
|
176
|
+
`hybrie_endpoint` — requests then hit `{endpoint}/v1/*`.
|
|
177
|
+
|
|
178
|
+
## Scripting
|
|
179
|
+
|
|
180
|
+
Every command accepts `--json` to emit the raw API response:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
stimulir keys list --json | jq '.api_keys[].prefix'
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Configuration reference
|
|
187
|
+
|
|
188
|
+
| File | Contents |
|
|
189
|
+
| --- | --- |
|
|
190
|
+
| `~/.stimulir/config.json` | `api_base`, `workspace_id`, `hybrie_endpoint`, `supabase_url`, `supabase_anon_key` |
|
|
191
|
+
| `~/.stimulir/credentials.json` (0600) | `access_token`, `refresh_token`, `expires_at`, `email`, optional `api_key` |
|
|
192
|
+
|
|
193
|
+
Environment overrides: `STIMULIR_API_BASE`, `STIMULIR_WORKSPACE_ID`,
|
|
194
|
+
`STIMULIR_ACCESS_TOKEN`, `STIMULIR_API_KEY`, `SUPABASE_URL`,
|
|
195
|
+
`SUPABASE_ANON_KEY`.
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# stimulir CLI
|
|
2
|
+
|
|
3
|
+
Command-line interface for the Stimulir Console platform — workspaces, API
|
|
4
|
+
keys, BYOK credentials, usage/billing, inference, and HybrIE lab/compute.
|
|
5
|
+
|
|
6
|
+
Built with Python 3.11+, [Typer](https://typer.tiangolo.com),
|
|
7
|
+
[Rich](https://rich.readthedocs.io), and [httpx](https://www.python-httpx.org).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Once published to PyPI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv tool install stimulir
|
|
15
|
+
stimulir --help
|
|
16
|
+
# or run without installing:
|
|
17
|
+
uvx stimulir --help
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
From this repo (development):
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
uv tool install ./cli # isolated tool from the local source
|
|
24
|
+
# or, for live-editing development:
|
|
25
|
+
cd cli && uv venv && uv pip install -e .
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> **Conda/miniconda note:** if you use plain `pip install -e` instead of uv, Anaconda
|
|
29
|
+
> Python builds skip the `__editable__.*.pth` hook, so the editable install silently
|
|
30
|
+
> fails to import (`ModuleNotFoundError: stimulir_cli`). uv avoids this entirely.
|
|
31
|
+
|
|
32
|
+
## Login
|
|
33
|
+
|
|
34
|
+
Log in with your Stimulir account — auth defaults are baked in, nothing to
|
|
35
|
+
configure:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
stimulir login
|
|
39
|
+
# prompts for email + password, stores tokens in ~/.stimulir/credentials.json (0600)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
(Non-production environments can override the auth endpoint via
|
|
43
|
+
`SUPABASE_URL` / `SUPABASE_ANON_KEY` env vars or `~/.stimulir/config.json`.)
|
|
44
|
+
|
|
45
|
+
Already have a JWT from the console web app? Paste it:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
stimulir login --token <supabase-jwt>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Sessions auto-refresh using the stored refresh token. Inspect or end your
|
|
52
|
+
session with:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
stimulir whoami
|
|
56
|
+
stimulir logout
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Select a workspace
|
|
60
|
+
|
|
61
|
+
Most commands are scoped to a workspace (business profile):
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
stimulir workspace list
|
|
65
|
+
stimulir workspace use <workspace-id>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Commands
|
|
69
|
+
|
|
70
|
+
### API keys (`hyb_*` inference keys)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
stimulir keys create --name cli --env prod --expires-in-days 90 --save
|
|
74
|
+
stimulir keys list --include-revoked
|
|
75
|
+
stimulir keys revoke <key-id>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The plaintext key is shown exactly once; `--save` stores it in
|
|
79
|
+
`~/.stimulir/credentials.json` so `stimulir infer` can use it.
|
|
80
|
+
|
|
81
|
+
### BYOK provider credentials
|
|
82
|
+
|
|
83
|
+
Providers: `openai`, `anthropic`, `google_gemini`, `mistral`, `aws_bedrock`,
|
|
84
|
+
`azure_openai`, `together_ai`, `nebius`.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
stimulir byok add --provider anthropic --label "prod key" # secret prompted without echo
|
|
88
|
+
stimulir byok list
|
|
89
|
+
stimulir byok verify <credential-id>
|
|
90
|
+
stimulir byok remove <credential-id>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Usage & billing
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
stimulir usage --window 30d --group-by model
|
|
97
|
+
stimulir billing snapshot
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Inference
|
|
101
|
+
|
|
102
|
+
Uses a `hyb_*` API key (`stimulir keys create --save` or `STIMULIR_API_KEY`):
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
stimulir infer chat "Summarise IFRS 16 in one paragraph" --model hybrie-mid
|
|
106
|
+
stimulir infer chat "Write a haiku about ledgers" --model hybrie-small --stream
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### HybrIE lab (training + eval)
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
stimulir lab train sft --family qwen3-4b --lora-rank 8 --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/sft
|
|
113
|
+
stimulir lab train d2l --family qwen3-4b --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/d2l
|
|
114
|
+
stimulir lab train rl --family qwen3-4b --environment niah --prompts 64 --group-size 8 --policy hypernet --lr 1e-5 --kl-beta 0.05
|
|
115
|
+
stimulir lab jobs list
|
|
116
|
+
stimulir lab jobs get <job-id>
|
|
117
|
+
stimulir lab jobs cancel <job-id>
|
|
118
|
+
stimulir lab eval niah --family qwen3-4b --checkpoint-dir ~/hybrie-mounts/d2l-artifacts/<job>/checkpoint --examples 200 --seed 42
|
|
119
|
+
stimulir lab eval adapter --family qwen3-4b --adapter-dir ~/adapters/invoices-lora --examples 200 --seed 42
|
|
120
|
+
stimulir lab eval rl --family qwen3-4b --environment niah --policy hypernet --checkpoint-dir runs/rl/<job> --tasks 50 --pass-threshold 0.8
|
|
121
|
+
stimulir lab adapters list
|
|
122
|
+
stimulir lab adapters get <adapter-id>
|
|
123
|
+
stimulir lab adapters load <adapter-id>
|
|
124
|
+
stimulir lab adapters unload <adapter-id>
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Compute (GPU offers + instances + peers)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
stimulir compute offers
|
|
131
|
+
stimulir compute up <offer-id> --count 2
|
|
132
|
+
stimulir compute list
|
|
133
|
+
stimulir compute status <instance-id>
|
|
134
|
+
stimulir compute down <instance-id>
|
|
135
|
+
stimulir compute peers list
|
|
136
|
+
stimulir compute peers add --name lambda-a100 --grpc http://10.0.0.5:9090 --realtime http://10.0.0.5:8011
|
|
137
|
+
stimulir compute peers remove <peer-id>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Models
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
stimulir models
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## HybrIE routing
|
|
147
|
+
|
|
148
|
+
`lab`, `compute`, and `models` go through the console proxy
|
|
149
|
+
(`{api_base}/api/v1/hybrie/*`, Supabase JWT + workspace header) by default.
|
|
150
|
+
To talk to a HybrIE runtime directly, pass `--endpoint http://host:port` on
|
|
151
|
+
any of those commands, or persist it in `~/.stimulir/config.json` as
|
|
152
|
+
`hybrie_endpoint` — requests then hit `{endpoint}/v1/*`.
|
|
153
|
+
|
|
154
|
+
## Scripting
|
|
155
|
+
|
|
156
|
+
Every command accepts `--json` to emit the raw API response:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
stimulir keys list --json | jq '.api_keys[].prefix'
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Configuration reference
|
|
163
|
+
|
|
164
|
+
| File | Contents |
|
|
165
|
+
| --- | --- |
|
|
166
|
+
| `~/.stimulir/config.json` | `api_base`, `workspace_id`, `hybrie_endpoint`, `supabase_url`, `supabase_anon_key` |
|
|
167
|
+
| `~/.stimulir/credentials.json` (0600) | `access_token`, `refresh_token`, `expires_at`, `email`, optional `api_key` |
|
|
168
|
+
|
|
169
|
+
Environment overrides: `STIMULIR_API_BASE`, `STIMULIR_WORKSPACE_ID`,
|
|
170
|
+
`STIMULIR_ACCESS_TOKEN`, `STIMULIR_API_KEY`, `SUPABASE_URL`,
|
|
171
|
+
`SUPABASE_ANON_KEY`.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "stimulir"
|
|
7
|
+
version = "0.1.164"
|
|
8
|
+
description = "Stimulir Console CLI — workspaces, API keys, BYOK, usage, inference, lab and compute."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "Proprietary" }
|
|
12
|
+
keywords = ["stimulir", "hybrie", "inference", "lora", "peft", "cli"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: Other/Proprietary License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"typer>=0.12",
|
|
26
|
+
"rich>=13.7",
|
|
27
|
+
"httpx>=0.27",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://www.stimulir.com"
|
|
32
|
+
Documentation = "https://www.stimulir.com/docs/cli/installation"
|
|
33
|
+
Changelog = "https://github.com/stimulir/stimulir-console/releases"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
stimulir = "stimulir_cli.main:app"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
include = ["stimulir_cli*"]
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: stimulir
|
|
3
|
+
Version: 0.1.164
|
|
4
|
+
Summary: Stimulir Console CLI — workspaces, API keys, BYOK, usage, inference, lab and compute.
|
|
5
|
+
License: Proprietary
|
|
6
|
+
Project-URL: Homepage, https://www.stimulir.com
|
|
7
|
+
Project-URL: Documentation, https://www.stimulir.com/docs/cli/installation
|
|
8
|
+
Project-URL: Changelog, https://github.com/stimulir/stimulir-console/releases
|
|
9
|
+
Keywords: stimulir,hybrie,inference,lora,peft,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: Other/Proprietary License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Requires-Dist: typer>=0.12
|
|
22
|
+
Requires-Dist: rich>=13.7
|
|
23
|
+
Requires-Dist: httpx>=0.27
|
|
24
|
+
|
|
25
|
+
# stimulir CLI
|
|
26
|
+
|
|
27
|
+
Command-line interface for the Stimulir Console platform — workspaces, API
|
|
28
|
+
keys, BYOK credentials, usage/billing, inference, and HybrIE lab/compute.
|
|
29
|
+
|
|
30
|
+
Built with Python 3.11+, [Typer](https://typer.tiangolo.com),
|
|
31
|
+
[Rich](https://rich.readthedocs.io), and [httpx](https://www.python-httpx.org).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Once published to PyPI:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install stimulir
|
|
39
|
+
stimulir --help
|
|
40
|
+
# or run without installing:
|
|
41
|
+
uvx stimulir --help
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
From this repo (development):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv tool install ./cli # isolated tool from the local source
|
|
48
|
+
# or, for live-editing development:
|
|
49
|
+
cd cli && uv venv && uv pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
> **Conda/miniconda note:** if you use plain `pip install -e` instead of uv, Anaconda
|
|
53
|
+
> Python builds skip the `__editable__.*.pth` hook, so the editable install silently
|
|
54
|
+
> fails to import (`ModuleNotFoundError: stimulir_cli`). uv avoids this entirely.
|
|
55
|
+
|
|
56
|
+
## Login
|
|
57
|
+
|
|
58
|
+
Log in with your Stimulir account — auth defaults are baked in, nothing to
|
|
59
|
+
configure:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
stimulir login
|
|
63
|
+
# prompts for email + password, stores tokens in ~/.stimulir/credentials.json (0600)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
(Non-production environments can override the auth endpoint via
|
|
67
|
+
`SUPABASE_URL` / `SUPABASE_ANON_KEY` env vars or `~/.stimulir/config.json`.)
|
|
68
|
+
|
|
69
|
+
Already have a JWT from the console web app? Paste it:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
stimulir login --token <supabase-jwt>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Sessions auto-refresh using the stored refresh token. Inspect or end your
|
|
76
|
+
session with:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
stimulir whoami
|
|
80
|
+
stimulir logout
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Select a workspace
|
|
84
|
+
|
|
85
|
+
Most commands are scoped to a workspace (business profile):
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
stimulir workspace list
|
|
89
|
+
stimulir workspace use <workspace-id>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Commands
|
|
93
|
+
|
|
94
|
+
### API keys (`hyb_*` inference keys)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
stimulir keys create --name cli --env prod --expires-in-days 90 --save
|
|
98
|
+
stimulir keys list --include-revoked
|
|
99
|
+
stimulir keys revoke <key-id>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The plaintext key is shown exactly once; `--save` stores it in
|
|
103
|
+
`~/.stimulir/credentials.json` so `stimulir infer` can use it.
|
|
104
|
+
|
|
105
|
+
### BYOK provider credentials
|
|
106
|
+
|
|
107
|
+
Providers: `openai`, `anthropic`, `google_gemini`, `mistral`, `aws_bedrock`,
|
|
108
|
+
`azure_openai`, `together_ai`, `nebius`.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
stimulir byok add --provider anthropic --label "prod key" # secret prompted without echo
|
|
112
|
+
stimulir byok list
|
|
113
|
+
stimulir byok verify <credential-id>
|
|
114
|
+
stimulir byok remove <credential-id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Usage & billing
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
stimulir usage --window 30d --group-by model
|
|
121
|
+
stimulir billing snapshot
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Inference
|
|
125
|
+
|
|
126
|
+
Uses a `hyb_*` API key (`stimulir keys create --save` or `STIMULIR_API_KEY`):
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
stimulir infer chat "Summarise IFRS 16 in one paragraph" --model hybrie-mid
|
|
130
|
+
stimulir infer chat "Write a haiku about ledgers" --model hybrie-small --stream
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### HybrIE lab (training + eval)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
stimulir lab train sft --family qwen3-4b --lora-rank 8 --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/sft
|
|
137
|
+
stimulir lab train d2l --family qwen3-4b --examples 500 --epochs 3 --lr 1e-4 --eval-examples 200 --seed 42 --checkpoint-dir runs/d2l
|
|
138
|
+
stimulir lab train rl --family qwen3-4b --environment niah --prompts 64 --group-size 8 --policy hypernet --lr 1e-5 --kl-beta 0.05
|
|
139
|
+
stimulir lab jobs list
|
|
140
|
+
stimulir lab jobs get <job-id>
|
|
141
|
+
stimulir lab jobs cancel <job-id>
|
|
142
|
+
stimulir lab eval niah --family qwen3-4b --checkpoint-dir ~/hybrie-mounts/d2l-artifacts/<job>/checkpoint --examples 200 --seed 42
|
|
143
|
+
stimulir lab eval adapter --family qwen3-4b --adapter-dir ~/adapters/invoices-lora --examples 200 --seed 42
|
|
144
|
+
stimulir lab eval rl --family qwen3-4b --environment niah --policy hypernet --checkpoint-dir runs/rl/<job> --tasks 50 --pass-threshold 0.8
|
|
145
|
+
stimulir lab adapters list
|
|
146
|
+
stimulir lab adapters get <adapter-id>
|
|
147
|
+
stimulir lab adapters load <adapter-id>
|
|
148
|
+
stimulir lab adapters unload <adapter-id>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Compute (GPU offers + instances + peers)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
stimulir compute offers
|
|
155
|
+
stimulir compute up <offer-id> --count 2
|
|
156
|
+
stimulir compute list
|
|
157
|
+
stimulir compute status <instance-id>
|
|
158
|
+
stimulir compute down <instance-id>
|
|
159
|
+
stimulir compute peers list
|
|
160
|
+
stimulir compute peers add --name lambda-a100 --grpc http://10.0.0.5:9090 --realtime http://10.0.0.5:8011
|
|
161
|
+
stimulir compute peers remove <peer-id>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Models
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
stimulir models
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## HybrIE routing
|
|
171
|
+
|
|
172
|
+
`lab`, `compute`, and `models` go through the console proxy
|
|
173
|
+
(`{api_base}/api/v1/hybrie/*`, Supabase JWT + workspace header) by default.
|
|
174
|
+
To talk to a HybrIE runtime directly, pass `--endpoint http://host:port` on
|
|
175
|
+
any of those commands, or persist it in `~/.stimulir/config.json` as
|
|
176
|
+
`hybrie_endpoint` — requests then hit `{endpoint}/v1/*`.
|
|
177
|
+
|
|
178
|
+
## Scripting
|
|
179
|
+
|
|
180
|
+
Every command accepts `--json` to emit the raw API response:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
stimulir keys list --json | jq '.api_keys[].prefix'
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Configuration reference
|
|
187
|
+
|
|
188
|
+
| File | Contents |
|
|
189
|
+
| --- | --- |
|
|
190
|
+
| `~/.stimulir/config.json` | `api_base`, `workspace_id`, `hybrie_endpoint`, `supabase_url`, `supabase_anon_key` |
|
|
191
|
+
| `~/.stimulir/credentials.json` (0600) | `access_token`, `refresh_token`, `expires_at`, `email`, optional `api_key` |
|
|
192
|
+
|
|
193
|
+
Environment overrides: `STIMULIR_API_BASE`, `STIMULIR_WORKSPACE_ID`,
|
|
194
|
+
`STIMULIR_ACCESS_TOKEN`, `STIMULIR_API_KEY`, `SUPABASE_URL`,
|
|
195
|
+
`SUPABASE_ANON_KEY`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
stimulir.egg-info/PKG-INFO
|
|
4
|
+
stimulir.egg-info/SOURCES.txt
|
|
5
|
+
stimulir.egg-info/dependency_links.txt
|
|
6
|
+
stimulir.egg-info/entry_points.txt
|
|
7
|
+
stimulir.egg-info/requires.txt
|
|
8
|
+
stimulir.egg-info/top_level.txt
|
|
9
|
+
stimulir_cli/__init__.py
|
|
10
|
+
stimulir_cli/auth.py
|
|
11
|
+
stimulir_cli/config.py
|
|
12
|
+
stimulir_cli/http.py
|
|
13
|
+
stimulir_cli/main.py
|
|
14
|
+
stimulir_cli/render.py
|
|
15
|
+
stimulir_cli/commands/__init__.py
|
|
16
|
+
stimulir_cli/commands/byok.py
|
|
17
|
+
stimulir_cli/commands/compute.py
|
|
18
|
+
stimulir_cli/commands/infer.py
|
|
19
|
+
stimulir_cli/commands/keys.py
|
|
20
|
+
stimulir_cli/commands/lab.py
|
|
21
|
+
stimulir_cli/commands/models.py
|
|
22
|
+
stimulir_cli/commands/usage.py
|
|
23
|
+
stimulir_cli/commands/workspace.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
stimulir_cli
|