CodeSecure Command Line Interface
Project description
CodeSecure CLI (codesecure-cli)
The codesecure-cli package is the user-facing terminal interface for the CodeSecure monorepo. It wraps the functionality of the core orchestration engine within an interactive, rich terminal application.
🎯 Module Purpose
This package focuses entirely on Developer Experience (DX) inside the terminal and CI/CD environments. It parses CLI arguments using Click, dynamically structures interactive menus with Rich, and connects seamlessly to the Python business logic embedded in codesecure-core.
Note: The CLI is designed to be a "Thin Wrapper". Core scanning logic does not exist in this package.
📦 Local Installation
Installing the CLI relies on standard Python setups but requires the workspace dependency mapped to codesecure-core.
cd packages/cli
python -m venv .venv
source .venv/bin/activate
# Recommended: Install via pip from the project root rather than locally
# This dynamically resolves workspace dependencies
cd ../../
pip install -e ./packages/cli
🔌 Exported Commands & Features
The entry point script installs a global binary command: codesecure. Check the top-level commands below.
# Validates the active scanners provided by Core
codesecure list-scanners
# Initializes Beta agreements
codesecure init
# Prompts setup for Gemini or Kiro CLI
codesecure login
# The main workhorse: Initiates an interactive async scan on a target path
codesecure scan ./my-project --provider kiro --output json,html
🛠️ Integration Example
Since the CLI is a consumption edge-node in the monorepo architecture, its integrations primarily concern reading from core. Below is a snippet of how the CLI bypasses MCP overhead to list scanners efficiently from the programmatic core.
import click
from codesecure.common.models import ScanMode
@click.command()
def list_scanners():
"""List available security scanners from Core."""
from codesecure.scanners.engine import get_scanner_engine
engine = get_scanner_engine()
try:
local_scanners = engine.get_available_scanners(ScanMode.LOCAL)
print(f"Available Local Scanners: {', '.join(local_scanners)}")
except Exception as e:
print(f"Failed to list scanners: {e}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codesecure_cli-1.0.12-py3-none-any.whl.
File metadata
- Download URL: codesecure_cli-1.0.12-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d9cf97db2ebd3a01b70462e6bdd48cbfb788f5f658cec652d9fc5212f608dc1
|
|
| MD5 |
cce9218382492bee48314b39ca706419
|
|
| BLAKE2b-256 |
d2cbea8cd70bdda1da3a0966a91318a049cecc7bb66e9365ebf9a4cf56c613d0
|