1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
tux/docs/cli.md
kzndotsh 8fcebd00be docs(CODE_OF_CONDUCT.md, CONTRIBUTING.md): wrap email and URLs in angle brackets for better markdown rendering
refactor(CONTRIBUTING.md): improve document structure and readability by adding indentation and spacing
style(CONTRIBUTING.md): add newline at end of file to adhere to POSIX standards

feat: add .markdownlint.yaml for consistent markdown formatting

This commit adds a .markdownlint.yaml configuration file to enforce consistent markdown formatting across the project. This will help maintain readability and uniformity in all markdown files.

docs: improve readability and clarity of project documentation

- README.md: Simplify title and subtitle formatting, add warning about bot readiness, clarify installation steps, and improve overall readability.
- cli.md: Improve readability by adding line breaks.
- commands.md: Remove unnecessary line break.
- development.md: Simplify introduction, refer to README for installation instructions, and improve readability.
- permissions.md: Improve readability by adding line breaks and clarifying permission levels.

style(services.md): improve readability by adding a line break between two sentences
docs(services.md): add newline at end of file to adhere to POSIX standards
2024-08-17 08:27:13 +00:00

2.5 KiB

Project Documentation

This document outlines the essential commands and workflows needed for the installation, development, and management of this project.

Each section provides relevant commands and instructions for specific tasks.

Table of Contents

Installation

To install necessary dependencies and set up the environment, use the following commands:

# Install dependencies with Poetry.
poetry install

# Activate the virtual environment.
poetry shell

# Install pre-commit hooks.
poetry pre-commit install

Development

For running the application and executing tests, use these commands:

# Run the application with Poetry.
poetry run python tux/main.py

Docker

To run the application using Docker, use the following command:

# Run the application with Docker.
docker compose up --build -d

Linting

Utilize these commands to run all pre-commit hooks or specific ones:

# Run all pre-commit hooks.
poetry run pre-commit run --all-files

# Run a specific pre-commit hook.
poetry run pre-commit run <hook_id>

Linting and Formatting

Commands for linting and formatting files are as follows:

# Lint all files in the current directory.
poetry run ruff check

# Lint all files in the current directory and fix any fixable errors.
poetry run ruff check --fix

# Lint all files in the current directory and re-lint on changes.
poetry run ruff check --watch

# Format all files in the current directory.
poetry run ruff format .

Git

Common Git commands for repository management are listed below:

# Create a new branch.
git checkout -b <branch_name>

# Switch to an existing branch.
git checkout <branch_name>

# Pull changes from the remote repository.
git pull

# Delete a branch.
git branch -d <branch_name>

# Check the status of the repository.
git status

# Show changes between commits, commit and working tree, etc.
git diff

# Show commit logs.
git log

# Show remote repositories.
git remote -v

# Add a remote repository.
git remote add origin <repository_url>

# Add all files to the staging area.
git add .

# Commit changes with a message.
git commit -m "Your commit message"

# Push changes to the remote repository.
git push