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.2.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.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ccc_cli_helper-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 941402e5ee2320f9b99302cc053d0a1b95c02a7a95df8239b4b0a34ab53cbe6b
MD5 825000f0fbb09b23d9c64967d2e3799f
BLAKE2b-256 9d592a71e650ec1ee202948624cb813eedd037ed9dbf5807d815ddd10ef6811f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ccc_cli_helper-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ad7aa6fdd4e64d23e7ebbc5db9ec597f3d9c8c336b2000085769b343e9be2bc
MD5 3c1e9ca400d14aa6e450d120acacff6d
BLAKE2b-256 34848342549c900fd81ea2159f2c7a39ac6404cfc033c1518831aa9d55b02d22

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