Skip to content
Open
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
48 changes: 48 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Tycode - Claude Code Guidelines

## Git Remotes & Sync Flow

This repo has two remotes:
- **origin** (tigy32/Tycode) - the original upstream repo
- **fork** (k29/Tycode) - our fork

Our fork should stay synced with upstream. **Always prompt the user to sync before starting work.**

### Sync fork with upstream:
```
git fetch origin
git rebase origin/main
git push fork main
```

### For new feature work:
1. Sync main first (see above)
2. `git checkout -b feature/xyz`
3. Work on it, push to fork: `git push fork feature/xyz`
4. When ready, merge into main or open a PR to upstream

### Quick sync (no local changes):
```
git pull origin main --ff-only
git push fork main
```

Use `--ff-only` to ensure fast-forward only, never merge commits. Keep history linear.

### Updating feature branches after changes on main

When a commit on `main` relates to an open PR's feature branch, update that branch so the PR stays current. The feature branch should contain **only its own commits** on top of `origin/main` (no unrelated commits like plugin system changes).

```
git checkout feature/xyz
git reset --hard origin/main
git cherry-pick <relevant-commit-hashes> # only the commits for this feature
cargo build -p tycode-cli # verify it builds
git push fork feature/xyz --force-with-lease
git checkout main
```

**Active feature branches & PRs:**
| Branch | PR | Description |
|--------|----|-------------|
| `feature/tui` | #38 | Ratatui-based TUI |
6 changes: 6 additions & 0 deletions tycode-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ serde = { workspace = true }
serde_json = { workspace = true }
similar = "2.4"

# TUI dependencies
ratatui = "0.29"
crossterm = { version = "0.28", features = ["event-stream"] }
tui-textarea = "0.7"
futures = "0.3"

15 changes: 13 additions & 2 deletions tycode-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ mod commands;
mod github;
mod interactive_app;
mod state;
mod tui;

use crate::interactive_app::InteractiveApp;
use crate::tui::TuiApp;

#[derive(Parser, Debug)]
#[command(name = "tycode-cli")]
Expand Down Expand Up @@ -49,6 +51,10 @@ struct Args {
/// Task description for auto mode
#[arg(long)]
task: Option<String>,

/// Disable TUI and use legacy line-based interactive mode
#[arg(long)]
no_tui: bool,
}

fn main() -> Result<()> {
Expand Down Expand Up @@ -100,8 +106,13 @@ async fn async_main() -> Result<()> {
return auto::run_auto(args.task.unwrap(), roots, args.profile, args.compact).await;
}

let mut app = InteractiveApp::new(workspace_roots, args.profile, args.compact).await?;
app.run().await?;
if args.no_tui {
let mut app = InteractiveApp::new(workspace_roots, args.profile, args.compact).await?;
app.run().await?;
} else {
let mut tui_app = TuiApp::new(workspace_roots, args.profile).await?;
tui_app.run().await?;
}

Ok(())
}
Expand Down
Loading