Install SkillFlaw
SkillFlaw provides two public installation paths:
- Docker Compose for a complete local product stack
- Source installation for development and debugging
Repository clone
Before using either installation path, clone the repository locally:
_10git clone https://github.com/cwinux/skillflaw.git_10cd skillflaw
Install with Docker Compose
Use this path for a complete local product stack.
Prerequisites
- Docker Engine / Docker Desktop and Docker Compose are installed
- No separate local PostgreSQL or Redis setup is required for the default compose path
- The default compose path generates and persists the secret-key file automatically on first startup, so you do not need to prepare
SKILLFLAW_SECRET_KEY_FILEseparately - Create
.envonly when you want to pass extra runtime variables or local overrides to the backend container
Steps
-
Clone the repository if you have not already done so.
-
macOS:
_10git clone https://github.com/cwinux/skillflaw.git_10cd skillflaw -
Linux (Ubuntu/Debian):
_10git clone https://github.com/cwinux/skillflaw.git_10cd skillflaw
-
-
Optional: copy the repository-root
.env.example(next toREADME.mdandMakefile) to the repository-root.envif you want to provide extra runtime variables or local overrides.-
macOS:
_10cp .env.example .env -
Linux (Ubuntu/Debian):
_10cp .env.example .env
-
-
Start the stack:
_10docker compose -f docker/docker-compose.yml up -dOn first startup, Docker Compose runs the one-shot
secret_initservice, generates a high-entropy secret key file, and persists it in theskillflaw_secret_datavolume for backend reuse.The repository-root
.env(that is,skillflaw/.env, next toREADME.mdandMakefile) is optional in this path. Create it only when you want the backend container to read extra runtime variables or local overrides.In this Docker Compose path, you do not need to set
SKILLFLAW_SECRET_KEY_FILE,SKILLFLAW_DATABASE_URL,SKILLFLAW_CACHE_TYPE,SKILLFLAW_REDIS_HOST, orSKILLFLAW_REDIS_PORTin.envunless you intentionally override defaults. Compose already wires the backend to bundled PostgreSQL and Redis and provisions the default secret file automatically. -
On a fresh PostgreSQL volume, the database container initializes the database in this order:
This is handled automatically by the bundled PostgreSQL container and does not require a separate manually managed PostgreSQL or Redis setup for the default Compose path.
sql/skillflow.sqldata/postgresql/skillflaw_init_data.sql
-
Open the services:
- frontend:
http://localhost:3001 - backend health:
http://localhost:7860/health - docs:
http://localhost:3002
- frontend:
The compose stack starts frontend, backend, doc, redis, pgsql, and the one-shot secret_init bootstrap service. The backend reads /run/secrets/skillflaw_secret_key from the persistent skillflaw_secret_data volume.
Success check
Docker Compose installation is successful when all of the following are true:
docker compose -f docker/docker-compose.yml psshowspgsql,redis,backend,frontend, anddocrunning, whilesecret_inithas completed successfullyhttp://localhost:7860/healthreturns a healthy responsehttp://localhost:3001opens the SkillFlaw frontendhttp://localhost:3002opens the standalone docs site- you can sign in with the default admin account shown below
Common questions
Do I need .env for the default Docker Compose path?
No. .env is optional in the default compose workflow. Create it only when you want to override runtime variables that the backend container should read. The file location is skillflaw/.env at the repository root, not docker/.env.
Do I need to run make init_db when I use Docker Compose?
No. make init_db is the source-installation database initialization entry. In the default compose workflow, the pgsql container initializes a fresh PostgreSQL volume automatically with sql/skillflow.sql and data/postgresql/skillflaw_init_data.sql.
Why does docker compose ps show secret_init as exited?
That is expected. secret_init is a one-shot bootstrap service that runs only to create the default secret-key file inside skillflaw_secret_data on first startup. After it finishes successfully, it remains exited and does not need to stay running.
Install and deploy the docs service
SkillFlaw docs are delivered as a standalone Docusaurus site.
Deploy the docs service on a dedicated port, container, or hostname, and keep it mounted at /.
Docs service
Choose the docs workflow that matches your goal:
make docs_dev: start the Docusaurus development server with hot reload while editing docs sourcemake docs_build: build root-based static output intodocs/buildmake docs_serve: rebuild standalone docs output and immediately start the local static docs servicemake docs_start_only: start an existing built docs directory without rebuilding it first
For hot-reload authoring, use:
_10make docs_dev docs_port=3001
For a production-style static build, run:
_10make docs_build
This builds root-based static output into docs/build for standalone hosting.
To rebuild and immediately serve standalone docs output, use:
_10make docs_serve docs_port=3001
This rebuilds standalone docs output and serves it on the selected port. With docs_port=3001, the local entry is http://localhost:3001/, and the Chinese homepage is http://localhost:3001/zh-CN.
If you already have a valid build and only want to start docs without rebuilding, use:
_10make docs_start_only docs_port=3001 docs_start_dir=build
Set docs_start_dir to the existing build directory. For example, after make docs_build, use docs/build.
For a dedicated docs domain, route that hostname directly to the standalone docs service and keep the site mounted at /.
For the full standalone docs deployment workflow and command reference, see Build and serve the documentation site.
Default admin account
After the repository initialization SQL has completed, the default admin account is:
- username:
admin - password:
Skillflaw@123321
Python package distribution status
SkillFlaw does not currently provide a public PyPI package for uv pip install skillflaw.
For a runnable environment today, use one of these paths:
- Docker Compose, when you want the complete local product stack;
- Source installation, when you want to run, debug, or develop from this repository.
Install from source
Use this path to contribute to the repository, modify frontend code, update docs, or debug backend logic.
Source-installation prerequisites
- OS: macOS or Linux; Windows users should prefer WSL2 or a Dev Container
- Git: latest stable version
- make: available in
PATH - Python:
3.12recommended, officially supported range>=3.10,<3.14 - uv:
>=0.4 - Node.js: 22 LTS recommended
- npm:
>=10.9 - PostgreSQL: required, recommended
16, minimum compatible14 - Redis: required only when
SKILLFLAW_CACHE_TYPE=redis, recommended7, minimum compatible6 yarn 1.22.xwhen you need the local docs workflow
The source-installation path requires a real secret-key file:
- provide it through
SKILLFLAW_SECRET_KEY_FILE - keep the file content as one line of high-entropy random text
- keep it outside the repository
- do not commit it to version control
The frontend package accepts node >=20.19.0, but repository documentation and docs tooling are aligned with Node.js 22 LTS. For consistent frontend and docs workflows, use Node.js 22 LTS.
Example installation commands for macOS
_16# Install Homebrew (if not installed)_16/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"_16_16# Install Git, make, Python, uv, Node.js, PostgreSQL, Redis_16brew install git make python@3.12 uv node@22 postgresql@16 redis_16_16# npm is included with node@22_16# Check versions_16git --version_16make --version_16python3 --version_16uv --version_16node --version_16npm --version_16psql --version_16redis-server --version
Example installation commands for Linux (Ubuntu/Debian)
_36# Update package manager_36sudo apt update_36_36# Install base dependencies_36sudo apt install -y git make python3 python3-venv python3-pip curl build-essential ca-certificates gnupg lsb-release_36_36# Install uv (using the official installer)_36curl -LsSf https://astral.sh/uv/install.sh | sh_36export PATH="$HOME/.local/bin:$PATH"_36_36# Install Node.js 22 LTS (using NodeSource official script)_36curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -_36sudo apt install -y nodejs_36_36# Install PostgreSQL 16 (using the official PGDG repository)_36sudo install -d /usr/share/postgresql-common/pgdg_36sudo curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc_36sudo sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(. /etc/os-release && echo $VERSION_CODENAME)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'_36sudo apt update_36sudo apt install -y postgresql-16_36_36# Install Redis 7 (using the official Redis repository)_36curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg_36echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(. /etc/os-release && echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/redis.list > /dev/null_36sudo apt update_36sudo apt install -y redis_36_36# Check versions_36git --version_36make --version_36python3 --version_36uv --version_36node --version_36npm --version_36psql --version_36redis-server --version
Steps
-
Clone the repository if you have not already done so.
-
macOS:
_10git clone https://github.com/cwinux/skillflaw.git_10cd skillflaw -
Linux (Ubuntu/Debian):
_10git clone https://github.com/cwinux/skillflaw.git_10cd skillflaw
-
-
Make sure the local toolchain is ready:
-
Python
>=3.10,<3.14(recommended:3.12) -
uv >=0.4 -
Node.js
22 LTSwith npm>=10.9 -
make -
macOS:
_10python3 --version_10uv --version_10node --version_10npm --version_10make --version -
Linux (Ubuntu/Debian):
_10python3 --version_10uv --version_10node --version_10npm --version_10make --version
-
-
Copy
.env.exampleto.env.-
macOS:
_10cp .env.example .env -
Linux (Ubuntu/Debian):
_10cp .env.example .env
-
-
Configure at least:
SKILLFLAW_DATABASE_URLSKILLFLAW_SECRET_KEY_FILE
If you want to use Redis cache, also configure:
SKILLFLAW_CACHE_TYPE=redisSKILLFLAW_REDIS_HOSTSKILLFLAW_REDIS_PORT
For the highest source-installation success rate, point
SKILLFLAW_DATABASE_URLto a reachable PostgreSQL16instance. If Redis cache is enabled, point Redis settings to a reachable Redis7instance. PostgreSQL14and Redis6may work in some environments, but they are not the formally documented baseline.-
macOS:
_10cat >> .env <<EOF_10SKILLFLAW_SECRET_KEY_FILE=$HOME/.skillflaw/secret_key_10SKILLFLAW_DATABASE_URL=postgresql://<user>:<password>@<host>:<port>/<database>_10SKILLFLAW_CACHE_TYPE=redis_10SKILLFLAW_REDIS_HOST=<redis_host>_10SKILLFLAW_REDIS_PORT=<redis_port>_10EOF -
Linux (Ubuntu/Debian):
_10cat >> .env <<EOF_10SKILLFLAW_SECRET_KEY_FILE=$HOME/.skillflaw/secret_key_10SKILLFLAW_DATABASE_URL=postgresql://<user>:<password>@<host>:<port>/<database>_10SKILLFLAW_CACHE_TYPE=redis_10SKILLFLAW_REDIS_HOST=<redis_host>_10SKILLFLAW_REDIS_PORT=<redis_port>_10EOF
-
Install dependencies:
-
macOS:
_10make init -
Linux (Ubuntu/Debian):
_10make init
-
-
Initialize the database:
-
macOS:
_10make init_db -
Linux (Ubuntu/Debian):
_10make init_db
make initinstalls dependencies and prepares the environment.make init_dbcreates the target PostgreSQL database when needed, initializes schema, imports exported init data, and prepares the default admin account.If the database referenced by
SKILLFLAW_DATABASE_URLdoes not exist yet,make init_dbtries to create it automatically before loading schema and init data. The PostgreSQL user inSKILLFLAW_DATABASE_URLmust haveCREATE DATABASEpermission.If
SKILLFLAW_SECRET_KEY_FILEdoes not exist in an interactive session,make init_dbexplains the requirement, can generate the file, and writes the resolved path back into.env. -
-
Choose the startup path that matches your goal:
Development mode
-
macOS:
Terminal A:
_10make backendTerminal B:
_10make frontend -
Linux (Ubuntu/Debian):
Terminal A:
_10make backendTerminal B:
_10make frontend
make frontendstarts the frontend development server. The default local development entrypoints are:- frontend:
http://localhost:3000 - backend health:
http://localhost:7860/health
Production-style local validation
If you want to validate a runtime closer to the formal release shape from the source-install path, run this from the repository root:
-
macOS:
_10make run_cliIf you need a clean frontend rebuild before validation, run:
_10make run_clic -
Linux (Ubuntu/Debian):
_10make run_cliIf you need a clean frontend rebuild before validation, run:
_10make run_clic
In this mode, SkillFlaw builds the frontend static assets first and then serves the application through the backend. The default entrypoint is:
- application:
http://localhost:7860
If you want to validate a fuller product-grade deployment chain, Docker Compose is still the recommended path.
-
-
If you are editing docs, start the docs server as well:
-
macOS:
_10make docs_dev_10# or_10make docs_build_10# or_10make docs_serve docs_port=3001_10# or_10make docs_start_only docs_port=3001 docs_start_dir=build -
Linux (Ubuntu/Debian):
_10make docs_dev_10# or_10make docs_build_10# or_10make docs_serve docs_port=3001_10# or_10make docs_start_only docs_port=3001 docs_start_dir=build
-
Success check
Source installation is successful when all of the following are true:
make initfinishes without dependency errorsmake init_dbcompletes and initializes the admin accounthttp://localhost:7860/healthreturns a healthy response aftermake backend- in development mode,
http://localhost:3000opens the SkillFlaw frontend aftermake frontend - in production-style local validation mode,
http://localhost:7860opens the application aftermake run_cliormake run_clic - you can sign in with the default admin account shown above
For deployment-oriented details on initialization, exported init data, and compose behavior, see SkillFlaw deployment installation.
Optional runtime dependencies for Skill execution
OpenSandbox and OpenCode are not required to start the base frontend/backend platform. Prepare them before using Skill sandbox execution or AI-assisted features that depend on them:
- OpenSandbox is the default backend for Skill sandbox execution in SkillFlaw.
- OpenCode must be available on the server hosting the SkillFlaw backend when AI-assisted capability depends on
opencode.
OpenSandbox prerequisites
OpenSandbox can be either:
- a self-hosted OpenSandbox server that you operate yourself, or
- a SaaS OpenSandbox endpoint provided to your deployment.
In either form, the SkillFlaw backend must be able to reach it. SkillFlaw connects to OpenSandbox with these .env settings:
SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_DOMAINSKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_API_KEYSKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_PROTOCOLSKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_USE_SERVER_PROXYSKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_REQUEST_TIMEOUT_SECONDS
When you also need to align the runtime images used for Skill execution, check:
SKILLFLAW_SKILL_SANDBOX_PYTHON_IMAGESKILLFLAW_SKILL_SANDBOX_TYPESCRIPT_IMAGE
Containerized installation
- The repository-root
.envis read by the backend container, so OpenSandbox access settings must be written intoskillflaw/.env. SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_DOMAINmust be an address that is reachable from inside the backend container.- If OpenSandbox runs on the host machine, Docker Desktop setups typically need
host.docker.internal:8080or another container-reachable address instead oflocalhost:8080. - If OpenSandbox is provided by a peer container or a remote service, use that service name, routable IP, or hostname.
Example:
_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_DOMAIN=host.docker.internal:8080_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_PROTOCOL=http_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_API_KEY=_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY=false_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_REQUEST_TIMEOUT_SECONDS=600
Source installation
- When the backend runs directly on the host, keep the OpenSandbox settings in the repository-root
.envand point them to an address reachable from that host environment. - If OpenSandbox runs on the same host,
localhost:8080is a common configuration. - If OpenSandbox is remote or reachable through another network path, use the actual reachable host instead of assuming the loopback address will work.
Example:
_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_DOMAIN=localhost:8080_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_PROTOCOL=http_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_API_KEY=_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY=false_10SKILLFLAW_SKILL_SANDBOX_OPENSANDBOX_REQUEST_TIMEOUT_SECONDS=600
Starting a self-hosted OpenSandbox service
- If you use a self-hosted OpenSandbox service instead of SaaS, start OpenSandbox before starting SkillFlaw.
- The repository scripts and notes explicitly reference
opensandbox-serveras the service process name, so a self-hosted installation must at least expose that command. - If you change
~/.sandbox.toml,execd_image, or related runtime-image settings, restartopensandbox-serverbefore testing again.
_10opensandbox-server
OpenSandbox usage rules in SkillFlaw
- Keep the OpenSandbox service reachable from the SkillFlaw backend.
- Configure the Skill sandbox connection parameters before testing or running Skills.
- Use a sandbox image and runtime limits that match your Skill language and execution requirements.
- If you change the OpenSandbox runtime image or
execd_image, restart the OpenSandbox server so the new configuration takes effect.
OpenCode prerequisites
SkillFlaw invokes opencode run --pure --format json directly in the backend runtime. Install OpenCode in the same environment as the SkillFlaw backend, and ensure opencode is available in PATH before enabling AI-assisted Skill, Flow, or component workflows.
Containerized installation
- In the current Docker Compose path, the backend image is built locally from
docker/backend/Dockerfile, and that image already bundlesopencode. - The backend service in
docker/docker-compose.ymlis the only intended consumer of the repository-root.enventries namedSKILLFLAW_CONTAINER_OPENCODE_*. - On backend container startup, SkillFlaw reads the repository-root
.envand renders the container-side OpenCode runtime configuration from theSKILLFLAW_CONTAINER_OPENCODE_*variables. - These variables are only for the containerized backend's local OpenCode runtime; they are not outbound API parameters used by SkillFlaw itself.
- If any derived
SKILLFLAW_CONTAINER_OPENCODE_*setting is provided,SKILLFLAW_CONTAINER_OPENCODE_MODELis required and must use theprovider/modelformat. - For a custom provider, you typically also provide
SKILLFLAW_CONTAINER_OPENCODE_PROVIDER_ID,SKILLFLAW_CONTAINER_OPENCODE_PROVIDER_NAME,SKILLFLAW_CONTAINER_OPENCODE_PROVIDER_NPM, andSKILLFLAW_CONTAINER_OPENCODE_API_KEY. - SkillFlaw invokes
opencodefromsrc/lfx/srcso the local LFX AGENTS /opencode.jsonconfiguration chain is applied consistently.
Source installation
- Install
opencodein the same host environment where you runmake backend. - Configure the LLM provider, target model, and API key before starting SkillFlaw.
- In the source-install path, do not use the
SKILLFLAW_CONTAINER_OPENCODE_*variables; configure OpenCode directly in the host environment using OpenCode's own supported mechanism.
OpenCode usage rules in SkillFlaw
- Configure your OpenCode model/provider before starting AI-assisted features.
- Keep OpenCode available in non-interactive CLI mode, because SkillFlaw runs
opencode run --pure --format jsonand expects machine-readable output. - Use the same backend environment for SkillFlaw and OpenCode so that permission, model, and network settings stay consistent.
- When you debug OpenCode prompts in a repository-based workflow, prefer the repository rules in
AGENTS.mdand use file-based context input for long instructions or reference material.
SkillFlaw does not currently define dedicated OpenCode connection variables in its own .env, so provider, model, and key settings must be supplied through OpenCode's own supported configuration mechanism in the same source or container runtime.