niahere 0.2.11 → 0.2.13
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.
- package/package.json +1 -1
- package/skills/modal-cli/SKILL.md +121 -0
- package/skills/render-cli/SKILL.md +128 -0
package/package.json
CHANGED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: modal-cli
|
|
3
|
+
description: >
|
|
4
|
+
Modal CLI for serverless GPU/cloud compute. Use when user mentions modal, deploying to modal,
|
|
5
|
+
running GPU workloads, or serverless Python functions.
|
|
6
|
+
Check `which modal` first — if missing, offer: `pip install modal && modal setup`.
|
|
7
|
+
Covers run/serve/deploy, apps, containers, secrets, volumes, and workspace management.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before any modal command, verify the CLI is available:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
which modal
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**If not found**, ask the user:
|
|
19
|
+
|
|
20
|
+
> Modal CLI not found. Install it?
|
|
21
|
+
>
|
|
22
|
+
> ```bash
|
|
23
|
+
> pip install modal
|
|
24
|
+
> ```
|
|
25
|
+
|
|
26
|
+
After install, run auth setup:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
modal setup
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This opens a browser for token auth. If `modal` still isn't on PATH after pip install, use:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m modal setup
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**If found but not authed**, check with:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
modal token info
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If that errors, run `modal setup` to authenticate.
|
|
45
|
+
|
|
46
|
+
## Core Commands
|
|
47
|
+
|
|
48
|
+
| Command | Purpose |
|
|
49
|
+
|---------|---------|
|
|
50
|
+
| `modal run <file>` | One-off execution of a script/function |
|
|
51
|
+
| `modal serve <file>` | Local dev with hot-reload |
|
|
52
|
+
| `modal deploy <file>` | Production deployment |
|
|
53
|
+
| `modal app list` | List deployed apps |
|
|
54
|
+
| `modal app logs <name>` | Stream logs for a deployed app |
|
|
55
|
+
| `modal app stop <name>` | Stop a running app |
|
|
56
|
+
| `modal shell` | Interactive shell in Modal environment |
|
|
57
|
+
|
|
58
|
+
## Workflows
|
|
59
|
+
|
|
60
|
+
### First-time setup
|
|
61
|
+
```bash
|
|
62
|
+
pip install modal
|
|
63
|
+
modal setup
|
|
64
|
+
modal run hello.py # validate end-to-end
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Develop and deploy
|
|
68
|
+
```bash
|
|
69
|
+
modal run my_app.py # test locally
|
|
70
|
+
modal serve my_app.py # hot-reload dev
|
|
71
|
+
modal deploy my_app.py # ship it
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Debug containers
|
|
75
|
+
```bash
|
|
76
|
+
modal container list
|
|
77
|
+
modal container logs <id>
|
|
78
|
+
modal container exec <id> -- bash -lc "nvidia-smi"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Manage resources
|
|
82
|
+
```bash
|
|
83
|
+
modal secret create my-secret KEY=value
|
|
84
|
+
modal volume create my-vol
|
|
85
|
+
modal environment create dev
|
|
86
|
+
modal config set-environment dev
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Auth & Profiles
|
|
90
|
+
|
|
91
|
+
- `modal token info` — check current auth
|
|
92
|
+
- `modal token new` — create token via browser
|
|
93
|
+
- `modal token set` — set token credentials directly
|
|
94
|
+
- `modal profile list` / `activate` — switch workspaces
|
|
95
|
+
- `modal config show` — print effective config
|
|
96
|
+
|
|
97
|
+
Environment variables: `MODAL_TOKEN_ID`, `MODAL_TOKEN_SECRET`, `MODAL_ENVIRONMENT`, `MODAL_PROFILE`
|
|
98
|
+
|
|
99
|
+
## Resource Management
|
|
100
|
+
|
|
101
|
+
- **Secrets**: `modal secret list/create/delete` (supports `.env` import)
|
|
102
|
+
- **Volumes**: `modal volume create/list/ls/put/get/rm/delete`
|
|
103
|
+
- **Dicts**: `modal dict create/list/items/get/clear/delete`
|
|
104
|
+
- **Queues**: `modal queue create/list/peek/len/clear/delete`
|
|
105
|
+
- **NFS**: `modal nfs list/create/ls/put/get/rm/delete`
|
|
106
|
+
- **Environments**: `modal environment list/create/delete/update`
|
|
107
|
+
|
|
108
|
+
## Decision Points
|
|
109
|
+
|
|
110
|
+
- User says "deploy to modal" / "run on GPU" → `modal deploy` or `modal run`
|
|
111
|
+
- User says "check my modal apps" → `modal app list`
|
|
112
|
+
- User says "modal logs" → `modal app logs <name>`
|
|
113
|
+
- User needs interactive debug → `modal shell` or `modal container exec`
|
|
114
|
+
- modal not installed → offer install, don't silently fail
|
|
115
|
+
- modal not authed → run `modal setup`
|
|
116
|
+
|
|
117
|
+
## References
|
|
118
|
+
|
|
119
|
+
- Guide: https://modal.com/docs/guide
|
|
120
|
+
- CLI reference: https://modal.com/docs/reference/cli/
|
|
121
|
+
- Status: https://status.modal.com
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: render-cli
|
|
3
|
+
description: >
|
|
4
|
+
Render CLI for deploying and managing services, databases, and blueprints on Render.
|
|
5
|
+
Use when user mentions render, deploying to render, render services, or render databases.
|
|
6
|
+
Check `which render` first — if missing, offer: `brew install render` (macOS) or curl installer.
|
|
7
|
+
Covers deploys, services, SSH, psql, blueprints, and CI workflows.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before any render command, verify the CLI is available:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
which render
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**If not found**, ask the user:
|
|
19
|
+
|
|
20
|
+
> Render CLI not found. Install it?
|
|
21
|
+
>
|
|
22
|
+
> macOS:
|
|
23
|
+
> ```bash
|
|
24
|
+
> brew install render
|
|
25
|
+
> ```
|
|
26
|
+
>
|
|
27
|
+
> Linux/macOS (alternative):
|
|
28
|
+
> ```bash
|
|
29
|
+
> curl -fsSL https://raw.githubusercontent.com/render-oss/cli/refs/heads/main/bin/install.sh | sh
|
|
30
|
+
> ```
|
|
31
|
+
|
|
32
|
+
After install, authenticate:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
render login
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then set the active workspace:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
render workspace set
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**If found but not authed**, `render services` will fail — run `render login`.
|
|
45
|
+
|
|
46
|
+
## Core Commands
|
|
47
|
+
|
|
48
|
+
| Command | Purpose |
|
|
49
|
+
|---------|---------|
|
|
50
|
+
| `render services` | List services and datastores |
|
|
51
|
+
| `render deploys create <id>` | Trigger a deploy |
|
|
52
|
+
| `render deploys list <id>` | Deploy history |
|
|
53
|
+
| `render ssh <id>` | SSH into a service |
|
|
54
|
+
| `render psql <id>` | Postgres session |
|
|
55
|
+
| `render blueprints validate` | Validate render.yaml |
|
|
56
|
+
| `render workspaces` | List workspaces |
|
|
57
|
+
|
|
58
|
+
## Workflows
|
|
59
|
+
|
|
60
|
+
### First-time setup
|
|
61
|
+
```bash
|
|
62
|
+
brew install render # or curl installer
|
|
63
|
+
render login
|
|
64
|
+
render workspace set
|
|
65
|
+
render services # verify access
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Deploy a service
|
|
69
|
+
```bash
|
|
70
|
+
render services # pick service
|
|
71
|
+
render deploys create <SERVICE_ID> # trigger deploy
|
|
72
|
+
render deploys create <ID> --wait # block until done
|
|
73
|
+
render deploys create <ID> --commit <SHA> # specific commit
|
|
74
|
+
render deploys create <ID> --image <URL> # docker image
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Database access
|
|
78
|
+
```bash
|
|
79
|
+
render psql <DATABASE_ID> # interactive session
|
|
80
|
+
render psql <DATABASE_ID> -c "SELECT 1" # one-shot query
|
|
81
|
+
render psql <DATABASE_ID> -o json # JSON output
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Debug a service
|
|
85
|
+
```bash
|
|
86
|
+
render ssh <SERVICE_ID> # interactive shell
|
|
87
|
+
render ssh <SERVICE_ID> --ephemeral # throwaway shell
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Validate blueprints
|
|
91
|
+
```bash
|
|
92
|
+
render blueprints validate # defaults to ./render.yaml
|
|
93
|
+
render blueprints validate my-render.yaml
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## CI / Non-Interactive Mode
|
|
97
|
+
|
|
98
|
+
Use `RENDER_API_KEY` (not login tokens) for automation:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
RENDER_API_KEY=$RENDER_API_KEY render deploys create "$SERVICE_ID" --output json --confirm
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- `--confirm` skips prompts
|
|
105
|
+
- `--output` / `-o`: `json`, `yaml`, `text`, `interactive`
|
|
106
|
+
- `RENDER_OUTPUT` env var sets default output format
|
|
107
|
+
|
|
108
|
+
## Config
|
|
109
|
+
|
|
110
|
+
- Config path: `~/.render/cli.yaml`
|
|
111
|
+
- Override: `RENDER_CLI_CONFIG_PATH` env var
|
|
112
|
+
- Re-auth: `render login` if token expires
|
|
113
|
+
|
|
114
|
+
## Decision Points
|
|
115
|
+
|
|
116
|
+
- User says "deploy to render" → `render deploys create`
|
|
117
|
+
- User says "check render services" → `render services`
|
|
118
|
+
- User needs DB access → `render psql`
|
|
119
|
+
- User needs shell access → `render ssh`
|
|
120
|
+
- User has render.yaml → `render blueprints validate`
|
|
121
|
+
- render not installed → offer install, don't silently fail
|
|
122
|
+
- render not authed → run `render login`
|
|
123
|
+
|
|
124
|
+
## References
|
|
125
|
+
|
|
126
|
+
- Docs: https://render.com/docs/cli
|
|
127
|
+
- Releases: https://github.com/render-oss/cli/releases
|
|
128
|
+
- Source: https://github.com/render-oss/cli
|