Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d3dd9f1
docs: update README with correct repo name and model
rishiskhare Feb 11, 2026
afb0fbc
Merge branch 'Alishahryar1:main' into main
rishiskhare Feb 13, 2026
1ff21af
docs: add shell alias tip and PM2 background proxy instructions
rishiskhare Feb 13, 2026
1c06e7d
feat: per-session model selection via auth token and interactive laun…
rishiskhare Feb 13, 2026
e526b7b
docs: make PM2 and fzf default prerequisites in README
rishiskhare Feb 13, 2026
e0fd60e
docs: simplify README with single aliases section, remove dev docs
rishiskhare Feb 13, 2026
ac6ba66
Merge upstream/main into main
rishiskhare Feb 13, 2026
4f655db
ci: add upstream sync workflow
rishiskhare Feb 14, 2026
5a16de9
Merge upstream/main into main
github-actions[bot] Feb 14, 2026
bfdc4b8
docs: remove clone/cd instructions from README
rishiskhare Feb 14, 2026
d49efd9
ci: change upstream sync schedule from every 6 hours to every 12 hours
rishiskhare Feb 14, 2026
eb43fb8
docs: clarify README description of NVIDIA NIM API
rishiskhare Feb 14, 2026
15e27aa
Merge upstream/main into main
github-actions[bot] Feb 14, 2026
14d5da2
docs: add VSCode extension setup instructions to README
rishiskhare Feb 14, 2026
3cb164c
Merge upstream/main into main
github-actions[bot] Feb 14, 2026
9d0cfa3
docs: simplify aliases section and ensure claude-free runs from anywhere
rishiskhare Feb 14, 2026
8cab9ce
Merge upstream/main into main
rishiskhare Feb 16, 2026
0a03cc4
fix: repair sync workflow and routes.py after upstream merge
rishiskhare Feb 16, 2026
556263a
docs: restore full config documentation for all providers and platforms
rishiskhare Feb 16, 2026
796cb25
style: fix formatting with ruff
rishiskhare Feb 16, 2026
5c6fd1d
refactor: extract custom features to separate files
rishiskhare Feb 16, 2026
f68369a
ci: add auto-formatting and skip ci to sync workflow
rishiskhare Feb 16, 2026
cddd8f0
fix: add workflow_dispatch and fix YAML indentation in workflows
rishiskhare Feb 16, 2026
ceeab80
fix: rewrite sync-upstream workflow for production-readiness
rishiskhare Feb 16, 2026
5381458
Merge upstream/main into main [skip ci]
github-actions[bot] Feb 16, 2026
4db9592
docs: overhaul README for fork — credit upstream, fix setup, add miss…
rishiskhare Feb 16, 2026
22ba914
Merge upstream/main into main [skip ci]
github-actions[bot] Feb 16, 2026
1fc7a7b
chore: harden upstream sync automation
rishiskhare Feb 18, 2026
c8a831b
fix: avoid syncing upstream workflow files
rishiskhare Feb 18, 2026
f468294
Merge upstream/main into main [skip ci]
github-actions[bot] Feb 18, 2026
144de1e
chore: reapply fork overrides after upstream sync [skip ci]
github-actions[bot] Feb 18, 2026
0c810d0
docs: fix README env setup instructions
rishiskhare Feb 18, 2026
6b911f5
style: format sync_readme with ruff
rishiskhare Feb 18, 2026
1406bb5
chore: remove root markdown helper files
rishiskhare Feb 18, 2026
452cee0
hmm
Feb 18, 2026
ee41966
hmmm
Feb 18, 2026
bb2c56c
okk
Feb 18, 2026
86bced9
okokok
Feb 18, 2026
30ab7b4
new upgraded ~
Feb 19, 2026
b7c6c02
some bug fixes and improvement
Feb 19, 2026
036dfa5
One setup for all
Feb 19, 2026
8373e6d
Fixes - once and for all
Feb 19, 2026
24178f5
some bug fixes~~ ready for test.
Feb 19, 2026
0558248
bug fixes and improvement (also updated README.md)
Feb 19, 2026
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
158 changes: 158 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Sync Fork with Upstream

on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
inputs:
dry_run:
description: "Sync but do not push (dry-run mode)"
required: false
default: "false"
type: boolean

permissions:
contents: write

concurrency:
group: sync-upstream
cancel-in-progress: false

jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
UPSTREAM_REPO: Alishahryar1/free-claude-code
UPSTREAM_BRANCH: main
FORK_BRANCH: main

steps:
- name: Checkout fork
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Fetch upstream
run: |
git remote add upstream "https://github.com/${{ env.UPSTREAM_REPO }}.git" 2>/dev/null || true
git fetch upstream "${{ env.UPSTREAM_BRANCH }}" --no-tags

