Requirements
- Python 3.10 or later
- No external dependencies (stdlib only)
Install
Development setup
To work on contree-cli itself:Authenticate
All ConTree API calls require a bearer token and a project ID.Save credentials
Get an API token and project ID from your ConTree project, then save them:- Token — entered securely (no echo)
- Project ID — your project identifier
~/.config/contree/auth.ini. If a profile already exists you will be
prompted to confirm; use -y to skip the prompt.
Resolution order for each field during contree auth (first match wins):
-
CLI flag (
--token,--url,--project) -
Environment variables, in order:
- token:
CONTREE_TOKEN, thenNEBIUS_API_KEY - URL:
CONTREE_URL - project:
CONTREE_PROJECT, thenNEBIUS_AI_PROJECT
- token:
- Interactive prompt
contree auth picks them up automatically, no interactive
prompts needed:
Named profiles
Store multiple tokens for different projects or environments:Token from environment
CONTREE_TOKEN and NEBIUS_API_KEY are read only by contree auth
during profile registration; runtime commands always read credentials
from the saved profile. To bootstrap a profile entirely from environment
variables, run auth non-interactively:
Inline token
Pass--token to any command to override the saved profile for a single
invocation:
You’re authenticated. Next: Your First Sandbox.