Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
python -m venv /tmp/smoke
/tmp/smoke/bin/pip install dist/*.whl
/tmp/smoke/bin/tex list
/tmp/smoke/bin/vtx list

- name: Upload build artifacts
uses: actions/upload-artifact@v7
Expand Down
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,34 @@ pip install -e ".[openai,anthropic]"

```bash
# Initialize configuration
tex --setup
vtx --setup

# Configure a model (provider auto-detected from model name)
tex config gemini-3.6-flash YOUR_API_KEY
tex config gpt-4 YOUR_OPENAI_KEY
tex config claude-opus-5 YOUR_ANTHROPIC_KEY
vtx config gemini-3.6-flash YOUR_API_KEY
vtx config gpt-4 YOUR_OPENAI_KEY
vtx config claude-opus-5 YOUR_ANTHROPIC_KEY

# Or specify provider explicitly
tex config my-model YOUR_KEY --provider google
vtx config my-model YOUR_KEY --provider google

# Select active model
tex select gemini-3.6-flash
vtx select gemini-3.6-flash

# Use it
tex "explain quantum computing"
vtx "explain quantum computing"
```

## Commands

```bash
tex "your question" # Ask a question
tex chat <text> # Chat mode
tex debug # Debug shell commands
tex config <model> <api_key> # Configure model (auto-detects provider)
tex config <model> <key> --provider <provider> # Specify provider explicitly
tex list # List models
tex select <model> # Select active model
tex remove <model> # Remove model
vtx "your question" # Ask a question
vtx chat <text> # Chat mode
vtx debug # Debug shell commands
vtx config <model> <api_key> # Configure model (auto-detects provider)
vtx config <model> <key> --provider <provider> # Specify provider explicitly
vtx list # List models
vtx select <model> # Select active model
vtx remove <model> # Remove model
```

## Supported Providers
Expand Down Expand Up @@ -111,10 +111,10 @@ You can either use the `chat` subcommand or omit it entirely:

```bash
# Explicit subcommand
tex chat "Tell me about the solar system"
vtx chat "Tell me about the solar system"

# Shortcut form (no subcommand)
tex "Tell me about the solar system"
vtx "Tell me about the solar system"
```

Replace the quoted string with any query you'd like.
Expand All @@ -132,19 +132,19 @@ Debugging is currently in beta but can analyze recent shell commands to identify
### Debug the Last 3 Commands (default)

```bash
tex debug
vtx debug
```

### Specify the Number of Commands to Debug

```bash
tex debug -n 5
vtx debug -n 5
```

### Add a Custom Debugging Message

```bash
tex debug -n 5 -p "Explain why \`git commit\` failed"
vtx debug -n 5 -p "Explain why \`git commit\` failed"
```

---
Expand Down
4 changes: 2 additions & 2 deletions cli/llm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def generate(
model_name = self.config_manager.get_selected_model()
if not model_name:
raise ValueError(
"No model selected. Run 'tex config <model> <api_key>', "
"then 'tex select <model>'."
"No model selected. Run 'vtx config <model> <api_key>', "
"then 'vtx select <model>'."
)

# Get provider
Expand Down
2 changes: 1 addition & 1 deletion cli/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _run():

# Subcommand parsing
parser = argparse.ArgumentParser(
prog="tex", description="CLI for interacting with multiple LLMs via LangChain"
prog="vtx", description="CLI for interacting with multiple LLMs via LangChain"
)
parser.add_argument("--setup", action="store_true", help="Create default config")
subparsers = parser.add_subparsers(dest="command")
Expand Down
32 changes: 16 additions & 16 deletions docs/cli_tool_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pip install "Vertex-CLI[anthropic]"
After installation, initialize the CLI configuration file:

```bash
tex --setup
vtx --setup
```

This will create an empty `models_config.json` under `~/.config/ai_model_manager/`.
Expand All @@ -55,7 +55,7 @@ If you want to modify or contribute to Vertex CLI, install it in **editable mode
3. **Initialize the CLI configuration:**

```bash
tex --setup
vtx --setup
```

---
Expand All @@ -65,27 +65,27 @@ If you want to modify or contribute to Vertex CLI, install it in **editable mode
You can configure the CLI to use a specific LLM model by adding or updating your API key:

```bash
tex config gemini-flash-latest YOUR_MODEL_API_KEY
vtx config gemini-flash-latest YOUR_MODEL_API_KEY
```

Replace `gemini-flash-latest` with your preferred model name and `YOUR_MODEL_API_KEY` with your API key.

To list all configured models:

```bash
tex list
vtx list
```

To remove a model:

```bash
tex remove gemini-flash-lite-latest
vtx remove gemini-flash-lite-latest
```

To select a model as the default:

```bash
tex select gemini-flash-latest
vtx select gemini-flash-latest
```

---
Expand All @@ -99,56 +99,56 @@ Once installed and configured, you can start chatting or debugging commands:
* **Convert an array to a NumPy array**

```bash
tex "how to convert an array into a NumPy array"
vtx "how to convert an array into a NumPy array"
```

* **Manage API keys for models**

* Add or update a model’s API key:

```bash
tex config <model-name> <api-key>
vtx config <model-name> <api-key>
```
* Remove a model:

```bash
tex remove <model-name>
vtx remove <model-name>
```
* List all saved models and their API keys:

```bash
tex list
vtx list
```
* Select a model to use:

```bash
tex select <model-name>
vtx select <model-name>
```
* Show available commands/help:

```bash
tex -h
tex chat -h
vtx -h
vtx chat -h
```

### Debugging (Beta Feature)

* Debug the last 3 commands (default):

```bash
tex debug
vtx debug
```

* Debug a specific number of recent commands (e.g., last 5):

```bash
tex debug -n 5
vtx debug -n 5
```

* Add a custom message to explain your assumptions or observations:

```bash
tex debug -n 5 -p "I think this issue might be related to environment variables"
vtx debug -n 5 -p "I think this issue might be related to environment variables"
```

---
Expand Down
4 changes: 2 additions & 2 deletions docs/contributors_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ This allows you to make changes to the code and use them immediately without rei
Run this command to set up the CLI and install necessary dependencies. It will add a free API key for you to get started:

```bash
tex-init
vtx-init
```

## **4. Configure the CLI with Your Model (Optional)**
If you have your own model API key, you can configure it like this:

```bash
tex config gemini-flash-latest <model-api-key>
vtx config gemini-flash-latest <model-api-key>
```

Replace `gemini-flash-latest` with your model's name and `<model-api-key>` with your actual API key.
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
For example, you can run:

```bash
tex "tell me about the solar system"
vtx "tell me about the solar system"
```

![Example usage](images/eg_matplotlib.gif)
Expand All @@ -27,7 +27,7 @@ pip install Vertex-CLI
Then initialize the CLI with:

```bash
tex --setup
vtx --setup
```

---
Expand All @@ -37,25 +37,25 @@ tex --setup
* **Add a model and its API key:**

```bash
tex config <model-name> <api-key>
vtx config <model-name> <api-key>
```

* **Remove a model:**

```bash
tex remove <model-name>
vtx remove <model-name>
```

* **List all configured models:**

```bash
tex list
vtx list
```

* **Select a model to use by default:**

```bash
tex select <model-name>
vtx select <model-name>
```

---
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "Vertex-CLI"
version = "1.0.1"
version = "1.1.0"
description = "A unified CLI tool for interacting with multiple LLMs via LangChain"
readme = "README.md"
authors = [
Expand Down Expand Up @@ -40,8 +40,8 @@ anthropic = ["langchain-anthropic>=1.0.0,<2.0.0"]
dev = ["twine", "build", "mkdocs-material", "mkdocs-material[imaging]", "mkdocstrings", "mkdocstrings-python"]

[project.scripts]
tex = "cli.prompt:main"
tex-init = "cli.utils:install_requirements"
vtx = "cli.prompt:main"
vtx-init = "cli.utils:install_requirements"

[build-system]
requires = ["setuptools>=42", "wheel"]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
End-to-end tests for the `tex` command line.
End-to-end tests for the `vtx` command line.

These drive `main()` as the console script does, with the provider factory stubbed
out, so the dispatch in cli/prompt.py and cli/llm.py runs without network access.
Expand Down Expand Up @@ -36,7 +36,7 @@ def generate(self, text, **kwargs):
monkeypatch.setattr(LLMProviderFactory, "create", staticmethod(lambda config: _Stub()))

def runner(*args):
monkeypatch.setattr(sys, "argv", ["tex", *args])
monkeypatch.setattr(sys, "argv", ["vtx", *args])
prompt.main()

runner.prompts = []
Expand Down
2 changes: 1 addition & 1 deletion tests/test_shell_history.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Tests for reading the current shell's history file.

`tex debug` used to read ~/.bash_history unconditionally, so it silently returned
`vtx debug` used to read ~/.bash_history unconditionally, so it silently returned
nothing under zsh, and zsh's metafied bytes made a plain UTF-8 read raise
UnicodeDecodeError (which the old `except IOError` did not catch).
"""
Expand Down
Loading