Skip to content

Commit ddf9e13

Browse files
authored
Merge pull request #125 from tower/develop
v0.3.33 release
2 parents e9aaa56 + 367c71a commit ddf9e13

34 files changed

Lines changed: 2226 additions & 445 deletions

.github/workflows/build-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ jobs:
254254
githubToken: ${{ github.token }}
255255
install: |
256256
apt-get update
257-
apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-dev cargo
257+
apt-get install -y --no-install-recommends python3 python3-pip python3-venv python3-dev cargo libffi-dev
258258
pip3 install -U pip
259259
# Create and use a virtual environment to avoid the externally-managed-environment error
260260
run: |

.github/workflows/test-python.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,8 @@ jobs:
3838
- name: Check Python formatting with Black
3939
run: uv run --group dev black --check --diff .
4040

41+
- name: Check types with mypy
42+
run: uv run --group dev mypy src/tower/__init__.py --no-error-summary
43+
4144
- name: Run tests
4245
run: uv run pytest tests

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ pytest.ini
1919
/scripts/openapi-generator-cli-*.jar
2020

2121
.idea
22+
23+
.DS_Store
24+
25+
# from nix builds
26+
/result

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.3.32"
7+
version = "0.3.33"
88

99

1010

README.md

Lines changed: 77 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,39 @@ pip install "tower[iceberg]"
122122
```
123123

124124
Provides Apache Iceberg table support:
125-
126125
- `tower.create_table`: Create Iceberg tables
127126
- `tower.load_table`: Load data from Iceberg tables
127+
- `tower.tables`: Access Iceberg table functionality
128+
129+
#### dbt Core Support
130+
131+
```bash
132+
pip install "tower[dbt]"
133+
```
134+
135+
Provides dbt Core integration for running dbt workflows:
136+
137+
```python
138+
import tower
139+
140+
# Configure and run a dbt workflow
141+
workflow = tower.dbt(
142+
project_path="path/to/dbt_project",
143+
profile_payload=tower.dbt.load_profile_from_env("DBT_PROFILE_YAML"),
144+
commands="deps,seed,build",
145+
)
146+
147+
results = workflow.run()
148+
```
149+
150+
Available helper functions and classes:
151+
- `tower.dbt.load_profile_from_env()`: Load dbt profile from environment variables
152+
- `tower.dbt.parse_command_plan()`: Parse comma-separated commands into a command plan
153+
- `tower.dbt.DbtCommand`: Represents a dbt CLI command invocation
154+
- `tower.dbt.DbtRunnerConfig`: Low-level configuration class
155+
- `tower.dbt.run_dbt_workflow()`: Low-level execution function
156+
157+
For a complete example, see the [dbt Core Ecommerce Analytics app](https://github.com/tower/tower-examples/tree/main/14-dbt-core-ecommerce-analytics).
128158

129159
#### Install All Optional Features
130160

@@ -151,6 +181,17 @@ print(tower.is_feature_enabled("ai"))
151181

152182
Tower CLI includes an MCP (Model Context Protocol) server that allows AI assistants and editors to interact with your Tower account directly. The MCP server provides tools for managing apps, secrets, teams, and deployments.
153183

184+
#### Prerequisites
185+
186+
Before using the MCP server, ensure you're logged into Tower:
187+
188+
```bash
189+
tower login
190+
```
191+
192+
The MCP server will use your existing Tower CLI authentication and configuration.
193+
194+
154195
#### Available Tools
155196

156197
The MCP server exposes the following tools:
@@ -186,7 +227,15 @@ The server will display a message showing the URL it's running on:
186227
SSE server running on http://127.0.0.1:34567
187228
```
188229

189-
#### Editor Configuration
230+
It's important to keep the terminal with the MCP server open until you're finished. Alternatively, you can launch it in the background with:
231+
232+
``` bash
233+
tower mcp-server &
234+
```
235+
236+
It's also important to be logged in. If you haven't already, you can open another terminal window and type `tower login` in order to open the login in a browser window.
237+
238+
#### Client Configuration
190239

191240
##### Claude Code
192241

