mirror of
https://github.com/katanemo/plano.git
synced 2026-06-29 15:49:40 +02:00
add instructions about uv build/sync in cli (#675)
This commit is contained in:
parent
a3b070440d
commit
134963b309
1 changed files with 59 additions and 52 deletions
111
cli/README.md
111
cli/README.md
|
|
@ -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:
|
First, install the uv package manager. This is required for managing dependencies and running the development version of planoai.
|
||||||
|
|
||||||
```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:
|
|
||||||
|
|
||||||
|
**On macOS and Linux:**
|
||||||
```bash
|
```bash
|
||||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 2: Create a Python virtual environment and install dependencies
|
**On Windows:**
|
||||||
|
```powershell
|
||||||
In the cli directory, run:
|
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
|
||||||
|
|
||||||
```bash
|
|
||||||
uv sync
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
This will create a virtual environment in `.venv` and install all dependencies from `pyproject.toml`.
|
||||||
source .venv/bin/activate
|
|
||||||
```
|
|
||||||
|
|
||||||
### 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
|
```bash
|
||||||
uv run planoai build
|
uv run planoai build
|
||||||
```
|
```
|
||||||
|
|
||||||
### Logs
|
**View logs:**
|
||||||
`plano` command can also view logs from the gateway. Use following command to view logs,
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run planoai logs --follow
|
uv run planoai logs --follow
|
||||||
```
|
```
|
||||||
|
|
||||||
## Uninstall Instructions: plano CLI
|
**Run other plano commands:**
|
||||||
```bash
|
```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).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue