sagex-cli 1.1.0__tar.gz → 2.0.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.
- {sagex_cli-1.1.0/sagex_cli.egg-info → sagex_cli-2.0.0}/PKG-INFO +45 -14
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/README.md +43 -13
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/pyproject.toml +1 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/__init__.py +1 -1
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/__main__.py +325 -14
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/api/client.py +4 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/api/resources.py +93 -0
- sagex_cli-2.0.0/sagex/app.py +1030 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/app.tcss +6 -1
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/config.py +52 -2
- sagex_cli-2.0.0/sagex/local_tools.py +435 -0
- sagex_cli-2.0.0/sagex/models.py +69 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/pusher.py +38 -18
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/render.py +41 -0
- sagex_cli-2.0.0/sagex/sage.py +246 -0
- sagex_cli-2.0.0/sagex/sage_text.py +252 -0
- sagex_cli-2.0.0/sagex/sage_tools.py +517 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/shell.py +8 -4
- sagex_cli-2.0.0/sagex/usage.py +147 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/widgets/message.py +27 -6
- sagex_cli-2.0.0/sagex/widgets/tool_card.py +278 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0/sagex_cli.egg-info}/PKG-INFO +45 -14
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex_cli.egg-info/SOURCES.txt +16 -1
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex_cli.egg-info/requires.txt +1 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/tests/test_cli.py +1 -1
- sagex_cli-2.0.0/tests/test_local_tools.py +240 -0
- sagex_cli-2.0.0/tests/test_models.py +205 -0
- sagex_cli-2.0.0/tests/test_pusher.py +90 -0
- sagex_cli-2.0.0/tests/test_sage.py +284 -0
- sagex_cli-2.0.0/tests/test_sage_text.py +135 -0
- sagex_cli-2.0.0/tests/test_sage_tools.py +227 -0
- sagex_cli-2.0.0/tests/test_tool_card.py +45 -0
- sagex_cli-2.0.0/tests/test_tui.py +792 -0
- sagex_cli-2.0.0/tests/test_usage.py +74 -0
- sagex_cli-1.1.0/sagex/app.py +0 -379
- sagex_cli-1.1.0/tests/test_tui.py +0 -26
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/LICENSE +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/_env.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/api/__init__.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/api/auth.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/api/store.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/copier.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/device.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/formatting.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/runner.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/runview.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/widgets/__init__.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/widgets/activity.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/widgets/prompt_input.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex/widgets/run_graph.py +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex_cli.egg-info/dependency_links.txt +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex_cli.egg-info/entry_points.txt +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/sagex_cli.egg-info/top_level.txt +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/setup.cfg +0 -0
- {sagex_cli-1.1.0 → sagex_cli-2.0.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sagex-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Autosage in your terminal: build, run and watch workflows, scripts, vaults and triggers from a TUI or one-shot commands.
|
|
5
5
|
Author: Lagnajit Moharana
|
|
6
6
|
License-Expression: MIT
|
|
@@ -31,6 +31,7 @@ Requires-Dist: httpx<0.29,>=0.28.1
|
|
|
31
31
|
Requires-Dist: keyring<26,>=25.7.0
|
|
32
32
|
Requires-Dist: typer<0.28,>=0.27.2
|
|
33
33
|
Requires-Dist: cron-descriptor<3,>=2.1.0
|
|
34
|
+
Requires-Dist: websockets<17,>=14
|
|
34
35
|
Provides-Extra: dev
|
|
35
36
|
Requires-Dist: textual-dev==1.8.0; extra == "dev"
|
|
36
37
|
Requires-Dist: pytest>=8; extra == "dev"
|
|
@@ -38,7 +39,7 @@ Dynamic: license-file
|
|
|
38
39
|
|
|
39
40
|
# sagex
|
|
40
41
|
|
|
41
|
-
**Autosage in your terminal.** Build, run and watch your [Autosage](https://autosagex.web.app) workflows, scripts, vaults and triggers from a full-screen terminal app or one-shot commands. Everything the web app does, minus the mouse.
|
|
42
|
+
**Autosage in your terminal.** Build, run and watch your [Autosage](https://autosagex.web.app) workflows, scripts, vaults and triggers from a full-screen terminal app or one-shot commands. Everything the web app does, minus the mouse, plus **Sage**: an assistant that looks things up, writes and pushes scripts, runs workflows and fixes what failed, asking you before it changes anything.
|
|
42
43
|
|
|
43
44
|
[](https://pypi.org/project/sagex-cli/)
|
|
44
45
|
[](https://pypi.org/project/sagex-cli/)
|
|
@@ -70,7 +71,7 @@ curl -LsSf https://raw.githubusercontent.com/Lagnajit09/sagex/main/scripts/insta
|
|
|
70
71
|
irm https://raw.githubusercontent.com/Lagnajit09/sagex/main/scripts/install.ps1 | iex
|
|
71
72
|
```
|
|
72
73
|
|
|
73
|
-
The installer uses [uv](https://docs.astral.sh/uv/) to install sagex as an isolated tool, and fetches Python 3.11+ for you if needed. Set `SAGEX_VERSION=
|
|
74
|
+
The installer uses [uv](https://docs.astral.sh/uv/) to install sagex as an isolated tool, and fetches Python 3.11+ for you if needed. Set `SAGEX_VERSION=2.0.0` before running it to pin a version.
|
|
74
75
|
|
|
75
76
|
**Already have a Python tool manager?** Any of these works (Python 3.11 or newer):
|
|
76
77
|
|
|
@@ -84,7 +85,7 @@ pip install sagex-cli
|
|
|
84
85
|
|
|
85
86
|
```sh
|
|
86
87
|
sagex auth login # approve this device in your browser
|
|
87
|
-
sagex # open the terminal app
|
|
88
|
+
sagex # open the terminal app, then just ask Sage
|
|
88
89
|
sagex list workflow # or run single commands
|
|
89
90
|
sagex run workflow "Deploy" # run a workflow and follow it live, node by node
|
|
90
91
|
```
|
|
@@ -94,19 +95,44 @@ sagex run workflow "Deploy" # run a workflow and follow it live, node by node
|
|
|
94
95
|
Run `sagex` with no arguments to open it.
|
|
95
96
|
|
|
96
97
|
- **Left:** your **Resources**: Workflows, Scripts, Vault, recent Runs (with ✓ / ✗ / ⟳ status) and Triggers (● on / ○ off). Press **F3** to switch to your local **Workspace** folder instead.
|
|
97
|
-
- **Right:** a terminal-style transcript. Start a line with `!` to run any command, such as `!sagex run workflow Deploy` or `!git status`. Output streams in live, and workflow runs draw a live node graph.
|
|
98
|
+
- **Right:** a terminal-style transcript. Start a line with `!` to run any command, such as `!sagex run workflow Deploy` or `!git status`. Output streams in live, and workflow runs draw a live node graph. Anything else goes to **Sage**.
|
|
99
|
+
- **Bottom left:** **Sage Today**: today's requests and tokens, the model Sage uses, and the free requests left.
|
|
98
100
|
|
|
99
101
|
| Key | Action |
|
|
100
102
|
|---|---|
|
|
101
103
|
| `!command` | Run a shell or sagex command |
|
|
102
|
-
|
|
|
104
|
+
| *anything else* | Ask Sage |
|
|
105
|
+
| `Esc` | Stop the running command or Sage's reply |
|
|
103
106
|
| `↑` / `↓` | Command history |
|
|
104
107
|
| `F2` | Switch shell (PowerShell / cmd / WSL on Windows, bash / sh elsewhere) |
|
|
105
108
|
| `F3` | Switch between server resources and the local workspace |
|
|
106
109
|
| `F5` | Refresh |
|
|
107
110
|
| `Ctrl+Q` | Quit |
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
## Sage
|
|
113
|
+
|
|
114
|
+
Type a question without `!` and Sage, your Autosage assistant, answers in the transcript. Ask "why did that fail?" right after a command and it sees that command's output.
|
|
115
|
+
|
|
116
|
+
- **It looks things up by itself.** Read-only sagex commands and command help run straight away, each shown as a card with the exact command and its output.
|
|
117
|
+
- **It asks before changing anything.** Runs, pushes, creates, deletes, file writes and shell commands appear as an approval card with a one-line summary and the exact command: `y` once, `a` for the rest of the session, `n` no. Deletes always ask. `/permissions` lists and revokes what you've allowed.
|
|
118
|
+
- **It works in your workspace.** It reads, writes and edits files there (showing a diff first) and runs shell commands in your current shell. Never outside the workspace, never files that usually hold secrets.
|
|
119
|
+
- **It never touches secrets.** Signing in, vault and model keys, trigger secrets and `--reveal` aren't available to it; a run that needs a typed secret is handed back to you.
|
|
120
|
+
|
|
121
|
+
| Command | Action |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `/sessions` | Your saved conversations; `/sessions <n>` reopens one, `/sessions delete <n>` deletes one |
|
|
124
|
+
| `/new` | Start a fresh conversation |
|
|
125
|
+
| `/model` | The models Sage can use; `/model <n or name>` or `/model free` switches |
|
|
126
|
+
| `/usage` | Requests and tokens today, last 7 days and all time |
|
|
127
|
+
| `/permissions` | What Sage may do without asking; `/permissions revoke <n>` or `revoke all` |
|
|
128
|
+
|
|
129
|
+
**Your own model.** Sage answers with Autosage's free models (a daily allowance shared with Autobot on the web) unless you pick one of your own:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
sagex create model "My Claude" --provider anthropic --model claude-sonnet-4-5 --use
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The API key is typed at a hidden prompt (or read with `--key-file`), stored encrypted on Autosage and never shown again. Providers: Gemini, Groq, OpenRouter, Anthropic, OpenAI, Azure OpenAI, NVIDIA NIM, or any LiteLLM-compatible endpoint (`--base-url`). `sagex use model <name>` or `--free` switches; the choice also applies to Autobot on the web.
|
|
110
136
|
|
|
111
137
|
## Commands
|
|
112
138
|
|
|
@@ -115,18 +141,19 @@ Resources can be referred to by **name or id**. An id prefix works for runs. Mos
|
|
|
115
141
|
| Group | Commands | What it does |
|
|
116
142
|
|---|---|---|
|
|
117
143
|
| `auth` | `login` · `status` · `logout` | Sign in with your browser (or `--with-token`), see who you're signed in as, sign out |
|
|
118
|
-
| `list` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` | Compact tables of your resources |
|
|
119
|
-
| `show` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` | One resource in detail; `show run --logs` prints node output, `show key --reveal` shows secrets after confirming |
|
|
144
|
+
| `list` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` · `model` | Compact tables of your resources |
|
|
145
|
+
| `show` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` · `model` | One resource in detail; `show run --logs` prints node output, `show key --reveal` shows secrets after confirming |
|
|
120
146
|
| `render` | `workflow` | Draw a workflow as a flow tree (from the server, or a local file with `--file`) |
|
|
121
147
|
| `run` | `script` · `workflow` | Run now and stream output live. `Ctrl+C` stops it. Pass inputs with `-p NAME=VALUE` |
|
|
122
148
|
| `trigger` | `create` · `fire` · `poll` · `watch` · `invoke` · `enable` · `disable` · `regenerate` | HTTP webhooks and cron schedules: set up, fire, follow and rotate |
|
|
123
149
|
| `new` | `workflow` · `script` | Scaffold a local file, ready to edit |
|
|
124
150
|
| `push` | `workflow` · `script` | Create on the server from a local file, or update after confirming (scripts show a diff) |
|
|
125
151
|
| `copy` | `workflow` · `script` · `run` | Download to your workspace (`--all`, or `copy run --since 7days`) |
|
|
126
|
-
| `create` | `vault` · `server` · `key` | Create vault resources |
|
|
127
|
-
| `update` | `vault` · `server` · `key` | Change them, or rotate a key's secret |
|
|
128
|
-
| `rename` | `workflow` · `script` · `vault` · `server` · `key` | Rename in place |
|
|
129
|
-
| `delete` | `workflow` · `script` · `vault` · `server` · `key` · `trigger` | Delete, after confirming |
|
|
152
|
+
| `create` | `vault` · `server` · `key` · `model` | Create vault resources, or add your own model |
|
|
153
|
+
| `update` | `vault` · `server` · `key` · `model` | Change them, or rotate a key's secret / a model's API key |
|
|
154
|
+
| `rename` | `workflow` · `script` · `vault` · `server` · `key` · `model` | Rename in place |
|
|
155
|
+
| `delete` | `workflow` · `script` · `vault` · `server` · `key` · `model` · `trigger` | Delete, after confirming |
|
|
156
|
+
| `use` | `model` | Choose the model Sage (and Autobot on the web) answers with, or `--free` |
|
|
130
157
|
| `workspace` | `set` · `show` | Choose the local folder sagex reads from and writes to |
|
|
131
158
|
| `syntax` | `trigger` · `script` · `email` · `decision` · `edge` · `decision-edge` | Print a copy-paste JSON snippet for a workflow node or edge |
|
|
132
159
|
|
|
@@ -172,6 +199,8 @@ Each sign-in is a **session**. Your [Autosage profile](https://autosagex.web.app
|
|
|
172
199
|
- Secrets are **never accepted as command-line flags**, so they never show up in shell history. Passwords, SSH keys and passphrases are typed at a hidden prompt or read from a file you point to.
|
|
173
200
|
- Vault credentials **can't be copied** to disk, and `show key` hides secret values unless you pass `--reveal` and confirm.
|
|
174
201
|
- An HTTP trigger's secret is shown **once**, when it's created or rotated.
|
|
202
|
+
- Model API keys are write-only: stored encrypted on Autosage, never shown or copied back.
|
|
203
|
+
- Sage runs nothing on its own server: every command, file change and shell command runs on your machine, in your workspace, through the same approval checks, and Sage's replies are cleaned of terminal escape sequences and unsafe links before they're shown.
|
|
175
204
|
|
|
176
205
|
## Configuration
|
|
177
206
|
|
|
@@ -179,6 +208,7 @@ Each sign-in is a **session**. Your [Autosage profile](https://autosagex.web.app
|
|
|
179
208
|
|---|---|
|
|
180
209
|
| `SAGEX_API_KEY` | Use this access token instead of the keychain. For CI or machines without a keychain; create one on your Autosage profile |
|
|
181
210
|
| `SAGEX_API_URL` | Point sagex at a different Autosage server |
|
|
211
|
+
| `SAGEX_AI_URL` | Point Sage at an Autobot on its own address (default: `<api url>/api/ai`) |
|
|
182
212
|
| `SAGEX_DEBUG=1` | Add connection details to network errors |
|
|
183
213
|
| `~/.sagex/config.json` | Saved preferences (workspace, shell) |
|
|
184
214
|
|
|
@@ -205,7 +235,8 @@ pytest
|
|
|
205
235
|
## Roadmap
|
|
206
236
|
|
|
207
237
|
- **v1.1 (shipped):** sign in with your browser, and see and revoke every session on your Autosage profile.
|
|
208
|
-
- **v2:**
|
|
238
|
+
- **v2 (shipped):** Sage in the terminal app: ask, look up, change things with your approval, files and shell in your workspace, saved conversations, your own model, usage.
|
|
239
|
+
- **Next:** Sage remembers your preferences across conversations, reusable skills, and connecting your own tools.
|
|
209
240
|
|
|
210
241
|
## Links
|
|
211
242
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# sagex
|
|
2
2
|
|
|
3
|
-
**Autosage in your terminal.** Build, run and watch your [Autosage](https://autosagex.web.app) workflows, scripts, vaults and triggers from a full-screen terminal app or one-shot commands. Everything the web app does, minus the mouse.
|
|
3
|
+
**Autosage in your terminal.** Build, run and watch your [Autosage](https://autosagex.web.app) workflows, scripts, vaults and triggers from a full-screen terminal app or one-shot commands. Everything the web app does, minus the mouse, plus **Sage**: an assistant that looks things up, writes and pushes scripts, runs workflows and fixes what failed, asking you before it changes anything.
|
|
4
4
|
|
|
5
5
|
[](https://pypi.org/project/sagex-cli/)
|
|
6
6
|
[](https://pypi.org/project/sagex-cli/)
|
|
@@ -32,7 +32,7 @@ curl -LsSf https://raw.githubusercontent.com/Lagnajit09/sagex/main/scripts/insta
|
|
|
32
32
|
irm https://raw.githubusercontent.com/Lagnajit09/sagex/main/scripts/install.ps1 | iex
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
The installer uses [uv](https://docs.astral.sh/uv/) to install sagex as an isolated tool, and fetches Python 3.11+ for you if needed. Set `SAGEX_VERSION=
|
|
35
|
+
The installer uses [uv](https://docs.astral.sh/uv/) to install sagex as an isolated tool, and fetches Python 3.11+ for you if needed. Set `SAGEX_VERSION=2.0.0` before running it to pin a version.
|
|
36
36
|
|
|
37
37
|
**Already have a Python tool manager?** Any of these works (Python 3.11 or newer):
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@ pip install sagex-cli
|
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
48
|
sagex auth login # approve this device in your browser
|
|
49
|
-
sagex # open the terminal app
|
|
49
|
+
sagex # open the terminal app, then just ask Sage
|
|
50
50
|
sagex list workflow # or run single commands
|
|
51
51
|
sagex run workflow "Deploy" # run a workflow and follow it live, node by node
|
|
52
52
|
```
|
|
@@ -56,19 +56,44 @@ sagex run workflow "Deploy" # run a workflow and follow it live, node by node
|
|
|
56
56
|
Run `sagex` with no arguments to open it.
|
|
57
57
|
|
|
58
58
|
- **Left:** your **Resources**: Workflows, Scripts, Vault, recent Runs (with ✓ / ✗ / ⟳ status) and Triggers (● on / ○ off). Press **F3** to switch to your local **Workspace** folder instead.
|
|
59
|
-
- **Right:** a terminal-style transcript. Start a line with `!` to run any command, such as `!sagex run workflow Deploy` or `!git status`. Output streams in live, and workflow runs draw a live node graph.
|
|
59
|
+
- **Right:** a terminal-style transcript. Start a line with `!` to run any command, such as `!sagex run workflow Deploy` or `!git status`. Output streams in live, and workflow runs draw a live node graph. Anything else goes to **Sage**.
|
|
60
|
+
- **Bottom left:** **Sage Today**: today's requests and tokens, the model Sage uses, and the free requests left.
|
|
60
61
|
|
|
61
62
|
| Key | Action |
|
|
62
63
|
|---|---|
|
|
63
64
|
| `!command` | Run a shell or sagex command |
|
|
64
|
-
|
|
|
65
|
+
| *anything else* | Ask Sage |
|
|
66
|
+
| `Esc` | Stop the running command or Sage's reply |
|
|
65
67
|
| `↑` / `↓` | Command history |
|
|
66
68
|
| `F2` | Switch shell (PowerShell / cmd / WSL on Windows, bash / sh elsewhere) |
|
|
67
69
|
| `F3` | Switch between server resources and the local workspace |
|
|
68
70
|
| `F5` | Refresh |
|
|
69
71
|
| `Ctrl+Q` | Quit |
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
## Sage
|
|
74
|
+
|
|
75
|
+
Type a question without `!` and Sage, your Autosage assistant, answers in the transcript. Ask "why did that fail?" right after a command and it sees that command's output.
|
|
76
|
+
|
|
77
|
+
- **It looks things up by itself.** Read-only sagex commands and command help run straight away, each shown as a card with the exact command and its output.
|
|
78
|
+
- **It asks before changing anything.** Runs, pushes, creates, deletes, file writes and shell commands appear as an approval card with a one-line summary and the exact command: `y` once, `a` for the rest of the session, `n` no. Deletes always ask. `/permissions` lists and revokes what you've allowed.
|
|
79
|
+
- **It works in your workspace.** It reads, writes and edits files there (showing a diff first) and runs shell commands in your current shell. Never outside the workspace, never files that usually hold secrets.
|
|
80
|
+
- **It never touches secrets.** Signing in, vault and model keys, trigger secrets and `--reveal` aren't available to it; a run that needs a typed secret is handed back to you.
|
|
81
|
+
|
|
82
|
+
| Command | Action |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `/sessions` | Your saved conversations; `/sessions <n>` reopens one, `/sessions delete <n>` deletes one |
|
|
85
|
+
| `/new` | Start a fresh conversation |
|
|
86
|
+
| `/model` | The models Sage can use; `/model <n or name>` or `/model free` switches |
|
|
87
|
+
| `/usage` | Requests and tokens today, last 7 days and all time |
|
|
88
|
+
| `/permissions` | What Sage may do without asking; `/permissions revoke <n>` or `revoke all` |
|
|
89
|
+
|
|
90
|
+
**Your own model.** Sage answers with Autosage's free models (a daily allowance shared with Autobot on the web) unless you pick one of your own:
|
|
91
|
+
|
|
92
|
+
```sh
|
|
93
|
+
sagex create model "My Claude" --provider anthropic --model claude-sonnet-4-5 --use
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The API key is typed at a hidden prompt (or read with `--key-file`), stored encrypted on Autosage and never shown again. Providers: Gemini, Groq, OpenRouter, Anthropic, OpenAI, Azure OpenAI, NVIDIA NIM, or any LiteLLM-compatible endpoint (`--base-url`). `sagex use model <name>` or `--free` switches; the choice also applies to Autobot on the web.
|
|
72
97
|
|
|
73
98
|
## Commands
|
|
74
99
|
|
|
@@ -77,18 +102,19 @@ Resources can be referred to by **name or id**. An id prefix works for runs. Mos
|
|
|
77
102
|
| Group | Commands | What it does |
|
|
78
103
|
|---|---|---|
|
|
79
104
|
| `auth` | `login` · `status` · `logout` | Sign in with your browser (or `--with-token`), see who you're signed in as, sign out |
|
|
80
|
-
| `list` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` | Compact tables of your resources |
|
|
81
|
-
| `show` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` | One resource in detail; `show run --logs` prints node output, `show key --reveal` shows secrets after confirming |
|
|
105
|
+
| `list` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` · `model` | Compact tables of your resources |
|
|
106
|
+
| `show` | `workflow` · `script` · `run` · `trigger` · `vault` · `server` · `key` · `model` | One resource in detail; `show run --logs` prints node output, `show key --reveal` shows secrets after confirming |
|
|
82
107
|
| `render` | `workflow` | Draw a workflow as a flow tree (from the server, or a local file with `--file`) |
|
|
83
108
|
| `run` | `script` · `workflow` | Run now and stream output live. `Ctrl+C` stops it. Pass inputs with `-p NAME=VALUE` |
|
|
84
109
|
| `trigger` | `create` · `fire` · `poll` · `watch` · `invoke` · `enable` · `disable` · `regenerate` | HTTP webhooks and cron schedules: set up, fire, follow and rotate |
|
|
85
110
|
| `new` | `workflow` · `script` | Scaffold a local file, ready to edit |
|
|
86
111
|
| `push` | `workflow` · `script` | Create on the server from a local file, or update after confirming (scripts show a diff) |
|
|
87
112
|
| `copy` | `workflow` · `script` · `run` | Download to your workspace (`--all`, or `copy run --since 7days`) |
|
|
88
|
-
| `create` | `vault` · `server` · `key` | Create vault resources |
|
|
89
|
-
| `update` | `vault` · `server` · `key` | Change them, or rotate a key's secret |
|
|
90
|
-
| `rename` | `workflow` · `script` · `vault` · `server` · `key` | Rename in place |
|
|
91
|
-
| `delete` | `workflow` · `script` · `vault` · `server` · `key` · `trigger` | Delete, after confirming |
|
|
113
|
+
| `create` | `vault` · `server` · `key` · `model` | Create vault resources, or add your own model |
|
|
114
|
+
| `update` | `vault` · `server` · `key` · `model` | Change them, or rotate a key's secret / a model's API key |
|
|
115
|
+
| `rename` | `workflow` · `script` · `vault` · `server` · `key` · `model` | Rename in place |
|
|
116
|
+
| `delete` | `workflow` · `script` · `vault` · `server` · `key` · `model` · `trigger` | Delete, after confirming |
|
|
117
|
+
| `use` | `model` | Choose the model Sage (and Autobot on the web) answers with, or `--free` |
|
|
92
118
|
| `workspace` | `set` · `show` | Choose the local folder sagex reads from and writes to |
|
|
93
119
|
| `syntax` | `trigger` · `script` · `email` · `decision` · `edge` · `decision-edge` | Print a copy-paste JSON snippet for a workflow node or edge |
|
|
94
120
|
|
|
@@ -134,6 +160,8 @@ Each sign-in is a **session**. Your [Autosage profile](https://autosagex.web.app
|
|
|
134
160
|
- Secrets are **never accepted as command-line flags**, so they never show up in shell history. Passwords, SSH keys and passphrases are typed at a hidden prompt or read from a file you point to.
|
|
135
161
|
- Vault credentials **can't be copied** to disk, and `show key` hides secret values unless you pass `--reveal` and confirm.
|
|
136
162
|
- An HTTP trigger's secret is shown **once**, when it's created or rotated.
|
|
163
|
+
- Model API keys are write-only: stored encrypted on Autosage, never shown or copied back.
|
|
164
|
+
- Sage runs nothing on its own server: every command, file change and shell command runs on your machine, in your workspace, through the same approval checks, and Sage's replies are cleaned of terminal escape sequences and unsafe links before they're shown.
|
|
137
165
|
|
|
138
166
|
## Configuration
|
|
139
167
|
|
|
@@ -141,6 +169,7 @@ Each sign-in is a **session**. Your [Autosage profile](https://autosagex.web.app
|
|
|
141
169
|
|---|---|
|
|
142
170
|
| `SAGEX_API_KEY` | Use this access token instead of the keychain. For CI or machines without a keychain; create one on your Autosage profile |
|
|
143
171
|
| `SAGEX_API_URL` | Point sagex at a different Autosage server |
|
|
172
|
+
| `SAGEX_AI_URL` | Point Sage at an Autobot on its own address (default: `<api url>/api/ai`) |
|
|
144
173
|
| `SAGEX_DEBUG=1` | Add connection details to network errors |
|
|
145
174
|
| `~/.sagex/config.json` | Saved preferences (workspace, shell) |
|
|
146
175
|
|
|
@@ -167,7 +196,8 @@ pytest
|
|
|
167
196
|
## Roadmap
|
|
168
197
|
|
|
169
198
|
- **v1.1 (shipped):** sign in with your browser, and see and revoke every session on your Autosage profile.
|
|
170
|
-
- **v2:**
|
|
199
|
+
- **v2 (shipped):** Sage in the terminal app: ask, look up, change things with your approval, files and shell in your workspace, saved conversations, your own model, usage.
|
|
200
|
+
- **Next:** Sage remembers your preferences across conversations, reusable skills, and connecting your own tools.
|
|
171
201
|
|
|
172
202
|
## Links
|
|
173
203
|
|