CLI Tool
Current guide to the TeamDay CLI for managing agents, workspaces, MCP servers, secrets, files, chats, jobs, generated media, resources, and scheduled missions.
TeamDay CLI
The TeamDay CLI lets operator agents and humans configure TeamDay from a terminal. Use it for local setup, production operations, workspace files, MCP server declarations, service-token automation, and scheduled missions.
The repo-local command is the most reliable form:
bun run apps/cli/src/index.ts --helpIf you have linked or installed the CLI globally, replace bun run apps/cli/src/index.ts with teamday.
For copy-pasteable agent workflows inside a cloned repo, define a shell alias:
alias teamday-local='bun run apps/cli/src/index.ts'
teamday-local --helpMost read commands support --json. Operator agents should prefer --json for inspection and scripting.
Use group help to discover a command family before choosing a leaf command:
teamday workspaces --help
teamday workspaces repos --help
teamday missions --help
teamday mcp setup --help
teamday resources --helpInstall
git clone https://github.com/TeamDay-AI/teamday.git
cd teamday
bun install
bun run apps/cli/src/index.ts --helpAuthentication
The CLI target lives in ~/.teamday/config.json. Always confirm the active server and organization before changing production data.
teamday whoamiUse magic-link login for normal interactive use:
teamday login [email protected] --server=https://app.teamday.aiUse dev login only against local development servers with DEV_AUTH=1:
teamday login --dev [email protected] --server=http://localhost:8787For automation and local operator agents, store a service token:
teamday token "tdk_your_token_here"
teamday whoamiDo not paste full service tokens into prompts, transcripts, logs, or documentation.
Workspaces
Workspaces are the operating context for files, projects, repos, jobs, chats, and scheduled work.
teamday workspaces list
teamday workspaces create --name="Engineering"
teamday workspaces select <workspace-id>
teamday workspaces update <workspace-id> --name="Growth"
teamday workspaces delete <workspace-id>Projects:
teamday workspaces projects list
teamday workspaces projects <workspace-id> list
teamday workspaces projects <workspace-id> create --name="Q2 Launch"Repositories:
teamday workspaces repos list --workspace-id=<workspace-id>
teamday workspaces repos add --remote=https://github.com/acme/app.git --workspace-id=<workspace-id>
teamday workspaces repos clone --remote=https://github.com/acme/app.git --workspace-id=<workspace-id>
teamday workspaces repos delete <repo-id> --workspace-id=<workspace-id>Agents
Agents are the technical objects behind AI employees. They hold role, prompt, model, tool tags, MCP tags, workspace defaults, and filesystem path settings.
teamday agents list
teamday agents show <agent-id>
teamday agents create \
--name="Release Reviewer" \
--role="Engineering release reviewer" \
--system-prompt="Review release changes, identify risks, and produce an approval checklist." \
--workspace-id=<workspace-id>
teamday agents update <agent-id> --model=claude-sonnet-4-6
teamday agents delete <agent-id>Discover the create contract:
teamday agents create --helpAttach MCP servers and skills to an agent:
teamday agents add-mcp <agent-id> google-search-console
teamday agents remove-mcp <agent-id> google-search-console
teamday agents add-skill <agent-id> research-assistant code-reviewer
teamday agents remove-skill <agent-id> research-assistant
teamday agents attach-all-skills <agent-id> --scope=orgSend a message to an agent:
teamday chat <agent-id> "Review the latest release notes and list blocking risks."List and open chats:
teamday chats list
teamday chats list --agent-id=<agent-id>
teamday chats open <chat-id>MCP Servers
MCP servers connect agents to external tools and data. Use mcp setup for supported presets, or mcp upsert for custom MCP servers.
teamday mcp list
teamday mcp show google-search-console
teamday mcp enable google-search-console
teamday mcp disable google-search-console
teamday mcp attach google-search-console <agent-id>
teamday mcp detach google-search-console <agent-id>Discover the custom MCP contract:
teamday mcp upsert --helpSupported setup presets:
teamday mcp setup google-search-console --from=service-account.json --agent=<agent-id>
teamday mcp setup ahrefs --token=<ahrefs-token> --agent=<agent-id>
teamday mcp setup google-analytics --from=service-account.json --agent=<agent-id>
teamday mcp setup bigquery --project=<project-id> --from=service-account.json --agent=<agent-id>
teamday mcp setup google-ads --credentials-json=<json> --developer-token=<token> --agent=<agent-id>
teamday mcp setup linkedin --client-id=<id> --client-secret=<secret> --agent=<agent-id>Custom MCP server:
teamday mcp upsert \
--name=internal-api \
--transport=http \
--url=https://mcp.example.com \
--agent=<agent-id>Secrets
Secrets are organization-owned and injected only through approved runtime paths.
teamday secrets list
teamday secrets put GSC_SERVICE_ACCOUNT_JSON --from=service-account.json
teamday secrets put AHREFS_MCP_TOKEN "$AHREFS_MCP_TOKEN"
teamday secrets delete AHREFS_MCP_TOKENMissions
Missions are scheduled work. Use them when work should run on the server instead of depending on an open chat.
teamday missions list
teamday missions show <mission-id>
teamday missions create \
--title="Weekly Release Risk Review" \
--description="Review merged work and save a release-risk checklist." \
--agent-id=<agent-id> \
--workspace-id=<workspace-id> \
--schedule-text="Every Monday at 9:00" \
--task-title="Review this week's release"
teamday missions update <mission-id> --status=paused
teamday missions task-create <mission-id> --title="Check launch blockers"
teamday missions task-update <mission-id> <task-id> --status=doneDiscover mission creation and start-work contracts:
teamday missions create --help
teamday missions start --helpUse --schedule-text for a human-readable cadence label, or --schedule-cron with --schedule-timezone when the server scheduler needs an exact cron expression.
Files And Knowledge
Use files for workspace files and knowledge for workspace knowledge paths.
teamday files list / --workspace-id=<workspace-id>
teamday files search "release risk" --workspace-id=<workspace-id>
teamday files read reports/latest.md --workspace-id=<workspace-id>
teamday files write reports/latest.md --from=report.md --workspace-id=<workspace-id>
teamday files mkdir reports --workspace-id=<workspace-id>
teamday files mv reports/draft.md reports/final.md --workspace-id=<workspace-id>
teamday files rm reports/old.md --workspace-id=<workspace-id>
teamday knowledge list --workspace-id=<workspace-id>
teamday knowledge search "pricing" --workspace-id=<workspace-id>
teamday knowledge write agents/release-reviewer.md --from=agent-notes.md --workspace-id=<workspace-id>Discover file write flags:
teamday files write --help
teamday knowledge write --helpJobs, Media, And Resources
Inspect jobs:
teamday jobs list
teamday jobs list --status=running --limit=20
teamday jobs show <job-id>
teamday jobs events <job-id>Generate media:
teamday generate --kind=image "Product dashboard hero image" --aspect=16:9
teamday generate --kind=video "Short product walkthrough" --aspect=16:9 --duration-s=8
teamday assets listManage reusable resources:
teamday resources list --kind=skill
teamday resources put release-review --kind=skill --scope=org --from=release-review-skill.md
teamday resources delete release-review
teamday skills list
teamday tools listDiscover resource upload flags:
teamday resources put --helpRaw API Calls
Use api for endpoints that do not yet have a first-class CLI command:
teamday api GET /api/workspaces
teamday api POST /api/missions --body='{"title":"Manual check"}'Operator Checklist
Before a local operator agent changes TeamDay production data:
- Run
teamday whoami. - Confirm the server is the intended environment.
- Confirm the organization is the intended organization.
- Prefer
--jsonfor scripted reads. - Keep full service tokens out of logs and chat.
- Run a small smoke command before scheduling recurring work.
Cold-Agent Quickstart
This sequence is the minimum self-service path for an operator agent in a cloned repo. It uses the repo-local alias so no global binary is required.
alias teamday-local='bun run apps/cli/src/index.ts'
teamday-local whoami --json
teamday-local workspaces list --json
teamday-local workspaces create --name="Agent Evaluation" --json
teamday-local agents create \
--name="Evaluation Agent" \
--role="Platform evaluator" \
--system-prompt="Evaluate the platform, run small checks, and report exact blockers." \
--workspace-id=<workspace-id> \
--json
teamday-local chat <agent-id> "Run a small readiness check and report blockers."
teamday-local chats list --agent-id=<agent-id> --json
teamday-local missions create \
--title="Weekly Agent Readiness Check" \
--description="Run the readiness check and save blockers." \
--workspace-id=<workspace-id> \
--agent-id=<agent-id> \
--schedule-cron="0 9 * * MON" \
--schedule-timezone="Europe/Bratislava" \
--task-title="Run readiness check" \
--json