locus init
Initialize Locus in a GitHub repository. Creates the .locus/ directory, config.json, labels, and project context files.
Initialize Locus in the current GitHub repository. This command sets up the directory structure, configuration, project context templates, GitHub labels, and .gitignore entries needed to use Locus.
Running locus init is idempotent. Re-running it updates the configuration without overwriting user-edited files like LOCUS.md.
Usage
locus initWhat It Does
The init command performs these steps in order:
Verify git repository -- confirms the current directory is a git repo.
Check GitHub CLI -- ensures
ghis installed and authenticated.Detect repo context -- reads the GitHub remote to determine
owner,repo, anddefaultBranch.Create
.locus/directory structure -- creates subdirectories for sessions, discussions, artifacts, plans, and logs.Generate
config.json-- writes default configuration with detected GitHub values. On re-init, existing AI, agent, sprint, and logging settings are preserved.Generate
LOCUS.md-- creates a template for project context that AI agents read before every task. Skipped if the file already exists.Create
.locus/memory/directory -- creates the structured memory system with category files (architecture.md,conventions.md,decisions.md,preferences.md,debugging.md). If a legacyLEARNINGS.mdexists, entries are automatically migrated and the file is deleted.Create GitHub labels -- ensures all Locus labels exist on the repository (priority, type, status, and
agent:managed).Update
.gitignore-- adds entries for Locus runtime files (config, sessions, logs, worktrees).
Directory Structure
After initialization, the .locus/ directory looks like this:
GitHub Labels
The following labels are created on the repository:
Priority
p:critical, p:high, p:medium, p:low
Type
type:feature, type:bug, type:chore, type:refactor, type:docs
Status
locus:queued, locus:in-progress, locus:in-review, locus:done, locus:failed
Agent
agent:managed
Prerequisites
A git repository with a GitHub remote
GitHub CLI (
gh) installed and authenticated (gh auth login)
Examples
Next Steps
After initializing:
Edit
.locus/LOCUS.mdto describe your project, tech stack, conventions, and development workflow.Create issues:
locus issue create "My first task"Plan a sprint:
locus plan "Build feature X"Start coding:
locus exec
Last updated