Skip to content

contox init

Initialize Contox in your project directory. This creates a .contox.json configuration file and auto-generates or updates CLAUDE.md with the Contox memory protocol.

Usage

bash
contox init -t <teamId> [-p <projectId>] [-n <name>]

Options

FlagDescriptionRequiredDefault
-t, --team <teamId>Team ID to associate the project withYes--
-p, --project <projectId>Link to an existing project by its IDNo--
-n, --name <name>Create a new project with this nameNo--

Behavior

The command behavior depends on which optional flags you provide:

  • -p provided: Links the current directory to the specified existing project.
  • -n provided: Creates a brand new project with the given name and links it.
  • Neither -p nor -n: Lists all available projects in the team so you can choose one interactively.

Examples

Create a new project:

bash
contox init -t team_xyz -n "My Web App"

Link to an existing project:

bash
contox init -t team_xyz -p proj_abc123

Browse and choose from existing projects:

bash
contox init -t team_xyz

What it creates

.contox.json in your project root:

json
{
  "teamId": "team_xyz",
  "projectId": "proj_abc123",
  "projectName": "My Web App"
}

CLAUDE.md is auto-generated or updated with the Contox memory protocol section. If a CLAUDE.md already exists, Contox inserts its content between <!-- contox:start --> and <!-- contox:end --> markers, preserving any of your own content outside those markers.

Notes

  • You must be logged in (contox login) before running init.
  • The .contox.json file should be committed to version control so all team members share the same project binding.
  • The CLAUDE.md file is used by Claude Code to automatically load the memory protocol. Other AI tools can use contox memory instead.