Skip to content

Commit 66e059d

Browse files
committed
chore: merge in main
2 parents 4b6608e + 47fd9e8 commit 66e059d

38 files changed

+1251
-1293
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'mycoder': patch
3+
'mycoder-agent': patch
4+
---
5+
6+
Add `--enableUserPrompt` command line option that defaults to true but can be set to false to disable the userPrompt tool for fully automated sessions.

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ permissions:
1313

1414
env:
1515
PNPM_VERSION: 10.2.1
16-
NODE_VERSION: 23
1716

1817
jobs:
1918
ci:
@@ -27,7 +26,8 @@ jobs:
2726

2827
- uses: actions/setup-node@v4
2928
with:
30-
node-version: ${{ env.NODE_VERSION }}
29+
node-version-file: .nvmrc
30+
cache: 'pnpm'
3131

3232
- name: Install dependencies
3333
run: pnpm install --frozen-lockfile
@@ -39,6 +39,9 @@ jobs:
3939
run: cd packages/agent && pnpm exec playwright install --with-deps chromium
4040

4141
- name: Test
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
4245
run: pnpm test
4346

4447
- name: Lint
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: MyCoder Issue Comment Action
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
env:
13+
PNPM_VERSION: 10.2.1
14+
15+
jobs:
16+
process-comment:
17+
runs-on: ubuntu-latest
18+
if: contains(github.event.comment.body, '/mycoder')
19+
steps:
20+
- name: Extract prompt from comment
21+
id: extract-prompt
22+
run: |
23+
COMMENT="${{ github.event.comment.body }}"
24+
if [[ "$COMMENT" =~ "/mycoder "(.+) ]]; then
25+
PROMPT="${BASH_REMATCH[1]}"
26+
elif [[ "$COMMENT" =~ "/mycoder" ]]; then
27+
# If just /mycoder with no text after, use a default prompt
28+
PROMPT="Please review this issue and suggest next steps."
29+
else
30+
echo "No valid /mycoder command found"
31+
exit 1
32+
fi
33+
echo "prompt=$PROMPT" >> $GITHUB_OUTPUT
34+
echo "comment_url=${{ github.event.comment.html_url }}" >> $GITHUB_OUTPUT
35+
echo "comment_id=${{ github.event.comment.id }}" >> $GITHUB_OUTPUT
36+
37+
- name: Checkout repository
38+
uses: actions/checkout@v3
39+
40+
- name: Set up pnpm
41+
uses: pnpm/action-setup@v2
42+
with:
43+
version: ${{ env.PNPM_VERSION }}
44+
45+
- name: Set up Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version-file: .nvmrc
49+
cache: 'pnpm'
50+
51+
- name: Install MyCoder globally
52+
run: |
53+
# Skip tests when installing globally
54+
pnpm install -g mycoder --no-frozen-lockfile --ignore-scripts
55+
56+
- name: Run MyCoder with prompt
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
60+
run: |
61+
echo "Running MyCoder for issue #${{ github.event.issue.number }} with prompt: ${{ steps.extract-prompt.outputs.prompt }}"
62+
mycoder --githubMode true --userPrompt false "On issue #${{ github.event.issue.number }} the user asked: '${{ steps.extract-prompt.outputs.prompt }}' in comment ${{ steps.extract-prompt.outputs.comment_url }}. Please address this request. If you create a PR or take actions outside the scope of this issue, please report back to the issue with a comment explaining what you did."

.nvmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
23
2+

.releaserc.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
"@semantic-release/release-notes-generator",
66
"@semantic-release/changelog",
77
"@semantic-release/npm",
8-
["@semantic-release/git", {
9-
"assets": ["package.json", "CHANGELOG.md"],
10-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
11-
}],
8+
[
9+
"@semantic-release/git",
10+
{
11+
"assets": ["package.json", "CHANGELOG.md"],
12+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
13+
}
14+
],
1215
"@semantic-release/github"
1316
]
14-
}
17+
}

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ This project and everyone participating in it is governed by our Code of Conduct
8787
- **chore**: Changes to the build process or auxiliary tools and libraries
8888

8989
Each commit message should be structured as follows:
90+
9091
```
9192
<type>[optional scope]: <description>
9293
@@ -96,6 +97,7 @@ This project and everyone participating in it is governed by our Code of Conduct
9697
```
9798

9899
Example:
100+
99101
```
100102
feat(auth): implement JWT authentication
101103
@@ -206,4 +208,4 @@ This project and everyone participating in it is governed by our Code of Conduct
206208
- `perf:` commits trigger a patch version bump
207209
- Commits with `BREAKING CHANGE:` in the footer trigger a major version bump
208210

209-
Thank you for contributing to MyCoder! 👍
211+
Thank you for contributing to MyCoder! 👍

README.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# MyCoder
22

3-
An open-source mono-repository containing the MyCoder agent and cli.
4-
5-
!NOTE: To get started with the mycoder agent, [please see the CLI package](packages/cli)
3+
Command-line interface for AI-powered coding tasks. Full details available on the main [MyCoder.ai website](https://mycoder.ai) and the [Official MyCoder.Ai Docs website](https://docs.mycoder.ai).
64

75
## Features
86

9-
- 🤖 **AI-Powered**: Leverages Anthropic's Claude and OpenAI models for intelligent decision making
7+
- 🤖 **AI-Powered**: Leverages Anthropic's Claude, OpenAI models, xAI/Grok, Mistral AI, and Ollama for intelligent coding assistance
108
- 🛠️ **Extensible Tool System**: Modular architecture with various tool categories
119
- 🔄 **Parallel Execution**: Ability to spawn sub-agents for concurrent task processing
1210
- 📝 **Self-Modification**: Can modify code, it was built and tested by writing itself
@@ -16,6 +14,49 @@ An open-source mono-repository containing the MyCoder agent and cli.
1614

1715
Please join the MyCoder.ai discord for support: https://discord.gg/5K6TYrHGHt
1816

17+
## Installation
18+
19+
```bash
20+
npm install -g mycoder
21+
```
22+
23+
For detailed installation instructions for macOS and Linux, including how to set up Node.js using NVM, [see our Getting Started guide](https://docs.mycoder.ai/docs/getting-started/).
24+
25+
## Usage
26+
27+
```bash
28+
# Interactive mode
29+
mycoder -i
30+
31+
# Run with a prompt
32+
mycoder "Implement a React component that displays a list of items"
33+
34+
# Run with a prompt from a file
35+
mycoder -f prompt.txt
36+
37+
# Disable user prompts for fully automated sessions
38+
mycoder --enableUserPrompt false "Generate a basic Express.js server"
39+
40+
# Enable GitHub mode
41+
mycoder config set githubMode true
42+
```
43+
44+
### GitHub Comment Commands
45+
46+
MyCoder can be triggered directly from GitHub issue comments using the flexible `/mycoder` command:
47+
48+
```
49+
/mycoder [your instructions here]
50+
```
51+
52+
Examples:
53+
54+
- `/mycoder implement a PR for this issue`
55+
- `/mycoder create an implementation plan`
56+
- `/mycoder suggest test cases for this feature`
57+
58+
[Learn more about GitHub comment commands](docs/github-comment-commands.md)
59+
1960
## Packages
2061

2162
- [mycoder](packages/cli) - Command-line interface for MyCoder

0 commit comments

Comments
 (0)