Skip to main content

A Package Manager for C/C++

Project description

Crew - The C/C++ Package Manager

What is Crew?

Crew is not a framework. It is a Dependency Manager (like npm for JavaScript or cargo for Rust) designed specifically for C and C++.

It solves the biggest headache in C++ development: Installing Libraries.

Requirements

  • Python 3.x: To run the crew tool.
  • Git: To download packages.
  • Compiler: gcc, g++, or clang for building your projects.

Installation

Option 1: Install from PyPI (Recommended)

Once published, you can install it with a single command:

pip install crew-cli

Option 2: Install from Source (For Developers)

  1. Clone the repo:

    git clone https://github.com/127crew/crew.git
    cd crew
    
  2. Install locally:

    pip install .
    
  3. Verify: Open a new terminal and type:

    crew --help
    

    If it works, you can now go to any folder and just run crew init or crew create.

Quick Start

New Project (crew create)

Best for starting from scratch. Creates a folder, code, and config.

# Create a C project
python3 crew.py create my-app --template c

Existing Project (crew init)

Best if you already have code. Creates crew.json in the current folder.

cd my-existing-project
python3 crew.py init

Install Dependencies

# Install a C library (stb)
python3 crew.py install https://github.com/nothings/stb.git

# Install a C++ library (nlohmann json)
python3 crew.py install https://github.com/nlohmann/json.git@v3.11.2

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Examples

C Example (stb_image)

File: main.c

#include <stdio.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

int main() {
    printf("STB Image Version: %d\n", STBI_VERSION);
    return 0;
}

Build & Run:

gcc main.c -lm $(python3 crew.py flags) -o app_c
./app_c

C++ Example (nlohmann/json)

File: main.cpp

#include <iostream>
#include <nlohmann/json.hpp>
using json = nlohmann::json;

int main() {
    json j = { {"name", "Crew"}, {"awesome", true} };
    std::cout << j.dump(4) << std::endl;
    return 0;
}

Build & Run:

g++ main.cpp $(python3 crew.py flags) -o app_cpp
./app_cpp

How to use in your project

You don't need to change your build system. Just add $(crew flags) to your compiler command. It generates the necessary -I flags (e.g., -Icrew_modules/stb).

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

crew_cli-1.0.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

crew_cli-1.0.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file crew_cli-1.0.0.tar.gz.

File metadata

  • Download URL: crew_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crew_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3386bc4347cd0b76b008f63d9c36ba5a8bd5c8454f1ae34b4e73306a3924b7e1
MD5 19dbb090322458ea6a4e25d8810f6c06
BLAKE2b-256 1cdefaa22ecb4f2603b5ac7fbbbe77409d7adc8fc4664e2040ff038fb07be8b2

See more details on using hashes here.

File details

Details for the file crew_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: crew_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crew_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1290e5b2aa675cbae4480ece9af9616e37f1d26ce0faefe4895e5730dbfd9bcb
MD5 5750725c7fda6a5561333b94600300a6
BLAKE2b-256 3cbc04ae159f3817d6f1bc52d08c9b4996e17562b79f134038277d46686abbbc

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