add instructions about uv build/sync in cli (#675)

This commit is contained in:
Adil Hafeez 2026-01-05 13:46:58 -08:00 committed by GitHub
parent 8739b84a74
commit 745b36fdef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,76 +1,83 @@
## Setup Instructions(User): plano CLI
## plano CLI - Local Development
This guide will walk you through the steps to set up the plano cli on your local machine
This guide will walk you through setting up the plano CLI for local development using uv.
### Step 1: Create a Python virtual environment
### Install uv
In the tools directory, create a Python virtual environment by running:
```bash
python -m venv venv
```
### Step 2: Activate the virtual environment
* On Linux/MacOS:
```bash
source venv/bin/activate
```
### Step 3: Run the build script
```bash
pip install planoai==0.4.1
```
## Uninstall Instructions: plano CLI
```bash
pip uninstall planoai
```
## Setup Instructions (Dev): plano CLI
This guide will walk you through the steps to set up the plano cli on your local machine when you want to develop the plano CLI
### Step 1: Install uv
Install uv if you haven't already:
First, install the uv package manager. This is required for managing dependencies and running the development version of planoai.
**On macOS and Linux:**
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
### Step 2: Create a Python virtual environment and install dependencies
In the cli directory, run:
```bash
uv sync
**On Windows:**
```powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
This will create a virtual environment and install all dependencies.
### Setup
### Step 3: Activate the virtual environment (optional)
1. **Install dependencies**
uv will automatically use the virtual environment, but if you need to activate it manually:
In the cli directory, run:
* On Linux/MacOS:
```bash
uv sync
```
```bash
source .venv/bin/activate
```
This will create a virtual environment in `.venv` and install all dependencies from `pyproject.toml`.
### Step 4: build Arch
2. **Install the CLI tool globally (optional)**
To install planoai as a global tool on your system:
```bash
uv tool install --editable .
```
This installs planoai globally in editable mode, allowing you to run `planoai` commands from anywhere while still using the source code from this directory. Any changes you make to the code will be reflected immediately.
3. **Run plano commands**
Use `uv run` to execute plano commands with the development version:
```bash
uv run planoai build
```
Or, if you installed globally with `uv tool install .`:
```bash
planoai build
```
Note: `uv run` automatically uses the virtual environment - no activation needed.
### Development Workflow
**Build plano:**
```bash
uv run planoai build
```
### Logs
`plano` command can also view logs from the gateway. Use following command to view logs,
**View logs:**
```bash
uv run planoai logs --follow
```
## Uninstall Instructions: plano CLI
**Run other plano commands:**
```bash
pip uninstall planoai
uv run planoai <command> [options]
```
### Optional: Manual Virtual Environment Activation
While `uv run` handles the virtual environment automatically, you can activate it manually if needed:
```bash
source .venv/bin/activate
planoai build # No need for 'uv run' when activated
```
**Note:** For end-user installation instructions, see the [plano documentation](https://docs.planoai.dev).