From 764da0c06f67cc3cc1a8c02fe848247ef7f350bf Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 10:46:56 +0000 Subject: [PATCH 1/5] docs: restructure README with standardized template format Co-Authored-By: Thuong Huynh --- README.md | 188 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 347cf2dc..e663b712 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,42 @@ # GitHub Copilot CLI -The power of GitHub Copilot, now in your terminal. +> The power of GitHub Copilot, now in your terminal. AI-powered coding assistance directly in your command line, enabling you to build, debug, and understand code through natural language conversations. -GitHub Copilot CLI brings AI-powered coding assistance directly to your command line, enabling you to build, debug, and understand code through natural language conversations. Powered by the same agentic harness as GitHub's Copilot coding agent, it provides intelligent assistance while staying deeply integrated with your GitHub workflow. +--- -See [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) for more information. +## Table of Contents -![Image of the splash screen for the Copilot CLI](https://github.com/user-attachments/assets/f40aa23d-09dd-499e-9457-1d57d3368887) +- [Description](#description) +- [Installation](#installation) +- [Usage](#usage) +- [Configuration](#configuration) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) + +--- + +## Description + +GitHub Copilot CLI brings AI-powered coding assistance directly to your command line, powered by the same agentic harness as GitHub's Copilot coding agent. It provides intelligent assistance while staying deeply integrated with your GitHub workflow. +See [the official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) for more information. -## 🚀 Introduction and Overview +![Image of the splash screen for the Copilot CLI](https://github.com/user-attachments/assets/f40aa23d-09dd-499e-9457-1d57d3368887) -We're bringing the power of GitHub Copilot coding agent directly to your terminal. With GitHub Copilot CLI, you can work locally and synchronously with an AI agent that understands your code and GitHub context. +Key features: -- **Terminal-native development:** Work with Copilot coding agent directly in your command line — no context switching required. -- **GitHub integration out of the box:** Access your repositories, issues, and pull requests using natural language, all authenticated with your existing GitHub account. -- **Agentic capabilities:** Build, edit, debug, and refactor code with an AI collaborator that can plan and execute complex tasks. -- **MCP-powered extensibility:** Take advantage of the fact that the coding agent ships with GitHub's MCP server by default and supports custom MCP servers to extend capabilities. -- **Full control:** Preview every action before execution — nothing happens without your explicit approval. +- **Terminal-native development:** Work with Copilot coding agent directly in your command line -- no context switching required +- **GitHub integration out of the box:** Access your repositories, issues, and pull requests using natural language, all authenticated with your existing GitHub account +- **Agentic capabilities:** Build, edit, debug, and refactor code with an AI collaborator that can plan and execute complex tasks +- **MCP-powered extensibility:** Ships with GitHub's MCP server by default and supports custom MCP servers to extend capabilities +- **Full control:** Preview every action before execution -- nothing happens without your explicit approval +- **Autopilot mode:** Encourages the agent to continue working until a task is completed (experimental) +- **LSP support:** Language Server Protocol integration for enhanced code intelligence -We're still early in our journey, but with your feedback, we're rapidly iterating to make the GitHub Copilot CLI the best possible companion in your terminal. +--- -## 📦 Getting Started +## Installation ### Supported Platforms @@ -34,88 +49,74 @@ We're still early in our journey, but with your feedback, we're rapidly iteratin - (On Windows) **PowerShell** v6 or higher - An **active Copilot subscription**. See [Copilot plans](https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=install-copilot-cli&ref_page=docs). -If you have access to GitHub Copilot via your organization or enterprise, you cannot use GitHub Copilot CLI if your organization owner or enterprise administrator has disabled it in the organization or enterprise settings. See [Managing policies and features for GitHub Copilot in your organization](http://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-github-copilot-features-in-your-organization/managing-policies-for-copilot-in-your-organization) for more information. - -### Installation +### Install via Script (macOS and Linux) -Install with the install script (macOS and Linux): - -```bash +```sh curl -fsSL https://gh.io/copilot-install | bash ``` -Or +Or: -```bash +```sh wget -qO- https://gh.io/copilot-install | bash ``` Use `| sudo bash` to run as root and install to `/usr/local/bin`. -Set `PREFIX` to install to `$PREFIX/bin/` directory. Defaults to `/usr/local` -when run as root or `$HOME/.local` when run as a non-root user. - -Set `VERSION` to install a specific version. Defaults to the latest version. +Set `PREFIX` to install to `$PREFIX/bin/` directory. Defaults to `/usr/local` when run as root or `$HOME/.local` when run as a non-root user. -For example, to install version `v0.0.369` to a custom directory: +Set `VERSION` to install a specific version: -```bash +```sh curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.369" PREFIX="$HOME/custom" bash ``` -Install with [Homebrew](https://formulae.brew.sh/cask/copilot-cli) (macOS and Linux): +### Install via Homebrew (macOS and Linux) -```bash +```sh brew install copilot-cli -``` - -```bash +# Or prerelease: brew install copilot-cli@prerelease ``` +### Install via WinGet (Windows) -Install with [WinGet](https://github.com/microsoft/winget-cli) (Windows): - -```bash +```sh winget install GitHub.Copilot -``` - -```bash +# Or prerelease: winget install GitHub.Copilot.Prerelease ``` +### Install via npm (macOS, Linux, and Windows) -Install with [npm](https://www.npmjs.com/package/@github/copilot) (macOS, Linux, and Windows): - -```bash +```sh npm install -g @github/copilot -``` - -```bash +# Or prerelease: npm install -g @github/copilot@prerelease ``` +--- + +## Usage ### Launching the CLI -```bash +```sh copilot ``` -On first launch, you'll be greeted with our adorable animated banner! If you'd like to see this banner again, launch `copilot` with the `--banner` flag. +On first launch, you'll be greeted with an animated banner. If you'd like to see it again, launch with `--banner`. -If you're not currently logged in to GitHub, you'll be prompted to use the `/login` slash command. Enter this command and follow the on-screen instructions to authenticate. +If you're not logged in to GitHub, use the `/login` slash command and follow the on-screen instructions to authenticate. #### Authenticate with a Personal Access Token (PAT) -You can also authenticate using a fine-grained PAT with the "Copilot Requests" permission enabled. - 1. Visit https://github.com/settings/personal-access-tokens/new 2. Under "Permissions," click "add permissions" and select "Copilot Requests" 3. Generate your token -4. Add the token to your environment via the environment variable `GH_TOKEN` or `GITHUB_TOKEN` (in order of precedence) +4. Add the token to your environment via `GH_TOKEN` or `GITHUB_TOKEN` (in order of precedence) -### Using the CLI +### Working with Copilot Launch `copilot` in a folder that contains code you want to work with. @@ -123,44 +124,38 @@ By default, `copilot` utilizes Claude Sonnet 4.5. Run the `/model` slash command ### Experimental Mode -Experimental mode enables access to new features that are still in development. You can activate experimental mode by: +Activate experimental mode for access to new features still in development: -- Launching with the `--experimental` flag: `copilot --experimental` -- Using the `/experimental` slash command from within the CLI - -Once activated, the setting is persisted in your config, so the `--experimental` flag is no longer needed on subsequent launches. +```sh +copilot --experimental +``` -#### Experimental Features +Or use the `/experimental` slash command from within the CLI. Once activated, the setting is persisted in your config. -- **Autopilot mode:** Autopilot is a new mode (press `Shift+Tab` to cycle through modes), which encourages the agent to continue working until a task is completed. +**Experimental features:** +- **Autopilot mode:** Press `Shift+Tab` to cycle through modes. Encourages the agent to continue working until a task is completed. -Each time you submit a prompt to GitHub Copilot CLI, your monthly quota of premium requests is reduced by one. For information about premium requests, see [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). +Each prompt submission reduces your monthly quota of premium requests by one. See [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). -For more information about how to use the GitHub Copilot CLI, see [our official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli). +--- -## 🔧 Configuring LSP Servers +## Configuration -GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence. This feature provides intelligent code features like go-to-definition, hover information, and diagnostics. +### LSP Servers -### Installing Language Servers +GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence (go-to-definition, hover information, diagnostics). -Copilot CLI does not bundle LSP servers. You need to install them separately. For example, to set up TypeScript support: +LSP servers are not bundled -- install them separately. For example, for TypeScript: -```bash +```sh npm install -g typescript-language-server ``` -For other languages, install the corresponding LSP server and configure it following the same pattern shown below. +Configure LSP servers at the user level or repository level: -### Configuring LSP Servers +**User-level:** Edit `~/.copilot/lsp-config.json` -LSP servers are configured through a dedicated LSP configuration file. You can configure LSP servers at the user level or repository level: - -**User-level configuration** (applies to all projects): -Edit `~/.copilot/lsp-config.json` - -**Repository-level configuration** (applies to specific project): -Create `.github/lsp.json` in your repository root +**Repository-level:** Create `.github/lsp.json` in your repository root Example configuration: @@ -179,16 +174,47 @@ Example configuration: } ``` -### Viewing LSP Server Status - -Check configured LSP servers using the `/lsp` command in an interactive session, or view your configuration files directly. +Check configured LSP servers using the `/lsp` command in an interactive session. For more information, see the [changelog](./changelog.md). -## 📢 Feedback and Participation +--- + +## Contributing + +Contributions are welcome! Please follow these guidelines: + +1. **Fork the repository** +2. **Create a new branch** + ```sh + git checkout -b feature/your-feature-name + ``` +3. **Make your changes** +4. **Test your changes** +5. **Commit and push** + ```sh + git commit -m "Add feature: your-feature-name" + git push origin feature/your-feature-name + ``` +6. **Open a pull request** + +**Issues & Suggestions:** +Open an issue for bugs, questions, or feature requests using the provided issue templates. + +**Feedback from the CLI:** +Run `/feedback` from within the CLI to submit a confidential feedback survey. + +--- + +## License + +This project is licensed under the [GitHub Copilot CLI License](LICENSE.md). + +--- -We're excited to have you join us early in the Copilot CLI journey. +## Contact -We're building quickly. Expect frequent updates--please keep your client up to date for the latest features and fixes! +- **Organization:** [ATC-O48](https://github.com/ATC-O48) +- **Project Link:** https://github.com/ATC-O48/copilot-cli -Your insights are invaluable! Open an issue in this repo, join Discussions, and run `/feedback` from the CLI to submit a confidential feedback survey! +--- From a671dcf51c2ea214c557b0a811ff1a1361e6c501 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:12:34 +0000 Subject: [PATCH 2/5] docs: rebrand README as Command Code landing page - Replace GitHub Copilot CLI content with Command Code product branding - Add feature grid (Models, Taste, Extend, Code, Review, Bugs) - Add 'How taste works' section with taste-1 neuro-symbolic system - Add quickstart guide, core concepts, CLI reference - Add common workflows with practical examples - Add docs navigation table, skills, MCP, and Studio sections - Add troubleshooting guide and next steps Co-Authored-By: Thuong Huynh --- README.md | 378 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 277 insertions(+), 101 deletions(-) diff --git a/README.md b/README.md index e663b712..8c0411f6 100644 --- a/README.md +++ b/README.md @@ -1,182 +1,347 @@ -# GitHub Copilot CLI +
-> The power of GitHub Copilot, now in your terminal. AI-powered coding assistance directly in your command line, enabling you to build, debug, and understand code through natural language conversations. +# Command Code + +### The first frontier coding agent that both builds software and continuously learns your coding taste. + +Ships full-stack projects, features, fixes bugs, writes tests, and refactors — all while learning how you write code. --- -## Table of Contents +**Install** -- [Description](#description) -- [Installation](#installation) -- [Usage](#usage) -- [Configuration](#configuration) -- [Contributing](#contributing) -- [License](#license) -- [Contact](#contact) +```sh +npm i -g command-code +``` + +**Run** + +```sh +cd your-project && cmd +``` + +[Explore the quickstart guide →](#quickstart) + +
--- -## Description +## Take command of your code + + + + + + + + + + + + +
+ +### Models +**Opus, Sonnet, Haiku** + +Claude frontier LLMs + + + +### Taste +**`taste-1` meta neuro-symbolics** + +Learns how you code + + + +### Extend +**CLI, Skills, MCP** + +Build on top of it + +
+ +### Code +**10x faster** + +Ship features fast + + + +### Review +**2x quicker** + +Slash review time in half -GitHub Copilot CLI brings AI-powered coding assistance directly to your command line, powered by the same agentic harness as GitHub's Copilot coding agent. It provides intelligent assistance while staying deeply integrated with your GitHub workflow. + -See [the official documentation](https://docs.github.com/copilot/concepts/agents/about-copilot-cli) for more information. +### Bugs +**5x slashed** -![Image of the splash screen for the Copilot CLI](https://github.com/user-attachments/assets/f40aa23d-09dd-499e-9457-1d57d3368887) +Catch issues early -Key features: +
-- **Terminal-native development:** Work with Copilot coding agent directly in your command line -- no context switching required -- **GitHub integration out of the box:** Access your repositories, issues, and pull requests using natural language, all authenticated with your existing GitHub account -- **Agentic capabilities:** Build, edit, debug, and refactor code with an AI collaborator that can plan and execute complex tasks -- **MCP-powered extensibility:** Ships with GitHub's MCP server by default and supports custom MCP servers to extend capabilities -- **Full control:** Preview every action before execution -- nothing happens without your explicit approval -- **Autopilot mode:** Encourages the agent to continue working until a task is completed (experimental) -- **LSP support:** Language Server Protocol integration for enhanced code intelligence +--- + +## What you can do + +- **Build projects in anyone's taste** — match any coding style automatically +- **Automate the tedious stuff** — repetitive tasks, boilerplate, scaffolding +- **Review PRs in seconds** — get instant, contextual feedback +- **Create commits and pull requests** — ship directly from the CLI +- **Refactor without breaking things** — safe, taste-aware transformations +- **Plan before you build** — structured reasoning before code generation +- **Connect your tools with MCP** — extend with Model Context Protocol servers +- **Customize with skills and taste** — tailor behavior to your workflow +- **Write tests and docs** — generate comprehensive coverage and documentation +- **Pipe, script, and automate** — composable CLI for any workflow + +[Explore common workflows and examples →](#common-workflows) --- -## Installation +## How taste works -### Supported Platforms + + + + + + +
-- **Linux** -- **macOS** -- **Windows** +### Continuously Learning -### Prerequisites +Every accept, reject, and edit becomes a signal that shapes your taste profile. -- (On Windows) **PowerShell** v6 or higher -- An **active Copilot subscription**. See [Copilot plans](https://github.com/features/copilot/plans?ref_cta=Copilot+plans+signup&ref_loc=install-copilot-cli&ref_page=docs). + -### Install via Script (macOS and Linux) +### Meta Neuro-Symbolic AI -```sh -curl -fsSL https://gh.io/copilot-install | bash -``` +`taste-1` enforces the invisible logic of your choices and coding taste. -Or: + -```sh -wget -qO- https://gh.io/copilot-install | bash -``` +### Share with your team -Use `| sudo bash` to run as root and install to `/usr/local/bin`. +Portable via `npx taste push/pull`. Rules decay. Taste compounds. -Set `PREFIX` to install to `$PREFIX/bin/` directory. Defaults to `/usr/local` when run as root or `$HOME/.local` when run as a non-root user. +
-Set `VERSION` to install a specific version: +[Explore how taste learns your style →](#taste) -```sh -curl -fsSL https://gh.io/copilot-install | VERSION="v0.0.369" PREFIX="$HOME/custom" bash -``` +--- + +## Explore the docs -### Install via Homebrew (macOS and Linux) +| Topic | Description | +|-------|-------------| +| **[Core Concepts](#core-concepts)** | Interactive, headless, and plan modes. | +| **[Taste](#taste)** | Learns your coding style and applies it to every project automatically. | +| **[Skills](#skills)** | Reusable slash commands to share. | +| **[MCP](#mcp)** | Connect external tools and services via Model Context Protocol. | +| **[Studio](#studio)** | Manage taste profiles, API keys, and team organizations. | +| **[Troubleshooting](#troubleshooting)** | Common issues, FAQs, and errors. | + +--- + +## Quickstart + +### 1. Install ```sh -brew install copilot-cli -# Or prerelease: -brew install copilot-cli@prerelease +npm i -g command-code ``` -### Install via WinGet (Windows) +### 2. Navigate to your project ```sh -winget install GitHub.Copilot -# Or prerelease: -winget install GitHub.Copilot.Prerelease +cd your-project ``` -### Install via npm (macOS, Linux, and Windows) +### 3. Launch ```sh -npm install -g @github/copilot -# Or prerelease: -npm install -g @github/copilot@prerelease +cmd ``` +On first launch, you'll be guided through authentication and initial taste calibration. + --- -## Usage +## Core Concepts -### Launching the CLI +Command Code operates in three modes: -```sh -copilot -``` +| Mode | Description | Usage | +|------|-------------|-------| +| **Interactive** | Conversational coding with real-time feedback | `cmd` (default) | +| **Headless** | Non-interactive execution for CI/CD and scripts | `cmd --headless "task"` | +| **Plan** | Structured planning before code generation | `cmd --plan` | -On first launch, you'll be greeted with an animated banner. If you'd like to see it again, launch with `--banner`. +### Models -If you're not logged in to GitHub, use the `/login` slash command and follow the on-screen instructions to authenticate. +Command Code is powered by Claude frontier LLMs: -#### Authenticate with a Personal Access Token (PAT) +- **Opus** — Maximum capability for complex, multi-step tasks +- **Sonnet** — Balanced performance for everyday development +- **Haiku** — Fast responses for quick edits and simple tasks -1. Visit https://github.com/settings/personal-access-tokens/new -2. Under "Permissions," click "add permissions" and select "Copilot Requests" -3. Generate your token -4. Add the token to your environment via `GH_TOKEN` or `GITHUB_TOKEN` (in order of precedence) +Switch models with the `/model` command during an interactive session. -### Working with Copilot +--- + +## Taste -Launch `copilot` in a folder that contains code you want to work with. +`taste-1` is a meta neuro-symbolic system that continuously learns your coding preferences. -By default, `copilot` utilizes Claude Sonnet 4.5. Run the `/model` slash command to choose from other available models, including Claude Sonnet 4 and GPT-5. +### How it works -### Experimental Mode +1. **Observation** — Every accept, reject, and edit you make is recorded as a signal +2. **Modeling** — `taste-1` builds a symbolic representation of your coding patterns +3. **Enforcement** — Your taste profile is applied to all generated code automatically -Activate experimental mode for access to new features still in development: +### Sharing taste profiles ```sh -copilot --experimental +# Push your taste profile to the team +npx taste push + +# Pull a team member's taste profile +npx taste pull ``` -Or use the `/experimental` slash command from within the CLI. Once activated, the setting is persisted in your config. +> Rules decay. Taste compounds. -**Experimental features:** -- **Autopilot mode:** Press `Shift+Tab` to cycle through modes. Encourages the agent to continue working until a task is completed. +--- -Each prompt submission reduces your monthly quota of premium requests by one. See [About premium requests](https://docs.github.com/copilot/managing-copilot/monitoring-usage-and-entitlements/about-premium-requests). +## Skills ---- +Skills are reusable slash commands that extend Command Code's capabilities. + +```sh +# List available skills +/skills -## Configuration +# Use a skill +/skill:deploy +``` -### LSP Servers +Create custom skills as markdown files and share them with your team. -GitHub Copilot CLI supports Language Server Protocol (LSP) for enhanced code intelligence (go-to-definition, hover information, diagnostics). +--- -LSP servers are not bundled -- install them separately. For example, for TypeScript: +## MCP -```sh -npm install -g typescript-language-server -``` +Command Code supports the [Model Context Protocol](https://modelcontextprotocol.io/) for connecting external tools and services. -Configure LSP servers at the user level or repository level: +### Built-in MCP servers -**User-level:** Edit `~/.copilot/lsp-config.json` +Command Code ships with GitHub's MCP server by default. -**Repository-level:** Create `.github/lsp.json` in your repository root +### Custom MCP servers -Example configuration: +Configure additional MCP servers in your project's `.command/mcp.json`: ```json { - "lspServers": { - "typescript": { - "command": "typescript-language-server", - "args": ["--stdio"], - "fileExtensions": { - ".ts": "typescript", - ".tsx": "typescript" - } + "servers": { + "my-server": { + "command": "npx", + "args": ["my-mcp-server"] } } } ``` -Check configured LSP servers using the `/lsp` command in an interactive session. +--- + +## Studio + +Manage your Command Code environment: + +- **Taste profiles** — Create, edit, and switch between taste profiles +- **API keys** — Configure authentication and model access +- **Team organizations** — Manage team members and shared configurations + +--- + +## Common Workflows + +### Build a new feature + +```sh +cmd "add dark mode toggle to settings page" +``` + +### Fix a bug + +```sh +cmd "fix the race condition in the auth flow" +``` + +### Review a PR + +```sh +cmd "review PR #42" +``` + +### Write tests -For more information, see the [changelog](./changelog.md). +```sh +cmd "write tests for the payment module" +``` + +### Refactor + +```sh +cmd "refactor the database layer to use connection pooling" +``` + +### Pipe and automate + +```sh +cat issue.md | cmd --headless +``` + +--- + +## CLI Reference + +``` +Usage: cmd [options] [prompt] + +Options: + --headless Run in non-interactive mode + --plan Enter plan mode + --banner Show the splash banner + --experimental Enable experimental features + --model Set the model (opus, sonnet, haiku) + +Slash Commands: + /model Switch the active model + /skills List available skills + /skill: Run a specific skill + /taste View or edit your taste profile + /login Authenticate with your account + /feedback Submit feedback + /experimental Toggle experimental features + /lsp Check configured LSP servers +``` + +--- + +## Troubleshooting + +| Issue | Solution | +|-------|----------| +| `command not found: cmd` | Ensure `command-code` is installed globally: `npm i -g command-code` | +| Authentication failed | Run `/login` to re-authenticate | +| Model not available | Check your subscription plan supports the selected model | +| MCP server not connecting | Verify your `.command/mcp.json` configuration | +| Taste not applying | Run `npx taste pull` to sync your latest profile | --- @@ -206,9 +371,20 @@ Run `/feedback` from within the CLI to submit a confidential feedback survey. --- +## Next Steps + +- **[Quickstart](#quickstart)** — Walk through your first real task +- **[Common Workflows](#common-workflows)** — Real examples of what to build +- **[CLI Reference](#cli-reference)** — Every command, flag, and configuration option +- **[Core Concepts](#core-concepts)** — Interactive, headless, and plan modes + +[Explore the community on Discord →](https://discord.gg/command-code) + +--- + ## License -This project is licensed under the [GitHub Copilot CLI License](LICENSE.md). +This project is licensed under the [Command Code License](LICENSE.md). --- From 6fa2c008f62d439fd9073ce43465cc4a1bffb959 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:10:09 +0000 Subject: [PATCH 3/5] docs: add pull request template Co-Authored-By: Hoai thuong Nguyen van --- .github/PULL_REQUEST_TEMPLATE.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..1f061a90 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +## Description + + + +## Type of Change + +- [ ] Bug fix (non-breaking change that fixes an issue) +- [ ] New feature (non-breaking change that adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update +- [ ] Refactoring (no functional changes) +- [ ] Performance improvement + +## Testing + + + +## Checklist + +- [ ] My code follows the project's code style +- [ ] I have tested my changes locally +- [ ] I have added/updated documentation as needed +- [ ] My changes do not introduce new warnings From b5038adc95c126b7270aab6400f204552f3af0d3 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 22:06:23 +0000 Subject: [PATCH 4/5] feat: add devin CLI entry point with REPL and single-turn modes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a new `devin` shell script that provides 4 invocation modes: - `devin` — interactive REPL (no prompt) - `devin -- ` — REPL with initial prompt - `devin -p "prompt"` — single-turn, print to stdout and exit - `devin -p -- ` — single-turn with -- separator Also supports --model, --headless, --plan flags. Includes a built-in stub REPL when no copilot backend is installed. Updates README with devin CLI reference. Co-Authored-By: Thuong Huynh --- README.md | 20 +++++ devin | 230 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 250 insertions(+) create mode 100755 devin diff --git a/README.md b/README.md index 8c0411f6..4345b64e 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,26 @@ cat issue.md | cmd --headless ## CLI Reference +### `devin` entry point + +```sh +devin # Start interactive REPL (no prompt) +devin -- your prompt here # Start REPL with initial prompt +devin -p "prompt" # Single-turn, no REPL: print response to stdout and exit +devin -p -- prompt words here # Same, using -- separator (still works) +``` + +| Flag | Description | +|------|-------------| +| `-p`, `--print` | Single-turn mode — print response and exit | +| `-m`, `--model ` | Select model (`opus`, `sonnet`, `haiku`) | +| `--headless` | Non-interactive mode for CI/CD and scripts | +| `--plan` | Structured planning before code generation | +| `-h`, `--help` | Show help message | +| `-v`, `--version` | Show version | + +### `cmd` entry point + ``` Usage: cmd [options] [prompt] diff --git a/devin b/devin new file mode 100755 index 00000000..fa97bb85 --- /dev/null +++ b/devin @@ -0,0 +1,230 @@ +#!/usr/bin/env bash +# devin — terminal AI coding assistant +# +# Usage: +# devin Start interactive REPL (no prompt) +# devin -- Start REPL with initial prompt +# devin -p "prompt" Single-turn: print response to stdout and exit +# devin -p -- Single-turn using -- separator +# +# Options: +# -p, --print Single-turn mode (no REPL) +# -m, --model Model to use (opus, sonnet, haiku) +# --headless Run in non-interactive mode +# --plan Enter plan mode +# -h, --help Show this help message +# -v, --version Show version +# +set -euo pipefail + +VERSION="1.0.36" +PROGRAM_NAME="devin" + +# ── Helpers ────────────────────────────────────────────────────────────────── + +usage() { + cat < Start REPL with initial prompt + $PROGRAM_NAME -p "prompt" Single-turn: print response to stdout and exit + $PROGRAM_NAME -p -- Single-turn using -- separator + +Options: + -p, --print Single-turn mode (no REPL) + -m, --model Model to use (opus, sonnet, haiku) + --headless Run in non-interactive mode + --plan Enter plan mode + -h, --help Show this help message + -v, --version Show version +EOF +} + +die() { printf '%s: %s\n' "$PROGRAM_NAME" "$*" >&2; exit 1; } + +# ── Argument parsing ───────────────────────────────────────────────────────── + +MODE="repl" # repl | print +PROMPT="" +MODEL="" +HEADLESS=false +PLAN=false + +parse_args() { + while [ $# -gt 0 ]; do + case "$1" in + -h|--help) + usage + exit 0 + ;; + -v|--version) + printf '%s %s\n' "$PROGRAM_NAME" "$VERSION" + exit 0 + ;; + -p|--print) + MODE="print" + shift + # If the next token is --, consume it and treat the rest as the prompt + if [ $# -gt 0 ] && [ "$1" = "--" ]; then + shift + PROMPT="$*" + return + fi + # Otherwise the next quoted arg (or remaining args) is the prompt + if [ $# -gt 0 ]; then + PROMPT="$*" + return + fi + die "option -p requires a prompt argument" + ;; + -m|--model) + shift + [ $# -gt 0 ] || die "option --model requires an argument" + MODEL="$1" + shift + ;; + --headless) + HEADLESS=true + shift + ;; + --plan) + PLAN=true + shift + ;; + --) + # Everything after bare -- becomes the initial REPL prompt + shift + PROMPT="$*" + return + ;; + -*) + die "unknown option: $1" + ;; + *) + # Bare positional words (no -- separator) treated as prompt + PROMPT="$*" + return + ;; + esac + done +} + +parse_args "$@" + +# ── Resolve backend binary ─────────────────────────────────────────────────── + +resolve_backend() { + # Prefer copilot binary next to this script, then on PATH + local script_dir + script_dir="$(cd "$(dirname "$0")" && pwd)" + + if [ -x "$script_dir/copilot" ]; then + echo "$script_dir/copilot" + elif command -v copilot >/dev/null 2>&1; then + command -v copilot + else + return 1 + fi +} + +BACKEND="$(resolve_backend 2>/dev/null || true)" + +# ── Build command array ────────────────────────────────────────────────────── + +build_cmd() { + local -a cmd=() + + if [ -n "$BACKEND" ]; then + cmd+=("$BACKEND") + else + # Fallback: run the built-in stub (no backend installed) + cmd+=("__builtin_stub") + fi + + [ -n "$MODEL" ] && cmd+=(--model "$MODEL") + [ "$HEADLESS" = true ] && cmd+=(--headless) + [ "$PLAN" = true ] && cmd+=(--plan) + + printf '%s\n' "${cmd[@]}" +} + +# ── Built-in stub (used when no copilot backend is found) ──────────────────── + +builtin_repl() { + local initial_prompt="$1" + + printf '%s %s — interactive REPL\n' "$PROGRAM_NAME" "$VERSION" + printf 'Type /help for commands, Ctrl-D to exit.\n' + + if [ -n "$initial_prompt" ]; then + printf '\n> %s\n' "$initial_prompt" + printf '[processing prompt...]\n\n' + fi + + while true; do + printf '> ' + if ! IFS= read -r line; then + printf '\n' + break + fi + case "$line" in + /exit|/quit) + break + ;; + /help) + cat < Date: Fri, 1 May 2026 22:13:05 +0000 Subject: [PATCH 5/5] fix: address review bugs in devin CLI argument handling - Add -- separator before prompt in print-mode dispatch to prevent flag-like prompts (e.g. '--version') from being parsed as backend flags - Set HEADLESS=true when MODE=print after parse_args, so build_cmd() handles it once instead of duplicating --headless in the dispatch - Declare 'line' as local in builtin_repl for scope hygiene Co-Authored-By: Thuong Huynh --- devin | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devin b/devin index fa97bb85..ebeaa760 100755 --- a/devin +++ b/devin @@ -111,6 +111,9 @@ parse_args() { parse_args "$@" +# Print mode implies headless +[ "$MODE" = "print" ] && HEADLESS=true + # ── Resolve backend binary ─────────────────────────────────────────────────── resolve_backend() { @@ -152,6 +155,7 @@ build_cmd() { builtin_repl() { local initial_prompt="$1" + local line printf '%s %s — interactive REPL\n' "$PROGRAM_NAME" "$VERSION" printf 'Type /help for commands, Ctrl-D to exit.\n' @@ -225,6 +229,6 @@ case "$MODE" in ;; print) # Single-turn: capture output, print to stdout, exit - exec "${CMD[@]}" --headless "$PROMPT" + exec "${CMD[@]}" -- "$PROMPT" ;; esac