From f2fe1414d65255a87ba925b31cd19c72d73de82f Mon Sep 17 00:00:00 2001 From: picoclaw Date: Sat, 28 Feb 2026 07:31:05 +0000 Subject: [PATCH] `README.md` updated explain PICOCLAW_CONFIG and PICOCLAW_HOME --- README.md | 25 +++++++++++++++++++++++++ pkg/config/defaults.go | 1 - 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b040d0605..009860d7e 100644 --- a/README.md +++ b/README.md @@ -623,6 +623,31 @@ Connect Picoclaw to the Agent Social Network simply by sending a single message Config file: `~/.picoclaw/config.json` +### Environment Variables + +You can override default paths using environment variables. This is useful for portable installations, containerized deployments, or running picoclaw as a system service. These variables are independent and control different paths. + +| Variable | Description | Default Path | +|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------|---------------------------| +| `PICOCLAW_CONFIG` | Overrides the path to the configuration file. This directly tells picoclaw which `config.json` to load, ignoring all other locations. | `~/.picoclaw/config.json` | +| `PICOCLAW_HOME` | Overrides the root directory for picoclaw data. This changes the default location of the `workspace` and other data directories. | `~/.picoclaw` | + +**Examples:** + +```bash +# Run picoclaw using a specific config file +# The workspace path will be read from within that config file +PICOCLAW_CONFIG=/etc/picoclaw/production.json picoclaw gateway + +# Run picoclaw with all its data stored in /opt/picoclaw +# Config will be loaded from the default ~/.picoclaw/config.json +# Workspace will be created at /opt/picoclaw/workspace +PICOCLAW_HOME=/opt/picoclaw picoclaw agent + +# Use both for a fully customized setup +PICOCLAW_HOME=/srv/picoclaw PICOCLAW_CONFIG=/srv/picoclaw/main.json picoclaw gateway +``` + ### Workspace Layout PicoClaw stores data in your configured workspace (default: `~/.picoclaw/workspace`): diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 6df20dd4e..9313623d1 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -27,7 +27,6 @@ func DefaultConfig() *Config { Agents: AgentsConfig{ Defaults: AgentDefaults{ Workspace: workspacePath, - RestrictToWorkspace: true, Provider: "", Model: "",