- name: Detect upstream force-push
id: force_push
run: |
MERGE_BASE=$(git merge-base HEAD "upstream/${{ env.UPSTREAM_BRANCH }}" 2>/dev/null || echo "")
if [ -z "$MERGE_BASE" ]; then
echo "detected=true" >> "$GITHUB_OUTPUT"
echo "::error::No common ancestor with upstream — upstream may have been force-pushed or rewritten."
exit 1
fi
# Check that the merge-base is reachable from upstream (i.e. upstream still contains our shared history)
if ! git merge-base --is-ancestor "$MERGE_BASE" "upstream/${{ env.UPSTREAM_BRANCH }}"; then
echo "detected=true" >> "$GITHUB_OUTPUT"
echo "::error::Merge-base is not an ancestor of upstream HEAD — upstream history was rewritten."
exit 1
fi
echo "detected=false" >> "$GITHUB_OUTPUT"
echo "merge_base=$MERGE_BASE" >> "$GITHUB_OUTPUT"

- name: Check for new upstream commits
id: check
run: |
BEHIND=$(git rev-list --count HEAD.."upstream/${{ env.UPSTREAM_BRANCH }}")
if [ "$BEHIND" -eq 0 ]; then
echo "status=up-to-date" >> "$GITHUB_OUTPUT"
echo "::notice::Already up to date with upstream."
else
echo "status=behind" >> "$GITHUB_OUTPUT"
echo "behind=$BEHIND" >> "$GITHUB_OUTPUT"
UPSTREAM_HEAD=$(git rev-parse "upstream/${{ env.UPSTREAM_BRANCH }}")
echo "upstream_head=${UPSTREAM_HEAD}" >> "$GITHUB_OUTPUT"
echo "::notice::$BEHIND commit(s) behind upstream."
fi

- name: Merge upstream (upstream wins on conflicts)
if: steps.check.outputs.status == 'behind'
id: merge
run: |
FORK_HEAD_BEFORE=$(git rev-parse HEAD)
echo "fork_head_before=${FORK_HEAD_BEFORE}" >> "$GITHUB_OUTPUT"

if git merge "upstream/${{ env.UPSTREAM_BRANCH }}" -X theirs --no-edit \
-m "Merge upstream/${{ env.UPSTREAM_BRANCH }} into ${{ env.FORK_BRANCH }} [skip ci]"; then
echo "result=merged" >> "$GITHUB_OUTPUT"
else
git merge --abort 2>/dev/null || true
echo "result=failed" >> "$GITHUB_OUTPUT"
echo "::error::Merge failed with tree/structural conflicts. Manual intervention required."
exit 1
fi

- name: Reapply fork overrides
if: steps.check.outputs.status == 'behind'
run: |
# Keep fork-owned workflow files to avoid workflow-permission push rejections.
git restore --source=HEAD^1 -- .github/workflows
python3 scripts/sync_readme.py
cp -f fork/claude-free claude-free
chmod +x claude-free
if [ -n "$(git status --porcelain)" ]; then
git add .github/workflows README.md claude-free
git commit -m "chore: reapply fork overrides after upstream sync [skip ci]"
fi

- name: Push changes
if: steps.check.outputs.status == 'behind' && inputs.dry_run != 'true'
run: |
if git push origin "${{ env.FORK_BRANCH }}"; then
echo "::notice::Push succeeded."
else
echo "::error::Push failed. This is usually permissions or non-fast-forward. Re-run after resolving branch state."
exit 1
fi

- name: Dry-run notice
if: steps.check.outputs.status == 'behind' && inputs.dry_run == 'true'
run: |
echo "::notice::Dry-run mode — skipped push. The following commits would be pushed:"
git log --oneline "origin/${{ env.FORK_BRANCH }}..HEAD"

- name: Summary
if: always()
run: |
{
echo "## Upstream Sync"
echo ""
if [ "${{ steps.check.outputs.status }}" = "up-to-date" ]; then
echo "Already up to date with upstream."
elif [ "${{ steps.merge.outputs.result }}" = "failed" ] || [ "${{ steps.force_push.outputs.detected }}" = "true" ]; then
echo "Sync **failed**. Manual intervention required."
echo ""
if [ "${{ steps.force_push.outputs.detected }}" = "true" ]; then
echo "**Reason:** Upstream force-push detected."
else
echo "**Reason:** Merge conflicts that could not be auto-resolved."
fi
else
echo "Merged **${{ steps.check.outputs.behind }}** upstream commit(s) via \`${{ steps.merge.outputs.result }}\` strategy."
echo ""
echo "Fork overrides reapplied after merge."
if [ "${{ inputs.dry_run }}" = "true" ]; then
echo ""
echo "> **Dry run** — changes were not pushed."
fi
echo ""
REPO="${{ github.repository }}"
BEFORE="${{ steps.merge.outputs.fork_head_before }}"
AFTER="$(git rev-parse HEAD)"
if [ -n "$BEFORE" ] && [ -n "$AFTER" ] && [ "$BEFORE" != "$AFTER" ]; then
echo "[View diff](https://github.com/${REPO}/compare/${BEFORE}...${AFTER})"
fi
fi
} >> "$GITHUB_STEP_SUMMARY"
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -41,7 +42,7 @@ jobs:
- name: Lint check
run: uv run ruff format --check

- name: Style check
- name: Format check
run: uv run ruff check

- name: Type check
Expand Down
43 changes: 0 additions & 43 deletions AGENTS.md

This file was deleted.

43 changes: 0 additions & 43 deletions CLAUDE.md

This file was deleted.

Loading