Configuration Guide

January 17, 2026 · View on GitHub

Complete reference for configuring LazyCurl.

Table of Contents


Configuration Files

LazyCurl uses a two-tier configuration system:

File Locations

TypeLocationPurpose
Global~/.config/lazycurl/config.yamlUser preferences, theme, keybindings
Workspace.lazycurl/config.yamlProject-specific settings

Priority

Workspace settings override global settings when both are defined.


Global Configuration

The global configuration file (~/.config/lazycurl/config.yaml) contains user-wide settings.

Full Example

# Theme configuration
theme:
  name: "catppuccin-mocha"
  primary_color: "#b4befe"
  secondary_color: "#89b4fa"
  accent_color: "#f5c2e7"
  border_color: "#45475a"
  active_color: "#a6e3a1"

# Keybindings (vim-style)
keybindings:
  quit: ["q"]
  navigate_left: ["h"]
  navigate_right: ["l"]
  navigate_up: ["k"]
  navigate_down: ["j"]
  select: ["enter", "space"]
  back: ["esc"]
  new_request: ["n"]
  send_request: ["ctrl+s"]
  save_request: ["ctrl+w"]
  delete_request: ["d"]
  toggle_envs: ["e"]

# Recent workspaces list
workspaces:
  - "/home/user/projects/api-project"
  - "/home/user/projects/backend"

# Last opened workspace
last_workspace: "/home/user/projects/api-project"

# Global environments (available in all workspaces)
global_environments:
  common:
    name: "Common"
    description: "Shared variables"
    variables:
      api_version: "v1"
      timeout: "30"

Configuration Options

Theme Options

OptionTypeDefaultDescription
namestring"dark"Theme name identifier
primary_colorhex"#b4befe"Primary UI color (Lavender)
secondary_colorhex"#89b4fa"Secondary UI color (Blue)
accent_colorhex"#f5c2e7"Accent highlights (Pink)
border_colorhex"#45475a"Border color (Surface0)
active_colorhex"#a6e3a1"Active state color (Green)

Workspace Configuration

The workspace configuration file (.lazycurl/config.yaml) contains project-specific settings.

Full Example

# Workspace name (displayed in status bar)
name: "My API Project"

# Optional description
description: "REST API for e-commerce platform"

# Default environment to activate on startup
default_env: "development"

# Collection files to load (optional, loads all if empty)
collections:
  - "api.json"
  - "admin.json"

Configuration Options

OptionTypeDefaultDescription
namestring"My Workspace"Workspace display name
descriptionstring""Optional description
default_envstring""Environment to activate on startup
collections[]string[]Specific collections to load

Workspace Directory Structure

your-project/
└── .lazycurl/
    ├── config.yaml           # Workspace configuration
    ├── collections/          # Request collections
    │   ├── api.json
    │   └── admin.json
    └── environments/         # Environment files
        ├── development.json
        ├── staging.json
        └── production.json

Theme Configuration

LazyCurl uses the Catppuccin Mocha color palette by default.

Default Colors

ElementColor NameHex CodeUsage
PrimaryLavender#b4befeSelection, active elements
SecondaryBlue#89b4faSelected text, links
SuccessGreen#a6e3a1Success states, GET method
WarningPeach#fab387Warnings, POST method
ErrorRed#f38ba8Errors, DELETE method
TextWhite#cdd6f4Primary text
SubtextGray#a6adc8Secondary text
SurfaceDark#313244Panel backgrounds
BaseDarkest#1e1e2eMain background

HTTP Method Colors

MethodColorHex Code
GETGreen#a6e3a1
POSTPeach#fab387
PUTBlue#89b4fa
PATCHMauve#cba6f7
DELETERed#f38ba8
HEADGreen#a6e3a1
OPTIONSYellow#f9e2af

Custom Theme Example

theme:
  name: "custom-dark"
  primary_color: "#7c3aed"    # Purple
  secondary_color: "#06b6d4"  # Cyan
  accent_color: "#f59e0b"     # Amber
  border_color: "#374151"     # Gray
  active_color: "#10b981"     # Emerald

Keybindings Configuration

All keybindings are fully customizable. Each binding accepts an array of keys.

Default Keybindings

keybindings:
  # Application control
  quit: ["q"]

  # Navigation
  navigate_left: ["h"]
  navigate_right: ["l"]
  navigate_up: ["k"]
  navigate_down: ["j"]

  # Selection
  select: ["enter"]
  back: ["esc"]

  # Actions
  new_request: ["n"]
  send_request: ["ctrl+s"]
  save_request: ["ctrl+w"]
  delete_request: ["d"]

  # Panel focus
  focus_collections: []
  focus_request: []
  focus_response: []

  # Toggles
  toggle_envs: ["e"]

