Skip to content

Latest commit

 

History

History
165 lines (121 loc) · 3.94 KB

SHORTCUTS.md

File metadata and controls

165 lines (121 loc) · 3.94 KB

Custom Shortcuts

Camp loads navigation paths and shortcuts from .campaign/settings/jumps.yaml.

For the broader .campaign/settings/ layout, including fresh.yaml, pins.json, allowlist.json, and .campaign/watchers.yaml, see campaign-settings-files.md.

camp init creates that file with the current default paths and built-in shortcuts. If you want to add or override shortcuts for a specific camp, edit jumps.yaml.

Configuration

Shortcut entries live under the shortcuts: key in .campaign/settings/jumps.yaml:

shortcuts:
  api:
    path: "projects/api-service"
    description: "Jump to the API service"

  build:
    command: "just build"
    description: "Build all projects"

  deploy:
    command: "just deploy staging"
    workdir: "projects/api-service"
    description: "Deploy the API service"

For the full scaffolded file shape, initialize a fresh camp with camp init and inspect .campaign/settings/jumps.yaml directly.

Shortcut Types

Navigation shortcuts

Navigation shortcuts define a relative path from the camp root:

shortcuts:
  api:
    path: "projects/api-service"
    description: "Jump to the API service"

Use them with:

camp go api
cgo api

Command shortcuts

Command shortcuts execute a shell command:

shortcuts:
  test:
    command: "just test"
    description: "Run the test suite"

Use them with:

camp run test

Command shortcuts with a working directory

Add workdir when the command should run from a specific directory:

shortcuts:
  deploy:
    command: "just deploy staging"
    workdir: "projects/api-service"
    description: "Deploy the API service"

Use them with:

camp run deploy

Built-in shortcuts

These defaults are written by camp init and can be overridden per camp:

Shortcut Path Notes
p projects/ navigation plus command expansion
f festivals/ navigation plus command expansion
i .campaign/intents/ navigation plus command expansion
wt projects/worktrees/ navigation plus command expansion
w workflow/ navigation only
d docs/ navigation only
du dungeon/ navigation only
r workflow/reviews/ navigation only
de workflow/design/ navigation only
ex workflow/explore/ navigation only
settings .campaign/ navigation only
cfg .campaign/ navigation plus command expansion

Use camp idea to capture and browse ideas, and cgo i to open their directory.

Matching the dungeon path

New camps scaffold .dungeon/. If cgo du reports that dungeon/ is missing, set both paths.dungeon and shortcuts.du.path to .dungeon/ in .campaign/settings/jumps.yaml. Keep the other paths and shortcuts in that file:

paths:
  dungeon: .dungeon/
shortcuts:
  du:
    path: .dungeon/
    description: Jump to archived work

Listing shortcuts

View the current shortcut set with:

camp shortcuts
camp sc

Passing arguments to command shortcuts

Additional arguments are appended to the configured command:

camp run test -- --verbose
camp run deploy -- production

Field Reference

Field Type Description
path string Relative path used by camp go / cgo
command string Shell command used by camp run
workdir string Optional working directory relative to camp root
description string Optional help text shown in shortcut listings
concept string Optional command-group expansion target

Shortcuts with both path and command

A shortcut can define both path and command:

shortcuts:
  api-dev:
    path: "projects/api-service"
    command: "just dev"
    description: "API development shortcut"
  • camp go api-dev navigates to projects/api-service
  • camp run api-dev runs just dev