Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions cli/release/README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
# The most powerful coding agent
# PlanExe CLI — AI-powered planning and coding agent

Codebuff is a CLI tool that writes code for you.
PlanExe is a CLI tool that writes code and builds plans for you.

1. Run `codebuff` from your project directory
1. Run `planexe` from your project directory
2. Tell it what to do
3. It will read and write to files and run commands to produce the code you want
3. It will read and write to files and run commands to produce the result you want

Note: Codebuff will run commands in your terminal as it deems necessary to fulfill your request.
Note: PlanExe will run commands in your terminal as it deems necessary to fulfill your request.

## Installation

To install Codebuff, run:
To install PlanExe, run:

```bash
npm install -g codebuff
npm install -g planexe-cli
```

(Use `sudo` if you get a permission error.)

## Usage

After installation, you can start Codebuff by running:
After installation, you can start PlanExe by running:

```bash
codebuff [project-directory]
planexe [project-directory]
```

If no project directory is specified, Codebuff will use the current directory.
If no project directory is specified, PlanExe will use the current directory.

Once running, simply chat with Codebuff to say what coding task you want done.
Once running, simply chat with PlanExe to say what coding or planning task you want done.

## Features

- Understands your whole codebase
- Creates and edits multiple files based on your request
- Can run your tests or type checker or linter; can install packages
- It's powerful: ask Codebuff to keep working until it reaches a condition and it will.
- It's powerful: ask PlanExe to keep working until it reaches a condition and it will.

Our users regularly use Codebuff to implement new features, write unit tests, refactor code,write scripts, or give advice.
Users regularly use PlanExe to implement new features, write unit tests, refactor code, write scripts, or get advice.

## Knowledge Files

To unlock the full benefits of modern LLMs, we recommend storing knowledge alongside your code. Add a `knowledge.md` file anywhere in your project to provide helpful context, guidance, and tips for the LLM as it performs tasks for you.

Codebuff can fluently read and write files, so it will add knowledge as it goes. You don't need to write knowledge manually!
PlanExe can fluently read and write files, so it will add knowledge as it goes. You don't need to write knowledge manually!

Some have said every change should be paired with a unit test. In 2024, every change should come with a knowledge update!

Expand All @@ -52,18 +52,14 @@ Some have said every change should be paired with a unit test. In 2024, every ch
1. Type '/help' or just '/' to see available commands.
2. Create a `knowledge.md` file and collect specific points of advice. The assistant will use this knowledge to improve its responses.
3. Type `undo` or `redo` to revert or reapply file changes from the conversation.
4. Press `Esc` or `Ctrl+C` while Codebuff is generating a response to stop it.
4. Press `Esc` or `Ctrl+C` while PlanExe is generating a response to stop it.

## Troubleshooting

If you are getting permission errors during installation, try using sudo:

```
sudo npm install -g codebuff
sudo npm install -g planexe-cli
```

If you still have errors, it's a good idea to [reinstall Node](https://nodejs.org/en/download).

## Feedback

We value your input! Please email your feedback to `founders@codebuff.com`. Thank you for using Codebuff!
11 changes: 10 additions & 1 deletion cli/scripts/build-binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,16 @@ async function main() {
const outputFile = join(binDir, outputFilename)

// Collect all NEXT_PUBLIC_* environment variables
const nextPublicEnvVars = Object.entries(process.env)
// NEXT_PUBLIC_CB_ENVIRONMENT defaults to 'prod' for binary releases unless explicitly overridden
const binaryEnv = {
...process.env,
NEXT_PUBLIC_CB_ENVIRONMENT:
process.env.NEXT_PUBLIC_CB_ENVIRONMENT === 'dev' ||
process.env.NEXT_PUBLIC_CB_ENVIRONMENT === 'test'
? process.env.NEXT_PUBLIC_CB_ENVIRONMENT
: 'prod',
}
const nextPublicEnvVars = Object.entries(binaryEnv)
.filter(([key]) => key.startsWith('NEXT_PUBLIC_'))
.map(([key, value]) => [`process.env.${key}`, `"${value ?? ''}"`])

Expand Down
4 changes: 2 additions & 2 deletions cli/src/login/plain-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export async function runPlainLogin(): Promise<void> {
const fingerprintId = generateFingerprintId()

console.log()
console.log(bold(IS_FREEBUFF ? 'Freebuff Login' : 'Codebuff Login'))
console.log(bold(IS_FREEBUFF ? 'Freebuff Login' : 'PlanExe Login'))
console.log()
console.log('Generating login URL...')

Expand Down Expand Up @@ -72,7 +72,7 @@ export async function runPlainLogin(): Promise<void> {
console.log()
console.log(green(`✓ Logged in as ${user.name} (${user.email})`))
console.log()
const cliName = IS_FREEBUFF ? 'freebuff' : 'codebuff'
const cliName = IS_FREEBUFF ? 'freebuff' : 'planexe'
console.log('You can now run ' + cyan(cliName) + ' to start.')
process.exit(0)
} else if (result.status === 'timeout') {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const getConfigDir = (): string => {
return path.join(
os.homedir(),
'.config',
'manicode' +
'planexe' +
// on a development stack?
(env.NEXT_PUBLIC_CB_ENVIRONMENT !== 'prod'
? `-${env.NEXT_PUBLIC_CB_ENVIRONMENT}`
Expand Down
2 changes: 1 addition & 1 deletion cli/src/utils/claude-oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export async function exchangeCodeForTokens(
// We need to split it and send both parts
const splits = authorizationCode.trim().split('#')
const code = splits[0]
const state = splits[1]
const state = splits[1] ?? pendingCodeVerifier

// Use the v1 OAuth token endpoint (same as opencode)
const response = await fetch('https://console.anthropic.com/v1/oauth/token', {
Expand Down
Loading