Key Format

FormatExampleDescription
Single key"a", "n", "1"Single character
Control combo"ctrl+s", "ctrl+c"Ctrl + key
Shift combo"shift+tab"Shift + key
Special keys"enter", "esc", "tab"Named special keys
Function keys"f1", "f12"Function keys
Arrow keys"up", "down", "left", "right"Arrow keys

Multiple Keys Example

keybindings:
  # Multiple keys for same action
  select: ["enter", "space", "l"]
  navigate_up: ["k", "up"]
  navigate_down: ["j", "down"]
  quit: ["q", "ctrl+c"]

Emacs-Style Example

keybindings:
  quit: ["ctrl+x ctrl+c"]
  navigate_left: ["ctrl+b"]
  navigate_right: ["ctrl+f"]
  navigate_up: ["ctrl+p"]
  navigate_down: ["ctrl+n"]
  select: ["enter"]
  back: ["ctrl+g"]
  new_request: ["ctrl+x n"]
  send_request: ["ctrl+c ctrl+c"]
  save_request: ["ctrl+x ctrl+s"]

Environment Variables

System Environment Variables

LazyCurl respects these system environment variables:

VariableDescription
VISUALPrimary external editor (preferred for GUI editors)
EDITORFallback external editor (used if VISUAL not set)
LAZYCURL_CONFIGOverride global config path
LAZYCURL_WORKSPACEOverride workspace path
HOMEUser home directory for config location

External Editor Configuration

LazyCurl uses the $VISUAL and $EDITOR environment variables to determine which editor to use when pressing Ctrl+E in INSERT mode. The detection order is:

  1. $VISUAL (preferred - designed for graphical/full-screen editors)
  2. $EDITOR (fallback - traditional editor variable)
  3. Auto-detection of common editors: nano, vi

Supported Editors:

EditorTerminalConfiguration Example
Vim/NeovimYesexport VISUAL="vim" or export VISUAL="nvim"
NanoYesexport VISUAL="nano"
EmacsYesexport VISUAL="emacs -nw"
MicroYesexport VISUAL="micro"
VS CodeNoexport VISUAL="code --wait"
Sublime TextNoexport VISUAL="subl --wait"
ZedNoexport VISUAL="zed --wait"

Important: GUI editors (VS Code, Sublime, etc.) require a --wait flag to block until the file is closed.

Setting Environment Variables

# Linux/macOS - Add to ~/.bashrc or ~/.zshrc
export VISUAL="vim"                    # For terminal editor
export VISUAL="code --wait"            # For VS Code (wait mode required)
export EDITOR="nano"                   # Fallback if VISUAL not set

# Windows PowerShell - Add to $PROFILE
$env:VISUAL = "code --wait"
$env:EDITOR = "notepad"

Configuration Tips

1. Start with Defaults

LazyCurl works out of the box. Only customize what you need:

# Minimal config - just change the theme
theme:
  name: "my-theme"
  primary_color: "#7c3aed"

2. Version Control Workspace Config

Add .lazycurl/ to your git repository to share workspace settings:

# .gitignore - keep environments private
.lazycurl/environments/*.json
!.lazycurl/environments/example.json

3. Use Global Environments for Common Variables

Define shared variables in global config:

global_environments:
  common:
    variables:
      api_version: "v1"
      user_agent: "LazyCurl/1.0"

4. Per-Project Settings

Keep project-specific settings in workspace config:

name: "Production API"
default_env: "production"

Troubleshooting

Config Not Loading

  1. Check file permissions: ls -la ~/.config/lazycurl/
  2. Validate YAML syntax: cat ~/.config/lazycurl/config.yaml | yaml
  3. Check for typos in key names

Keybindings Not Working

  1. Ensure correct format: ["key"] not "key"
  2. Check for conflicts with terminal shortcuts
  3. Verify key names are lowercase

Theme Colors Not Applying

  1. Ensure hex format: "#RRGGBB" with quotes
  2. Check terminal supports 256 colors
  3. Verify terminal theme doesn't override

Reset to Defaults

# Backup and remove global config
mv ~/.config/lazycurl/config.yaml ~/.config/lazycurl/config.yaml.bak

# Remove workspace config
mv .lazycurl/config.yaml .lazycurl/config.yaml.bak

# LazyCurl will recreate defaults on next run