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
19 changes: 14 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,36 @@ snapbase/

### Setup Instructions

#### 1. Clone Repository
#### Option A: One-command install (latest)

```bash
git clone https://github.com/Prateekkp/SnapBase.git
cd snapbase
pip install -U git+https://github.com/Prateekkp/SnapBase.git
```

#### 2. Install Dependencies
This installs the latest code from GitHub and registers the `snapbase` command.

#### Option B: Editable install (for development)

```bash
git clone https://github.com/Prateekkp/SnapBase.git
cd SnapBase
pip install -e .
```

This registers the `snapbase` command globally in your environment.
Use this if you plan to modify the source locally.

#### 3. Verify Installation

```bash
snapbase --version
```

#### Update to latest

```bash
pip install -U git+https://github.com/Prateekkp/SnapBase.git
```

## Usage

### Starting the CLI
Expand Down
12 changes: 12 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from app.cli import start_cli
import sys
import os
from importlib.metadata import PackageNotFoundError, version


def secure_input(prompt=""):
Expand Down Expand Up @@ -51,7 +52,18 @@ def secure_input(prompt=""):
return password


def get_version_string():
try:
return version("snapbase")
except PackageNotFoundError:
return "unknown (package not installed)"


def main():
if any(arg in ("-V", "--version") for arg in sys.argv[1:]):
print(get_version_string())
return

show_banner()
config = load_config()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "snapbase"
version = "1.0.0"
version = "1.2.0"
description = "SnapBase - SQL Bot for natural language to SQL query conversion"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
Loading