Skip to main content

A clever command-line assistant powered by AI

Project description

CCC (Clever Command-line Companion)

A smart command-line assistant powered by AI that helps you with terminal commands and tasks.

Installation

pip install ccc-cli-helper

Usage

Start the assistant:

ccc

Options:

  • -h, --help: Show help message
  • -v, --version: Show version information
  • --verbose: Enable debug mode
  • --model MODEL: Specify AI model to use (default: gpt-4)
  • --api-key KEY: Set OpenAI API key
  • --api-base URL: Set custom API base URL
  • -n, --no-stream: Disable streaming mode

Environment Variables

You can set the following environment variables:

  • AI_API_KEY: Your OpenAI API key
  • AI_MODEL: AI model to use (default: gpt-4)
  • AI_API_BASE: Custom API base URL

Examples

  1. Start the assistant:
ccc
  1. Enable debug mode:
ccc --verbose
  1. Use a specific model:
ccc --model gpt-3.5-turbo
  1. Disable streaming output:
ccc -n

Development

Installation for Development

# Clone the repository
git clone https://github.com/yourusername/ccc.git
cd ccc

# Install in development mode
pip install -e .

Running Tests

The project uses pytest for testing. To run the tests:

# Run all tests
pytest

# Run tests with verbose output
pytest -v

# Run a specific test file
pytest tests/test_cli.py

# Run a specific test
pytest tests/test_cli.py::test_cli_help_works

# Run tests with coverage report
pytest --cov=ccc

Building the Package

# Use the build script (recommended)
./build.sh

The build script automatically cleans up old files before building:

  • Removes old build directories (dist/, build/)
  • Cleans all egg-info directories
  • Removes Python cache files (__pycache__/, *.pyc, etc.)
  • Generates both wheel and source distribution packages
# Or build manually
python -m build

If building manually, you may want to clean old files first:

# Clean before building
rm -rf dist/ build/ *.egg-info/ __pycache__/ .pytest_cache/
find . -name "*.pyc" -delete

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccc_cli_helper-0.2.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccc_cli_helper-0.2.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file ccc_cli_helper-0.2.1.tar.gz.

File metadata

  • Download URL: ccc_cli_helper-0.2.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ccc_cli_helper-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f6ce76ca5ef52cbc381b0c2ecffd2dbb3dece4660fbcd3046da1252d4c494b43
MD5 f74ad841ea40c3e2ce193d5b2d78dd6d
BLAKE2b-256 89d32125eff159db3cd3ab2539da752b39cd7c45abf3a4225c9fe61ec17791b7

See more details on using hashes here.

File details

Details for the file ccc_cli_helper-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ccc_cli_helper-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ccc_cli_helper-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d805c1c487456eb4de67c3bbf8c8d653d7feb931de49366fb958e49e98686d02
MD5 832e7a97a01d8e3ff983f1b7ab935d43
BLAKE2b-256 ea3affbb7b746068954b90e5cb04c08e4f86beec43502447fcc7fa44e1ef7b18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page