Skip to content

Commit

Permalink
Update uv for README
Browse files Browse the repository at this point in the history
  • Loading branch information
tnm committed Dec 17, 2024
1 parent 3d66b2a commit aa2d5a6
Showing 1 changed file with 96 additions and 75 deletions.
171 changes: 96 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,108 +1,129 @@
# Cased CLI

## Overview
A CLI tool for managing cloud infrastructure deployments and configurations.

Cased CLI is a powerful command-line interface tool designed to streamline deployment processes and manage branches efficiently. It provides an intuitive way to interact with the Cased system, offering functionalities such as user authentication, deployment management, and branch oversight.
## Installation

## Features
### Prerequisites

- User authentication (login/logout)
- View recent deployments
- Display active branches
- Interactive deployment process with branch and target selection
- Comprehensive help system
- Python 3.12 or higher
- uv package manager

## Installation
### Installing uv

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

You can install the Cased CLI tool using pip:
### Installing the CLI

1. Clone the repository:
```bash
git clone https://github.com/cased/cli
cd cli
```

2. Create and activate a virtual environment:
```bash
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
```
pip install cased-cli

3. Install dependencies:
```bash
uv pip install -r requirements.txt
```

This will install the latest version of the tool from PyPI.
4. Install the CLI in development mode:
```bash
uv pip install -e .
```

## Usage

After installation, you can use the CLI tool by running `cased` followed by a command:
After installation, you can use the CLI with the `cased` command:

```
```bash
cased --help
```

### Available Commands:

- `cased login`: Log in to the Cased system
- `cased logout`: Log out from the Cased system
- `cased deployments`: View recent deployments
- `cased branches`: View active branches
- `cased deploy`: Deploy a branch to a target environment
### Available Commands

For more details on each command, use:
- `cased init` - Initialize a new project configuration
- `cased login` - Authenticate with Cased services
- `cased build` - Build your project according to configuration
- `cased deploy` - Deploy your project to the specified environment

```
For detailed help on any command:
```bash
cased COMMAND --help
```

## Development

To set up the Cased CLI for development:
### Setting up the Development Environment

1. Clone the repository:
```
git clone https://github.com/cased/cli.git
cd cli
```
1. Install development dependencies:
```bash
uv pip install pre-commit ruff isort
```

2. Install pre-commit hooks:
```bash
pre-commit install
```

2. Install Poetry (if not already installed):
```
pip install poetry
```
### Code Style

3. Install dependencies:
```
poetry install
```
This project uses:
- Ruff for linting and formatting
- isort for import sorting
- pre-commit for git hooks

4. Activate the virtual environment:
```
poetry shell
```
Configuration for these tools can be found in:
- `pyproject.toml` - Ruff configuration
- `.ci-pre-commit-config.yaml` - Pre-commit hooks

5. Run the CLI in development mode:
```
poetry run cased
```
To check code style:
```bash
pre-commit run --all-files
```

### Making Changes

1. Make your changes to the codebase.
2. Update tests if necessary.
3. Run tests:
```
poetry run pytest
```
4. Build the package:
```
poetry build
```

### Submitting Changes

1. Create a new branch for your changes:
```
git checkout -b feature/your-feature-name
```
2. Commit your changes:
```
git commit -am "Add your commit message"
```
3. Push to your branch:
```
git push origin feature/your-feature-name
```
4. Create a pull request on GitHub.

## Contact

For any questions or support, please contact [email protected]
1. Create a new branch:
```bash
git checkout -b feature/your-feature-name
```

2. Make your changes and ensure all checks pass:
```bash
pre-commit run --all-files
```

3. Submit a pull request with your changes

## Configuration

The CLI stores configuration in `~/.cased/config/env`. You can configure:

- API authentication
- Organization settings
- Project configurations

## Environment Variables

- `CASED_API_AUTH_KEY` - Your API authentication key
- `CASED_ORG_ID` - Your organization ID
- `CASED_ORG_NAME` - Your organization name
- `CASED_BASE_URL` - API base URL (defaults to https://app.cased.com)

## Support

For issues and feature requests, please open an issue on GitHub.

## License

[License information here]

0 comments on commit aa2d5a6

Please sign in to comment.