Command Line Interface
The project uses just for task automation, providing a comprehensive set of commands for development, testing, and deployment. The legacy commands.py is still available but just is now the recommended approach.
Usage
# Show all available commands
just --list
# Get help
just help
Quick Start Commands
just install # Install dependencies
just db-init # Initialize database (first time only)
just db-create # Create databases
just dev # Start all services
Development Commands
Environment Setup
just install- Create virtual environment and install dependenciesjust update- Update all dependencies (Python and JavaScript)
Database Management
just db-init- Initialize PostgreSQL databasejust db-start- Start PostgreSQL databasejust db-create- Create development and test databasesjust createuser- Create initial user (interactive or via environment variables)just syncservices- Sync services from filesystem to database
Development Server
just dev- Start all services (postgres, fastapi, frontend, docs)just dev-backend- Start backend only (postgres + fastapi)just postgres- Start PostgreSQL onlyjust fastapi- Start FastAPI server onlyjust frontend- Start Vue.js frontend onlyjust docs-serve- Start documentation server only
Testing
just test- Run all tests (Python + JavaScript)just test-python [ARGS]- Run Python tests with optional argumentsjust test-js- Run JavaScript tests (using Vitest)just coverage- Run tests with coverage reportjust typecheck- Run mypy type checker
Code Quality
just lint- Check code style with ruffjust lint-fix- Fix code style issuesjust pre-commit- Run pre-commit hooks on all filesjust pre-commit-install- Install pre-commit hooks
Documentation
just docs-build- Build documentationjust docs-openapi- Generate OpenAPI schemajust docs-clean- Clean documentation build
Deployment
just deploy-staging- Deploy to staging environmentjust deploy-production- Deploy to production (with confirmation)
Utilities
just status- Show project and service statusjust check-ports- Check if required ports are availablejust cleanup- Kill leftover processesjust python-version- Show current Python versionjust notebook- Start Jupyter notebookjust jupyterlab- Start JupyterLab
Legacy commands.py
The original commands.py is still available for compatibility:
python commands.py [COMMAND] [OPTIONS]
Available commands include createuser, syncservices, test, docs, and others. Run python commands.py --help for the full list.
Commands In Detail
syncservices
This command syncs the services from the filesystem with the services in the database. If a service is in the filesystem but not in the database, it will be added to the database and if it's in the database but not in the filesystem, it will be removed.
This command does not take any arguments.
# Using just (recommended)
just syncservices
# Or using commands.py
python commands.py syncservices
createuser
Creates a new user in the system. Username and password can be set via environment variables (useful for automation with Ansible) or interactively via the command line.
# Using just (recommended)
just createuser
# Or using commands.py
python commands.py createuser
Running Tests
The project uses pytest for Python tests and Vitest for JavaScript/TypeScript tests.
# Run all tests
just test
# Run Python tests only
just test-python
just test-python tests/unit # Run specific test directory
# Run JavaScript tests only
just test-js
# Run with coverage
just coverage