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
| Flag | Description | Required | Default |
|---|---|---|---|
-t, --team <teamId> | Team ID to associate the project with | Yes | -- |
-p, --project <projectId> | Link to an existing project by its ID | No | -- |
-n, --name <name> | Create a new project with this name | No | -- |
Behavior
The command behavior depends on which optional flags you provide:
-pprovided: Links the current directory to the specified existing project.-nprovided: Creates a brand new project with the given name and links it.- Neither
-pnor-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 runninginit. - The
.contox.jsonfile should be committed to version control so all team members share the same project binding. - The
CLAUDE.mdfile is used by Claude Code to automatically load the memory protocol. Other AI tools can usecontox memoryinstead.