Code Monkey home page Code Monkey logo

blox's Introduction

Blox CLI

Blox CLI is a command-line interface tool designed to streamline development tasks for projects using the Blox framework, which integrates seamlessly with Django and Next.js.

Installation

Prerequisites

Before installing Blox CLI, ensure you have the following installed on your system:

  • Python: Blox CLI requires Python 3.x. If you don't have Python installed, download and install it from python.org.
  • Pip: Pip is the package installer for Python. It should be installed automatically when you install Python.
  • Node.js: Blox CLI requires Node.js version 20. If you don't have Node.js installed, download and install it from nodejs.org.

Setup Environment

Clone the Repository

Clone your Blox project repository from GitHub:

git clone https://github.com/Softleek/blox.git
cd blox

Create a Virtual Environment

It's a good practice to use a virtual environment to isolate your project dependencies from other Python projects.

Using venv:

  • Windows:

    python -m venv env
  • Unix or MacOS:

    python3 -m venv env

Activate the virtual environment:

  • Windows:

    env\Scripts\activate
  • Unix or MacOS:

    source env/bin/activate

Install Blox CLI

Install Blox CLI in editable mode using pip. This allows you to make changes to the code and have them immediately available without reinstallation:

pip install -e .

Setup Your Project

After installing Blox CLI, setup your project dependencies and configurations.

Install Dependencies

blox setup

Apply Migrations

Apply database migrations if needed:

blox migrate

Start Development Server

To start the development server:

blox start

The server will start and typically be accessible at http://localhost:3000.

Usage

Blox CLI commands start with blox. Here are the available commands:

Setup environment

blox setup

Command: blox migrate

Migrate database schema changes.

blox migrate

Command: blox start

Start the development server.

blox start

Command: blox install

Install dependencies or packages.

blox install

Install node dependencies.

blox npm install dep1 dep2

Install node dependencies for a custom app.

blox npm install --app appname dep1 dep2

or

blox npm i dep1 dep2
blox npm i --app appname dep1 dep2

Install python packages.

blox pip install package1 package1

Install python packages for a custom app..

blox pip install --app appname  package1 package1

or

blox pip i package1 package1
blox pip i --app appname  package1 package1

Command: blox startapp

Create and start a new application.

blox startapp [appname]

Example:

blox startapp myapp

Command: blox deleteapp

Delete an application.

blox deleteapp [appname]

Example:

blox deleteapp myapp

Command: blox addmodule

Create and start a new module.

blox addmodule [appname] [modulename]

Example:

blox addmodule myapp mymodule

Command: blox deletemodule

Delete a module.

blox deletemodule [appname] [modulename]

Example:

blox deletemodule myapp mymodule

Development

To contribute to Blox CLI development, follow these steps:

  1. Clone the repository: git clone https://github.com/Softleek/blox.git
  2. Navigate to the cloned directory: cd blox
  3. Install development dependencies: blox install
  4. Make your changes.
  5. Test thoroughly.
  6. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

blox's People

Contributors

muruthigitau avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.