Skip to content

feat: add Click CLI with init subcommand #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ezyang
Copy link
Owner

@ezyang ezyang commented Mar 25, 2025

Stack from ghstack (oldest at bottom):

Let's use click to make codemcp a generic command line tool as well as MCP. For BC it should still launch the MCP server with no arguments but we will also add an 'init' subcommand that creates an empty codemcp.toml, init's a git repository, and makes an initial commit with these files.

5c3e88d  (Base revision)
1d06d21  Add Click import and other imports needed for CLI
1155f1a  Add init_codemcp_project function and Click CLI
670b226  Export CLI function from __init__.py
1842a58  Update __main__.py to use Click CLI
14d2d2c  Snapshot before codemcp change
f70e670  Update pyproject.toml to use cli function
af997d8  Add end-to-end test for init command
8302b2b  Snapshot before auto-format
1d91f4e  Auto-commit format changes
11bc401  Auto-commit lint changes
HEAD     Move subprocess import to the top of the init_codemcp_project function

codemcp-id: 209-feat-add-click-cli-with-init-subcommand

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Mar 25, 2025
Let's use click to make codemcp a generic command line tool as well as MCP. For BC it should still launch the MCP server with no arguments but we will also add an 'init' subcommand that creates an empty codemcp.toml, init's a git repository, and makes an initial commit with these files.

```git-revs
5c3e88d  (Base revision)
1d06d21  Add Click import and other imports needed for CLI
1155f1a  Add init_codemcp_project function and Click CLI
670b226  Export CLI function from __init__.py
1842a58  Update __main__.py to use Click CLI
14d2d2c  Snapshot before codemcp change
f70e670  Update pyproject.toml to use cli function
af997d8  Add end-to-end test for init command
8302b2b  Snapshot before auto-format
1d91f4e  Auto-commit format changes
11bc401  Auto-commit lint changes
HEAD     Move subprocess import to the top of the init_codemcp_project function
```

codemcp-id: 209-feat-add-click-cli-with-init-subcommand
ghstack-source-id: a8c3a95
Pull-Request-resolved: #203
[ghstack-poisoned]
@ezyang ezyang closed this in 7d8aeaf Mar 25, 2025
lion1991 pushed a commit to lion1991/codemcp that referenced this pull request Mar 25, 2025
Let's use click to make codemcp a generic command line tool as well as MCP. For BC it should still launch the MCP server with no arguments but we will also add an 'init' subcommand that creates an empty codemcp.toml, init's a git repository, and makes an initial commit with these files.

```git-revs
5c3e88d  (Base revision)
1d06d21  Add Click import and other imports needed for CLI
1155f1a  Add init_codemcp_project function and Click CLI
670b226  Export CLI function from __init__.py
1842a58  Update __main__.py to use Click CLI
14d2d2c  Snapshot before codemcp change
f70e670  Update pyproject.toml to use cli function
af997d8  Add end-to-end test for init command
8302b2b  Snapshot before auto-format
1d91f4e  Auto-commit format changes
11bc401  Auto-commit lint changes
HEAD     Move subprocess import to the top of the init_codemcp_project function
```

codemcp-id: 209-feat-add-click-cli-with-init-subcommand
ghstack-source-id: d75f5b7
Pull-Request-resolved: ezyang#203
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