A command-line interface tool for managing lifecycle operations, built for modern Python development.
The fastest way to get started is with uvx - no need to manage Python environments:
# Install and run directly from GitHub
uvx --from git+https://github.com/CXEPI/cxp-lifecycle-cli cx-cli --help
# Or install permanently
uv tool install git+https://github.com/CXEPI/cxp-lifecycle-cli
cx-cli --helppip install git+https://github.com/CXEPI/cxp-lifecycle-cliOnce installed, you can access the CLI:
cx-cli --help # Show all available commands
cx-cli version # Show version information
cx-cli init # Initialize a new projectThe CLI automatically checks for new versions on startup and notifies you when updates are available.
To upgrade to the latest version, simply run:
cx-cli upgradeThis will automatically detect your installation method (uv or pip) and upgrade accordingly. You can also specify the method:
cx-cli upgrade --method uv # Force upgrade using uv
cx-cli upgrade --method pip # Force upgrade using pip
cx-cli upgrade -y # Skip confirmation promptIf you prefer to upgrade manually:
# Using uv (recommended)
uv tool install --force --no-cache git+https://github.com/CXEPI/cxp-lifecycle-cli
# Using pip
pip install --upgrade git+https://github.com/CXEPI/cxp-lifecycle-cliThe CLI now fully supports Windows! All features work cross-platform including file operations, path handling, and cloud deployments.
If you installed the CLI before Windows support was added, you'll need to perform a clean reinstall to get the fixes:
# 1. Uninstall the old version
uv tool uninstall lifecycle-cli
# 2. Clear the UV cache
uv cache clean
# 3. Reinstall with no cache
uv tool install --force --no-cache git+https://github.com/CXEPI/cxp-lifecycle-cliAfter reinstalling, verify the installation:
cx-cli --help
cx-cli versionThe CLI can be configured using a configuration file located at ~/.cx-cli/config.json.
# List all configuration settings
cx-cli config list
# Get a specific configuration value
cx-cli config get version-check-enabled
# Set a configuration value
cx-cli config set version-check-enabled falseControls whether the CLI checks for updates on startup.
- Type: boolean (true/false)
- Default: true
- Usage:
# Disable version checking cx-cli config set version-check-enabled false # Enable version checking cx-cli config set version-check-enabled true
When disabled, the CLI will not check for updates or block execution when a new version is available. This is useful for CI/CD environments or if you prefer to manage updates manually.
Configuration is stored in ~/.cx-cli/config.json. You can also edit this file directly:
{
"version-check-enabled": false
}-
Get help on CLI commands
cx-cli --help
Displays help information for all available commands. -
Get help on a specific command
-
cx-cli <command> --help
Displays help information for the specified command. -
Create metadata
-
cx-cli init
Creates metadata for the application. -
validate metadata
-
cx-cli validate-app
Validates the metadata of the application.
-
Deploy a connector
cx-cli datafabric add-connector
Deploys the specified connector. -
Destroy a connector
cx-cli datafabric destroy-connector <connector-name>
Removes the specified connector. -
List all connectors
cx-cli datafabric list-connectors
Lists all available connectors.
-
Get help on API commands
cx-cli api --help
Displays help information for API-related commands. -
Create a new function
cx-cli api add-function
Creates a new API function. -
Destroy a function
cx-cli api destroy-function <function-name>
Removes the specified API function. -
List all functions
cx-cli api list-functions
Lists all available API functions.
-
Get help on IAM commands
cx-cli iam --help
Displays help information for IAM-related commands. -
Create Permission
-
cx-cli iam create_permission
Creates a new permission in the IAM system. -
Create Tenant
cx-cli iam create_tenant
Creates a new tenant in the IAM system.
This version is for end-users who want to install and run the CLI from GitHub.
Command-line interface tool for managing lifecycle operations.
You can install the CLI directly from the GitHub repo:
pip install git+https://github.com//.git#subdirectory=cli Make sure you have Python ≥ 3.9 and pip installed.
🚀 Usage
Once installed, you can access the CLI using:
cx-cli --help Example:
cx-cli init cx-cli datafabric add-connector 🔄 Enable Autocomplete (Optional but Recommended)
Typer provides autocomplete for bash, zsh, and fish.
Enable it by running:
cx-cli --install-completion
This version is for internal developers who are working on the CLI source code.
Clone the repository and set up Poetry (if you haven’t already):
git clone https://github.com/CXEPI/cxp-lifecycle.gitcd cxp-lifecycle/clipoetry install- copy .env.example to .env and fill in the required environment variables
To run the CLI locally:
poetry run cx-cli --help
or globally by:
-
cd cxp-lifecycle/cli -
pip install -e .
and then just use: cx-cli (it will also automatically reflects changes you make in the lifecycle code)
To test a command:
poetry run cx-cli hello --name Dev 🧹 Lint and Format
Run formatting and lint checks:
poetry run black src 🧪 Tests
poetry run pytest 🔄 Releasing a New Version
Bump version in pyproject.toml under [tool.poetry]: version = "0.2.0" Commit and push the changes: git add pyproject.toml git commit -m "chore: bump CLI version to 0.2.0" git push Create a GitHub Release (optional): Go to GitHub > Releases > Draft a new release Tag: v0.2.0 Title: v0.2.0 Description: Add change notes Notify users to update: pip install --upgrade git+https://github.com//.git#subdirectory=cli 🧠 Autocomplete (for dev testing)
Run once to install CLI autocomplete:
poetry run cx-cli --install-completion Then restart your shell or source ~/.bashrc.
You can package the CLI into a single .exe for users who don't have Python installed.
pip install pyinstaller
2. Add a launcher script
Create src/cli/main.py:
from cli.commands import app
if __name__ == "__main__":
app()
3. Build the binary
From the cli/ folder:
pyinstaller --onefile src/cli/main.py --name cx-cli --paths src
Output:
dist/cx-cli.exe # Windows
dist/cx-cli # Linux/macOS
4. Run the binary
./dist/cx-cli --help
5. Clean up (optional)
Add to .gitignore:
# PyInstaller
build/
dist/
*.spec
## 🔄 Version Management
This CLI uses Git tags for version management. To release a new version:
1. Update the version in `pyproject.toml`
2. Create a Git tag: `git tag v0.1.39`
3. Push the tag: `git push origin v0.1.39`
4. Users can install the latest version with uvx/uv
### Automatic Updates
When using uvx, you can always run the latest version:
```bash
uvx --from git+https://github.com/CXEPI/cxp-lifecycle-cli cx-cli --helpFor permanent installations, update with:
uv tool upgrade lifecycle-cli
# or
pip install --upgrade git+https://github.com/CXEPI/cxp-lifecycle-cliClone and set up for development:
git clone https://github.com/CXEPI/cxp-lifecycle-cli
cd cxp-lifecycle-cli
uv sync --dev
uv run cx-cli --helpOr with Poetry (legacy):
poetry install
poetry run cx-cli --help# Test your changes locally
uvx --from . cx-cli --help
# Run tests
uv run pytest
# Format code
uv run black src