@@ -196,7 +245,7 @@ Add the Tower MCP server to Claude Code using SSE transport:
196245
claude mcp add tower http://127.0.0.1:34567/sse --transport sse
197246
```
198247

199-
Or using JSON configuration with SSE:
248+
Or with the JSON configuration directly:
200249

201250
```json
202251
{
@@ -213,78 +262,61 @@ For custom ports, adjust the URL accordingly (e.g., `http://127.0.0.1:8080/sse`)
213262

214263
##### Cursor
215264

216-
Add this to your Cursor settings (`settings.json`):
265+
[![Install MCP Server](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=tower&config=eyJ1cmwiOiJodHRwOi8vMTI3LjAuMC4xOjM0NTY3L3NzZSJ9)
266+
267+
If that doesn't work, try opening the following link in your browser or in your terminal with `open` on macOS, or `xdg-open` on Linux:
268+
```
269+
cursor://anysphere.cursor-deeplink/mcp/install?name=tower&config=eyJ1cmwiOiJodHRwOi8vMTI3LjAuMC4xOjM0NTY3L3NzZSJ9
270+
```
271+
272+
Or manually, add this to your Cursor MCP settings (`mcp.json`):
217273

218274
```json
219275
{
220-
"mcp.servers": {
276+
"mcpServers": {
221277
"tower": {
222-
"url": "http://127.0.0.1:34567/sse",
223-
"transport": "sse"
278+
"url": "http://127.0.0.1:34567/sse"
224279
}
225280
}
226281
}
227282
```
228283

229-
##### Windsurf
284+
##### VS Code
230285

231-
Configure in Windsurf settings:
286+
In VS Code, first you should enable MCP integrations by setting `Chat>MCP:Enabled` to true in your settings.
232287

233-
```json
234-
{
235-
"mcp": {
236-
"servers": {
237-
"tower": {
238-
"url": "http://127.0.0.1:34567/sse",
239-
"transport": "sse"
240-
}
241-
}
242-
}
243-
}
288+
For adding the server, you can try copying and pasting the following link into your URL bar:
289+
```
290+
vscode:mcp/install?%7B%22name%22%3A%22tower%22%2C%22type%22%3A%22sse%22%2C%22url%22%3A%22http%3A%2F%2F127.0.0.1%3A34567%2Fsse%22%7D
244291
```
245292

246-
##### Zed
247-
248-
Add to your Zed `settings.json`:
293+
Alternatively, you can add the following to your `mcp.json`:
249294

250295
```json
251296
{
252-
"assistant": {
253-
"mcp_servers": {
254-
"tower": {
255-
"url": "http://127.0.0.1:34567/sse",
256-
"transport": "sse"
257-
}
297+
"servers": {
298+
"tower": {
299+
"type": "sse",
300+
"url": "http://127.0.0.1:34567/sse"
258301
}
259302
}
260303
}
261304
```
262305

263-
##### VS Code
306+
##### Gemini CLI
264307

265-
For VS Code with MCP extensions, add to your `settings.json`:
308+
In your `settings.json`, add the following:
266309

267-
```json
310+
``` json
268311
{
269-
"mcp.servers": {
312+
"mcpServers": {
270313
"tower": {
271-
"url": "http://127.0.0.1:34567/sse",
272-
"transport": "sse"
314+
"url": "http://127.0.0.1:34567/sse"
273315
}
274316
}
275317
}
276318
```
277319

278-
#### Prerequisites
279-
280-
Before using the MCP server, ensure you're logged into Tower:
281-
282-
```bash
283-
tower login
284-
```
285-
286-
The MCP server will use your existing Tower CLI authentication and configuration.
287-
288320
### About the runtime environment
289321

290322
The [tower-runtime](crates/tower-runtime) crate has the Rust library that makes

crates/tower-cmd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tower-runtime = { workspace = true }
3333
tower-telemetry = { workspace = true }
3434
tower-version = { path = "../tower-version" }
3535
webbrowser = { workspace = true }
36-
rmcp = { version = "0.5.0", features = ["server", "transport-io", "schemars", "transport-sse-server"] }
36+
rmcp = { version = "0.5.0", features = ["server", "transport-io", "schemars", "transport-sse-server", "transport-streamable-http-server"] }
3737
schemars = "1.0"
3838
toml = { workspace = true }
3939
toml_edit = { workspace = true }

crates/tower-cmd/src/apps.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use config::Config;
33

44
use tower_api::models::Run;
55

6-
use crate::{api, output, util::dates};
6+
use crate::{api, output};
77

88
pub fn apps_cmd() -> Command {
99
Command::new("apps")
@@ -51,8 +51,7 @@ pub async fn do_logs(config: Config, cmd: &ArgMatches) {
5151

5252
if let Ok(resp) = api::describe_run_logs(&config, &name, seq).await {
5353
for line in resp.log_lines {
54-
let ts = dates::format_str(&line.reported_at);
55-
output::log_line(&ts, &line.content, output::LogLineType::Remote);
54+
output::remote_log_event(&line);
5655
}
5756
}
5857
}
@@ -62,7 +61,7 @@ pub async fn do_show(config: Config, cmd: &ArgMatches) {
6261

6362
match api::describe_app(&config, &name).await {
6463
Ok(app_response) => {
65-
if output::is_json_mode_set() {
64+
if output::get_output_mode().is_json() {
6665
output::json(&app_response);
6766
return;
6867
}

crates/tower-cmd/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl App {
6363
};
6464

6565
if config.json {
66-
output::set_json_mode();
66+
output::set_output_mode(output::OutputMode::Json);
6767
}
6868

6969
if config.debug {

0 commit comments

Comments
 (0)