Skip to content

feat: create a project, blank or from a template - #15

Merged
ClayChipps merged 2 commits into
mainfrom
feat/project-create
Sep 21, 2026
Merged

ClayChipps merged 2 commits into
mainfrom
feat/project-create

Conversation

@ClayChipps

Copy link
Copy Markdown
Contributor

Summary

Adds simply gitlab project create and the matching gitlab_project_create MCP tool, so a project can be created from the terminal or by an agent — blank, or from a built-in or custom GitLab template.

Design record: docs/design/0008-project-create.md.

simply gitlab project create --name new-service --namespace platform/apps --template express
simply gitlab project create --name new-service --namespace platform/apps \
  --template service-skeleton --template-group platform/templates
simply gitlab project create --path new-service --template-project platform/templates/skeleton --dry-run

What it does

  • Template is optional. A plain --template is a built-in template. --custom-template, --template-group, or --template-project switch to a custom one and set use_custom_template for the caller; GitLab cannot tell the two apart by name, which is why the boolean exists.
  • Paths everywhere. --namespace, --template-group, and --template-project take an id or a full path. prepareProjectCreate in core resolves a path to the integer GitLab needs, under --dry-run too, so the printed body is exactly the one that would be sent. Numeric ids issue no request.
  • Refusals name the flag. A missing name and path, --template with --template-project, and --template-group or --custom-template without --template are refused before any request.
  • The async import is called out. The summary prints import_status, and both the command description and the tool description say a template's files arrive after the response and point at project view to poll.

Where it lives

  • Core: createProject and getNamespace on the client; projects.ts with buildProjectCreateBody, prepareProjectCreate, resolveNamespaceId, resolveGroupId, resolveProjectId. Exports pinned in index.test.ts and listed in the README.
  • CLI: packages/simply-gitlab/src/commands/gitlab/project/create.ts, a write with --dry-run and --body/--body-file.
  • MCP: gitlab_project_create, registered as a write and added to the pinned write list.
  • Guides: write-safety and MCP guides, and the MCP README, now count seven writes and carry the async-import caveat.
  • Regenerated CLI README and command-snapshot.json.

Testing

  • Core: body mapping, use_custom_template on each custom route and never for a built-in, raw-body merge, every refusal; path resolution through /namespaces, /groups, /projects; a refused combination costs no request; an answer without an id is refused.
  • CLI: numeric-id dry run sends nothing; a template group path resolves under dry run; the real call POSTs and returns the payload; refusals happen before any request; GITLAB_READ_ONLY refuses it.
  • MCP: catalogue cross-check against command-snapshot.json, and the write list.

pnpm run build and pnpm test pass across all three packages.

Left open

--wait to poll until the import finishes, and a project template list for discovering names — both in the design doc's open questions.

🤖 Generated with Claude Code

ClayChipps and others added 2 commits September 21, 2026 16:25
Adds `simply gitlab project create` and the matching `gitlab_project_create`
MCP tool. The body is built in core by `buildProjectCreateBody`, which sets
`use_custom_template` exactly when one of the three custom routes is chosen;
`prepareProjectCreate` resolves a namespace, template group, or template
project given as a path to the id GitLab needs, on a dry run too so the
printed body is the one that would be sent.

Design record: docs/design/0008-project-create.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ClayChipps
ClayChipps enabled auto-merge (squash) September 21, 2026 20:29
@ClayChipps
ClayChipps merged commit 0c49657 into main Sep 21, 2026
4 checks passed
@ClayChipps
ClayChipps deleted the feat/project-create branch September 21, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant