diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml
index c478fa9..36e9eda 100644
--- a/.github/workflows/Release.yml
+++ b/.github/workflows/Release.yml
@@ -1,124 +1,289 @@
-name: Release Build
+name: Release
on:
push:
tags:
- - 'v*.*.*' # 当推送版本标签时触发,如 v0.2.0
+ - 'v*'
+
+permissions:
+ contents: write
jobs:
- build:
- name: Build for ${{ matrix.os }}
+ # ===================================================
+ # Job 1: Linux 构建(Ubuntu/Debian .deb + 通用 tar.gz)
+ # ===================================================
+ build-linux:
+ name: Build Linux (${{ matrix.target }})
+ runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- - os: ubuntu-latest
- target: x86_64-unknown-linux-gnu
- artifact_name: starfetch-linux-x86_64
- binary_name: starfetch
- archive_format: tar.gz
- - os: windows-latest
- target: x86_64-pc-windows-msvc
- artifact_name: starfetch-windows-x86_64
- binary_name: starfetch.exe
- archive_format: zip
- - os: macos-latest
- target: x86_64-apple-darwin
- artifact_name: starfetch-macos-x86_64
- binary_name: starfetch
- archive_format: tar.gz
- - os: macos-latest
- target: aarch64-apple-darwin
- artifact_name: starfetch-macos-aarch64
- binary_name: starfetch
- archive_format: tar.gz
-
- runs-on: ${{ matrix.os }}
+ # Ubuntu/Debian .deb:amd64(x86_64)、arm64(aarch64)
+ - target: x86_64-unknown-linux-gnu
+ deb: true
+ use_cross: false
+ - target: aarch64-unknown-linux-gnu
+ deb: true
+ use_cross: true
+ # 通用 Linux(仅 tar.gz,如 Alpine)
+ - target: x86_64-unknown-linux-musl
+ deb: false
+ use_cross: true
steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Install Rust toolchain
- uses: dtolnay/rust-toolchain@stable
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- - name: Setup MSVC (Windows only)
- if: runner.os == 'Windows'
- uses: ilammy/msvc-dev-cmd@v1
+ - name: Install Tools
+ run: |
+ cargo install cargo-deb
+ if [[ "${{ matrix.use_cross }}" == "true" ]]; then
+ curl -L https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-musl.tar.gz | tar xz
+ sudo mv cross /usr/local/bin/
+ fi
+
+ - name: Build and Collect Assets
+ working-directory: StarFetch
+ run: |
+ set -e
+ cd "${GITHUB_WORKSPACE}/StarFetch"
+ mkdir -p dist
+ # 从父目录复制 LICENSE 和 README.md 用于 .deb 打包
+ cp ../LICENSE ../README.md .
+ echo "🔨 Building ${{ matrix.target }}..."
+ if [[ "${{ matrix.use_cross }}" == "true" ]]; then
+ cross build --release --target ${{ matrix.target }}
+ else
+ cargo build --release --target ${{ matrix.target }}
+ fi
+ if [[ "${{ matrix.deb }}" == "true" ]]; then
+ echo "📦 Packaging .deb..."
+ cargo deb --target ${{ matrix.target }} --no-build --no-strip
+ mv target/${{ matrix.target }}/debian/*.deb dist/
+ fi
+ name="starfetch-${{ matrix.target }}"
+ cd "target/${{ matrix.target }}/release"
+ tar -czvf "../../../dist/${name}.tar.gz" starfetch
+ cd ../../../dist
+ for file in *; do
+ sha256sum "$file" | awk '{print $1}' > "$file.sha256"
+ done
+
+ - uses: actions/upload-artifact@v4
with:
- arch: x64
- toolset: 14.29
+ name: artifacts-linux-${{ matrix.target }}
+ path: StarFetch/dist/*
- - name: Cache cargo dependencies
- uses: actions/cache@v4
+ # ===================================================
+ # Job 2: macOS 构建
+ # ===================================================
+ build-macos:
+ name: Build macOS
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- StarFetch/target/
- key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Build release binary
+ targets: x86_64-apple-darwin,aarch64-apple-darwin
+ - name: Build and Collect Assets
working-directory: StarFetch
- run: cargo build --release --target ${{ matrix.target }}
-
- - name: Create archive (Linux/macOS)
- if: runner.os != 'Windows'
- working-directory: StarFetch/target/${{ matrix.target }}/release
run: |
- tar czf ../../../${{ matrix.artifact_name }}.${{ matrix.archive_format }} ${{ matrix.binary_name }}
- shell: bash
+ cd "${GITHUB_WORKSPACE}/StarFetch"
+ mkdir -p dist
+ for target in x86_64-apple-darwin aarch64-apple-darwin; do
+ cargo build --release --target "$target"
+
+ filename="starfetch-$target.tar.gz"
+ tar -czvf "dist/$filename" -C "target/$target/release" starfetch
+
+ cd dist
+ shasum -a 256 "$filename" | awk '{print $1}' > "$filename.sha256"
+ cd ..
+ done
+ - uses: actions/upload-artifact@v4
+ with:
+ name: artifacts-macos
+ path: StarFetch/dist/*
- - name: Create archive (Windows)
- if: runner.os == 'Windows'
- working-directory: StarFetch/target/${{ matrix.target }}/release
- run: |
- Compress-Archive -Path ${{ matrix.binary_name }} -DestinationPath ../../../${{ matrix.artifact_name }}.${{ matrix.archive_format }}
+ # ===================================================
+ # Job 3: Windows 构建
+ # ===================================================
+ build-windows:
+ name: Build Windows
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: x86_64-pc-windows-msvc
+ - name: Build and Collect Assets
+ working-directory: StarFetch
shell: pwsh
+ run: |
+ Set-Location -Path (Join-Path $env:GITHUB_WORKSPACE "StarFetch")
+ New-Item -ItemType Directory -Force -Path dist | Out-Null
+ cargo build --release --target x86_64-pc-windows-msvc
+ $zipName = "starfetch-x86_64-pc-windows-msvc.zip"
+ $zipPath = "dist/$zipName"
+ Compress-Archive -Path "target/x86_64-pc-windows-msvc/release/starfetch.exe" -DestinationPath $zipPath -Force
+ (Get-FileHash -Path $zipPath -Algorithm SHA256).Hash.ToLower() | Out-File -FilePath "$zipPath.sha256" -NoNewline
- - name: Upload artifact
- uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@v4
with:
- name: ${{ matrix.artifact_name }}
- path: StarFetch/${{ matrix.artifact_name }}.${{ matrix.archive_format }}
+ name: artifacts-windows
+ path: StarFetch/dist/*
- release:
- name: Create Release
- needs: build
+ # ===================================================
+ # Job 4: 发布与分发
+ # ===================================================
+ publish:
+ name: Publish Release
+ needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
- permissions:
- contents: write
-
steps:
- - name: Download all artifacts
+ - uses: actions/checkout@v4
+
+ - name: Download All Artifacts
uses: actions/download-artifact@v4
with:
- path: ./artifacts
+ path: ./release-assets
+ merge-multiple: true
- - name: Extract tag name
- id: tag
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
+ - name: Get Version
+ id: get_ver
+ run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- - name: Create Release
+ # 1. GitHub Release(合并多 job 的 artifact 后统一展平到 release-assets/)
+ - name: Flatten Release Assets
+ run: |
+ for dir in release-assets/StarFetch/dist release-assets/dist; do
+ if [ -d "$dir" ]; then
+ cp -a "$dir"/. release-assets/ 2>/dev/null || true
+ rm -rf "$dir"
+ fi
+ done
+ for sub in release-assets/artifacts-*; do
+ [ -d "$sub" ] && cp -a "$sub"/. release-assets/ 2>/dev/null || true && rm -rf "$sub"
+ done
+ - name: Attach Release Assets
uses: softprops/action-gh-release@v1
with:
- name: Release ${{ steps.tag.outputs.TAG }}
- body: |
- ## Changes in ${{ steps.tag.outputs.TAG }}
-
- ### Downloads
+ files: release-assets/*
+ draft: false
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ # 2. Cloudsmith (APT) - 不可在 if 中使用 secrets,改为在 run 内判断
+ - name: Push to Cloudsmith
+ env:
+ CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
+ run: |
+ # 在脚本内部判断 Key 是否存在
+ if [ -z "$CLOUDSMITH_API_KEY" ]; then
+ echo "::warning::CLOUDSMITH_API_KEY is not set. Skipping Cloudsmith push."
+ exit 0
+ fi
+ # 兼容 release-assets 或 release-assets/dist
+ pip install --upgrade cloudsmith-cli
+ for f in release-assets/*.deb release-assets/dist/*.deb; do
+ [ -f "$f" ] && cloudsmith push deb starlakeai/starfetch/any-distro/any-version "$f" || true
+ done
+
+ # 3. Homebrew Tap - 不可在 if 中使用 secrets,改为在 run 内判断
+ - name: Update Homebrew
+ env:
+ GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
+ run: |
+ if [ -z "$GH_TOKEN" ]; then
+ echo "::warning::HOMEBREW_TAP_TOKEN is not set. Skipping Homebrew update."
+ exit 0
+ fi
+ # 兼容 release-assets 或 release-assets/dist(上一步已 flatten,此处用 release-assets/)
+ V=${{ steps.get_ver.outputs.version }}
+ ARM_SHA=$(cat release-assets/starfetch-aarch64-apple-darwin.tar.gz.sha256 2>/dev/null || cat release-assets/dist/starfetch-aarch64-apple-darwin.tar.gz.sha256)
+ X64_SHA=$(cat release-assets/starfetch-x86_64-apple-darwin.tar.gz.sha256 2>/dev/null || cat release-assets/dist/starfetch-x86_64-apple-darwin.tar.gz.sha256)
+
+ git clone https://x-access-token:$GH_TOKEN@github.com/Linus-Shyu/homebrew-tap.git /tmp/tap
+ cd /tmp/tap
+ mkdir -p Formula
+
+ cat > Formula/starfetch.rb << EOF
+ class Starfetch < Formula
+ desc "A fast and stylish system information fetch tool"
+ homepage "https://github.com/Linus-Shyu/StarFetch_Core"
+ version "$V"
+ license "MIT"
- - **Linux (x86_64)**: [starfetch-linux-x86_64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.TAG }}/starfetch-linux-x86_64.tar.gz)
- - **Windows (x86_64)**: [starfetch-windows-x86_64.zip](https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.TAG }}/starfetch-windows-x86_64.zip)
- - **macOS (Intel)**: [starfetch-macos-x86_64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.TAG }}/starfetch-macos-x86_64.tar.gz)
- - **macOS (Apple Silicon)**: [starfetch-macos-aarch64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ steps.tag.outputs.TAG }}/starfetch-macos-aarch64.tar.gz)
+ if Hardware::CPU.arm?
+ url "https://github.com/${{ github.repository }}/releases/download/v$V/starfetch-aarch64-apple-darwin.tar.gz"
+ sha256 "$ARM_SHA"
+ else
+ url "https://github.com/${{ github.repository }}/releases/download/v$V/starfetch-x86_64-apple-darwin.tar.gz"
+ sha256 "$X64_SHA"
+ end
+
+ def install
+ bin.install "starfetch"
+ end
+ end
+ EOF
- files: |
- artifacts/*/starfetch-*.tar.gz
- artifacts/*/starfetch-*.zip
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add . && git commit -m "starfetch v$V" && git push || true
+
+ # 4. Winget - 用仓库内 komac 生成的 manifest 模板(winget/manifests/.../0.2.3/)替换版本/URL/SHA/日期后提 PR
+ - name: Update Winget (manifest from repo)
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GH_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
+ run: |
+ if [ -z "$GH_TOKEN" ]; then
+ echo "::warning::HOMEBREW_TAP_TOKEN is not set. Skipping Winget PR."
+ exit 0
+ fi
+ V=${{ steps.get_ver.outputs.version }}
+ RELEASE_DATE=$(date +%Y-%m-%d)
+ URL="https://github.com/${{ github.repository }}/releases/download/v$V/starfetch-x86_64-pc-windows-msvc.zip"
+ SHA=$(cat release-assets/starfetch-x86_64-pc-windows-msvc.zip.sha256 2>/dev/null || true)
+ if [ -z "$SHA" ]; then
+ echo "::warning::Windows zip sha256 not found. Skipping Winget PR."
+ exit 0
+ fi
+ SHA_UPPER=$(echo "$SHA" | tr 'a-f' 'A-F')
+ TEMPLATE_DIR="winget/manifests/l/Linus-Shyu/StarFetch/0.2.3"
+ if [ ! -d "$TEMPLATE_DIR" ]; then
+ echo "::warning::Winget template $TEMPLATE_DIR not found. Skipping Winget PR."
+ exit 0
+ fi
+ git clone --depth 1 https://github.com/microsoft/winget-pkgs.git /tmp/winget-pkgs
+ cd /tmp/winget-pkgs
+ git remote add fork "https://x-access-token:${GH_TOKEN}@github.com/Linus-Shyu/winget-pkgs.git"
+ DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@') || DEFAULT_BRANCH="master"
+ BRANCH="starfetch-v$V"
+ git checkout -b "$BRANCH" "origin/$DEFAULT_BRANCH"
+ MANIFEST_DIR="manifests/l/Linus-Shyu/StarFetch/$V"
+ mkdir -p "$MANIFEST_DIR"
+ REPO_ROOT="${{ github.workspace }}"
+ sed -e "s/0\.2\.3/$V/g" \
+ -e "s|https://github.com/Linus-Shyu/StarFetch_Core/releases/download/v0.2.3/starfetch-x86_64-pc-windows-msvc.zip|$URL|g" \
+ -e "s/4D8E1F14F4877A7400E5CD6DBA5912B93B616DD905A5DC820C8157FC936926FA/$SHA_UPPER/g" \
+ -e "s/2026-02-02/$RELEASE_DATE/g" \
+ "$REPO_ROOT/$TEMPLATE_DIR/Linus-Shyu.StarFetch.installer.yaml" > "$MANIFEST_DIR/Linus-Shyu.StarFetch.installer.yaml"
+ sed -e "s/0\.2\.3/$V/g" \
+ -e "s|/v0.2.3|/v$V|g" \
+ "$REPO_ROOT/$TEMPLATE_DIR/Linus-Shyu.StarFetch.locale.en-US.yaml" > "$MANIFEST_DIR/Linus-Shyu.StarFetch.locale.en-US.yaml"
+ sed -e "s/0\.2\.3/$V/g" \
+ "$REPO_ROOT/$TEMPLATE_DIR/Linus-Shyu.StarFetch.yaml" > "$MANIFEST_DIR/Linus-Shyu.StarFetch.yaml"
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git add . && git diff --staged --quiet || git commit -m "Add Linus-Shyu.StarFetch $V"
+ git fetch fork "$BRANCH" 2>/dev/null || true
+ git push fork "$BRANCH" --force-with-lease || true
+ export GH_TOKEN
+ gh pr create --repo microsoft/winget-pkgs --head "Linus-Shyu:$BRANCH" --base "$DEFAULT_BRANCH" \
+ --title "Add Linus-Shyu.StarFetch $V" \
+ --body "Automated PR from [StarFetch_Core](https://github.com/${{ github.repository }}) release [v$V](https://github.com/${{ github.repository }}/releases/tag/v$V). Manifests generated from komac template (1.12.0)." \
+ || echo "::notice::PR may already exist or creation failed."
\ No newline at end of file
diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml
new file mode 100644
index 0000000..4103986
--- /dev/null
+++ b/.idea/dictionaries/project.xml
@@ -0,0 +1,7 @@
+
+
+
+ Shyu
+
+
+
\ No newline at end of file
diff --git a/README.cn.md b/README.cn.md
new file mode 100644
index 0000000..0c40153
--- /dev/null
+++ b/README.cn.md
@@ -0,0 +1,109 @@
+# StarFetch ⭐
+
+[](https://www.star-history.com/#Linus-Shyu/StarFetch_Core&type=date&legend=top-left)
+
+[](https://www.rust-lang.org/)
+[](https://rustacean.net/)
+[](LICENSE)
+
+
+English
+简体中文
+
+
+一个用Rust编写的美观且快速的系统信息工具,灵感来自neofetch。StarFetch使用优雅的ASCII艺术和智能的终端自适应来展示您的系统信息。
+
+## 💡 灵感与鼓励
+
+StarFetch 的诞生源于对命令行工具传承的深切尊重。我们非常荣幸能够收到**Dylan Araps**([neofetch](https://github.com/dylanaraps/neofetch)的作者)的这些鼓励之词:
+
+> "Starfetch很酷。看得出投入了很多心血。…祝你一切顺利,希望你能实现自己的目标。"
+> — **Dylan Araps**
+
+他的提醒"编写软件很有趣,但也可能非常耗费精力"以及"照顾好自己"是我们在这个项目中坚持的核心价值观。
+
+---
+
+## ✨ 功能特性
+
+- 🎨 **自适应ASCII艺术** - 根据终端宽度自动调整显示。
+- 🖥️ **全面的系统信息** - 主机名、操作系统、内核、运行时间、CPU、内存和软件包。
+- 🔗 **智能超链接** - 带有终端检测的可点击开发者链接。
+- 🌈 **美丽的颜色** - 支持ANSI颜色以获得优雅的终端输出。
+- ⚡ **闪电般快速** - 用Rust编写以获得最佳性能。
+- 🔧 **跨平台** - 适用于macOS、Linux和Windows。
+
+## 📸 截图
+
+```text
+ ╔════════════════════════════════╗
+ ║ ★ STARFETCH ★ ║
+ ╚════════════════════════════════╝
+
+Developed by Linus Shyu
+
+hostname
+--------
+OS: macOS
+Kernel: 25.2.0
+Uptime: 6 Days 14 Hours 32 Minutes
+Packages: 30 (brew)
+CPU Cores: 10
+CPU Brand: Apple M5
+CPU Frequency: 4608 MHz
+CPU Usage: 10.24%
+Total Memory: 16 GB
+Used Memory: 10.79 GB
+
+```
+
+## 🚀 安装
+
+### 环境
+
+- **Rust** (最新稳定版) - [安装Rust](https://www.rust-lang.org/tools/install)
+- **Cargo** (Rust附带)
+
+### 从源代码构建
+
+```bash
+git clone https://github.com/Linus-Shyu/StarFetch_Core.git
+cd StarFetch_Core/StarFetch
+cargo build --release
+
+```
+
+### 全局安装
+
+```bash
+cargo install --path .
+
+```
+
+## 📦 依赖
+
+- `ansi_term` - 终端颜色和样式。
+- `sysinfo` - 跨平台系统信息。
+- `systemstat` - 系统统计信息(运行时间等)。
+- `terminal_size` - 终端宽度检测。
+
+## 👥 作者
+
+- **Linus Shyu** ([@Linus-Shyu](https://github.com/Linus-Shyu))
+- **Dylan Su** ([@xs10l3](https://github.com/xs10l3))
+- **cloudsmithy** ([@cloudsmithy](https://github.com/cloudsmithy))
+- **Daicx** ([@daicx0904](https://github.com/daicx0904))
+
+## 🙏 致谢
+
+- **Dylan Araps** - 感谢原始灵感和友善的鼓励。
+- **Rust基金会** - 感谢商标合规性指导。我们使用**Ferris the Crab**(非官方但被官方认可的吉祥物)来代表我们对Rust社区的热爱。🦀
+- **开源社区** - 感谢那些使这个项目成为可能的优秀的开源库。
+
+## 📄 许可证
+
+本项目采用MIT许可证 - 详见[LICENSE](https://www.bing.com/search?q=LICENSE)文件。
+
+---
+
+⭐ 如果您觉得StarFetch有用,请考虑在GitHub上给它一个星标!
diff --git a/README.md b/README.md
index 304433e..a6b18a3 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,44 @@
-# StarFetch
+# StarFetch ⭐
-A beautiful system information tool written in Rust, inspired by neofetch. StarFetch displays your system information with an elegant ASCII art banner.
+[](https://www.star-history.com/#Linus-Shyu/StarFetch_Core&type=date&legend=top-left)
-## Features
+[](https://www.rust-lang.org/)
+[](https://rustacean.net/)
+[](LICENSE)
-- 🎨 **Adaptive ASCII Art**: Automatically selects between full and compact ASCII art based on terminal width
-- 🖥️ **System Information**: Displays hostname, OS, kernel version, and uptime
-- 🔗 **Clickable Links**: Developer name with clickable hyperlink support
-- 🌈 **Colorful Output**: Beautiful colored terminal output using ANSI colors
-- ⚡ **Fast & Lightweight**: Written in Rust for optimal performance
+
+简体中文
+English
+
-## Screenshot
+A beautiful and fast system information tool written in Rust, inspired by neofetch. StarFetch displays your system information with elegant ASCII art and smart terminal adaptation.
-```
-_____/\\\\\\\\\\\_______________________________________________/\\\\\\\\\\\\\\\_____________________________________________/\\\_________
- ___/\\\/////////\\\____________________________________________\/\\\///////////_____________________________________________\/\\\_________
- __\//\\\______\///______/\\\___________________________________\/\\\________________________________/\\\____________________\/\\\_________
- ___\////\\\__________/\\\\\\\\\\\__/\\\\\\\\\_____/\\/\\\\\\\__\/\\\\\\\\\\\_________/\\\\\\\\___/\\\\\\\\\\\_____/\\\\\\\\_\/\\\_________
- ______\////\\\______\////\\\////__\////////\\\___\/\\\/////\\\_\/\\\///////________/\\\/////\\\_\////\\\////____/\\\//////__\/\\\\\\\\\\__
- _________\////\\\______\/\\\________/\\\\\\\\\\__\/\\\___\///__\/\\\______________/\\\\\\\\\\\_____\/\\\_______/\\\_________\/\\\/////\\\_
- __/\\\______\//\\\_____\/\\\_/\\___/\\\/////\\\__\/\\\_________\/\\\_____________\//\\///////______\/\\\_/\\__\//\\\________\/\\\___\/\\\_
- _\///\\\\\\\\\\\/______\//\\\\\___\//\\\\\\\\/\\_\/\\\_________\/\\\______________\//\\\\\\\\\\____\//\\\\\____\///\\\\\\\\_\/\\\___\/\\\_
- ___\///////////_________\/////_____\////////\//__\///__________\///________________\//////////______\/////_______\////////__\///____\///__
+## 💡 Inspiration & Encouragement
+
+StarFetch was born from a deep respect for the legacy of command-line tools. We are incredibly honored to have received these words of encouragement from **Dylan Araps**, the creator of [neofetch](https://github.com/dylanaraps/neofetch):
+
+> "Starfetch looks cool. It looks like a lot of care has gone into it. ... I wish you all the best and I hope you succeed in your goals."
+> — **Dylan Araps**
+
+His reminder that "writing software is fun but can also be very draining" and to "look after yourselves" is a core value we carry forward in this project.
+
+---
+
+## ✨ Features
+
+- 🎨 **Adaptive ASCII Art** - Automatically adjusts display based on terminal width.
+- 🖥️ **Comprehensive System Info** - Hostname, OS, kernel, uptime, CPU, memory, and packages.
+- 🔗 **Smart Hyperlinks** - Clickable developer links with terminal detection.
+- 🌈 **Beautiful Colors** - ANSI color support for elegant terminal output.
+- ⚡ **Lightning Fast** - Written in Rust for optimal performance.
+- 🔧 **Cross-Platform** - Works on macOS, Linux, and Windows.
+
+## 📸 Screenshot
+
+```text
+ ╔════════════════════════════════╗
+ ║ ★ STARFETCH ★ ║
+ ╚════════════════════════════════╝
Developed by Linus Shyu
@@ -29,133 +46,108 @@ hostname
--------
OS: macOS
Kernel: 25.2.0
-Uptime: 2 Days 5 Hours 30 Minutes
+Uptime: 6 Days 14 Hours 32 Minutes
+Packages: 30 (brew)
+CPU Cores: 10
+CPU Brand: Apple M5
+CPU Frequency: 4608 MHz
+CPU Usage: 10.24%
+Total Memory: 16 GB
+Used Memory: 10.79 GB
+
```
-## Installation
+## 🚀 Installation
-### Prerequisites
+Install with your system package manager—as simple as neofetch.
-- Rust (latest stable version)
-- Cargo (comes with Rust)
+### APT (Ubuntu / Debian / Kali)
-### Build from Source
+On Linux, these two commands are all you need (x86_64 and ARM64):
-1. Clone the repository:
```bash
-git clone https://github.com/Linus-Shyu/StarFetch_Core.git
-cd StarFetch_Core/StarFetch
+curl -1sLf 'https://dl.cloudsmith.io/public/starlakeai/starfetch/setup.deb.sh' | sudo -E bash
+sudo apt-get install starfetch
```
-2. Build the project:
-```bash
-cargo build --release
-```
+### Homebrew (macOS)
-3. Run the executable:
```bash
-cargo run --release
+brew tap Linus-Shyu/tap
+brew install starfetch
```
-Or install it globally:
-```bash
-cargo install --path .
+### Winget (Windows)
+
+```powershell
+winget install Linus-Shyu.StarFetch
```
-## Usage
+---
-Simply run:
-```bash
-starfetch
-```
+### Other installation options
+
+**Universal install script (when no package manager is available):**
-Or if you built it locally:
```bash
-cargo run
+# Linux / macOS / BSD
+curl -fsSL https://raw.githubusercontent.com/Linus-Shyu/StarFetch_Core/master/install.sh | bash
```
-## Project Structure
-
-```
-StarFetch/
-├── src/
-│ ├── main.rs # Main entry point
-│ ├── art.rs # ASCII art generation and terminal width detection
-│ ├── system.rs # System information retrieval
-│ └── hyperlink.rs # Hyperlink and text styling utilities
-├── Cargo.toml # Project dependencies and metadata
-└── README.md # This file
+```powershell
+# Windows (PowerShell)
+irm https://raw.githubusercontent.com/Linus-Shyu/StarFetch_Core/master/install.ps1 | iex
```
-## Dependencies
-
-- `ansi_term` - Terminal colors and styling
-- `sysinfo` - System information retrieval
-- `systemstat` - System statistics (uptime, etc.)
-- `terminal_size` - Terminal width detection
-
-## Features in Detail
-
-### Adaptive ASCII Art
-
-StarFetch automatically detects your terminal width:
-- **Width ≥ 120 characters**: Displays full "STARFETCH" ASCII art
-- **Width < 120 characters**: Displays compact box art
-- **Unable to detect**: Falls back to full ASCII art
-
-### System Information
-
-Displays:
-- **Hostname**: Your system's hostname
-- **OS**: Operating system name
-- **Kernel**: Kernel version
-- **Uptime**: System uptime in days, hours, and minutes
-
-### Clickable Links
-
-The developer name is displayed as a clickable hyperlink (supported in modern terminals like iTerm2, Windows Terminal, etc.)
+### Prerequisites
-## Development
+- **Rust** (latest stable version) - [Install Rust](https://www.rust-lang.org/tools/install)
+- **Cargo** (comes with Rust)
-### Format Code
+### Build from Source
```bash
-cargo fmt
-```
-
-### Check for Issues
+git clone https://github.com/Linus-Shyu/StarFetch_Core.git
+cd StarFetch_Core/StarFetch
+cargo build --release
-```bash
-cargo check
```
-### Build
+### Install Globally
```bash
-cargo build
+cargo install --path .
+
```
-### Run Tests
+### Troubleshooting
-```bash
-cargo test
-```
+If you see warnings like `profile package spec 'zlib-rs' in profile 'dev' did not match any packages`, your **global Cargo config** (`~/.cargo/config.toml`) has profile overrides for packages such as `zlib-rs` or `adler2` that this repo does not use. Edit `~/.cargo/config.toml` and remove or comment out sections like `[profile.dev.package.zlib-rs]`, `[profile.release.package.adler2]`, and `[profile.release.package.zlib-rs]`. You can also ignore the warning—it does not affect the build.
+
+## 📦 Dependencies
-## Contributing
+- `ansi_term` - Terminal colors and styling.
+- `sysinfo` - Cross-platform system info.
+- `systemstat` - System statistics (uptime, etc.).
+- `terminal_size` - Terminal width detection.
-Contributions are welcome! Please feel free to submit a Pull Request.
+## 👥 Authors
-## License
+- **Linus Shyu** ([@Linus-Shyu](https://github.com/Linus-Shyu))
+- **Dylan Su** ([@xs10l3](https://github.com/xs10l3))
+- **cloudsmithy** ([@cloudsmithy](https://github.com/cloudsmithy))
+- **Daicx** ([@daicx0904](https://github.com/daicx0904))
-See [LICENSE](LICENSE) file for details.
+## 🙏 Acknowledgments
-## Author
+- **Dylan Araps** - For the original inspiration and kind words.
+- **Rust Foundation** - For guidance on trademark compliance. We use **Ferris the Crab** (the unofficial-official mascot) to represent our love for the Rust community. 🦀
+- **The Open Source Community** - For the amazing crates that make this project possible.
-**Linus Shyu**
+## 📄 License
-- GitHub: [@Linus-Shyu](https://github.com/Linus-Shyu)
+This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
-## Acknowledgments
+---
-- Inspired by [neofetch](https://github.com/dylanaraps/neofetch)
-- Built with ❤️ using Rust
+⭐ If you find StarFetch useful, please consider giving it a star on GitHub!
diff --git a/StarFetch/Cargo.lock b/StarFetch/Cargo.lock
index b222384..4a52a54 100644
--- a/StarFetch/Cargo.lock
+++ b/StarFetch/Cargo.lock
@@ -11,6 +11,56 @@ dependencies = [
"winapi",
]
+[[package]]
+name = "anstream"
+version = "0.6.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
+dependencies = [
+ "anstyle",
+ "anstyle-parse",
+ "anstyle-query",
+ "anstyle-wincon",
+ "colorchoice",
+ "is_terminal_polyfill",
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
+
+[[package]]
+name = "anstyle-parse"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
+dependencies = [
+ "utf8parse",
+]
+
+[[package]]
+name = "anstyle-query"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
+dependencies = [
+ "windows-sys 0.61.2",
+]
+
+[[package]]
+name = "anstyle-wincon"
+version = "3.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
+dependencies = [
+ "anstyle",
+ "once_cell_polyfill",
+ "windows-sys 0.61.2",
+]
+
[[package]]
name = "bitflags"
version = "2.10.0"
@@ -23,11 +73,57 @@ version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e93abca9e28e0a1b9877922aacb20576e05d4679ffa78c3d6dc22a26a216659"
+[[package]]
+name = "clap"
+version = "4.5.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
+dependencies = [
+ "clap_builder",
+ "clap_derive",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.5.54"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
+dependencies = [
+ "anstream",
+ "anstyle",
+ "clap_lex",
+ "strsim",
+]
+
+[[package]]
+name = "clap_derive"
+version = "4.5.49"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.7.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
+
+[[package]]
+name = "colorchoice"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
+
[[package]]
name = "deranged"
-version = "0.4.0"
+version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e"
+checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
dependencies = [
"powerfmt",
]
@@ -42,6 +138,18 @@ dependencies = [
"windows-sys 0.61.2",
]
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "is_terminal_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
+
[[package]]
name = "lazy_static"
version = "1.5.0"
@@ -93,9 +201,9 @@ dependencies = [
[[package]]
name = "num-conv"
-version = "0.1.0"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
[[package]]
name = "objc2-core-foundation"
@@ -116,6 +224,12 @@ dependencies = [
"objc2-core-foundation",
]
+[[package]]
+name = "once_cell_polyfill"
+version = "1.70.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
+
[[package]]
name = "powerfmt"
version = "0.2.0"
@@ -154,19 +268,19 @@ dependencies = [
]
[[package]]
-name = "serde"
-version = "1.0.219"
+name = "serde_core"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.219"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
@@ -175,14 +289,21 @@ dependencies = [
[[package]]
name = "starfetch"
-version = "0.1.0"
+version = "0.2.4"
dependencies = [
"ansi_term",
+ "clap",
"sysinfo",
"systemstat",
"terminal_size",
]
+[[package]]
+name = "strsim"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
+
[[package]]
name = "syn"
version = "2.0.104"
@@ -196,9 +317,9 @@ dependencies = [
[[package]]
name = "sysinfo"
-version = "0.37.2"
+version = "0.38.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f"
+checksum = "fe840c5b1afe259a5657392a4dbb74473a14c8db999c3ec2f4ae812e028a94da"
dependencies = [
"libc",
"memchr",
@@ -234,22 +355,22 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.41"
+version = "0.3.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40"
+checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
dependencies = [
"deranged",
"num-conv",
"powerfmt",
- "serde",
+ "serde_core",
"time-core",
]
[[package]]
name = "time-core"
-version = "0.1.4"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c"
+checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
[[package]]
name = "unicode-ident"
@@ -257,6 +378,12 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
+[[package]]
+name = "utf8parse"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
+
[[package]]
name = "winapi"
version = "0.3.9"
@@ -281,47 +408,46 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
-version = "0.61.3"
+version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections",
"windows-core",
"windows-future",
- "windows-link 0.1.3",
"windows-numerics",
]
[[package]]
name = "windows-collections"
-version = "0.2.0"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
"windows-core",
]
[[package]]
name = "windows-core"
-version = "0.61.2"
+version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement",
"windows-interface",
- "windows-link 0.1.3",
+ "windows-link",
"windows-result",
"windows-strings",
]
[[package]]
name = "windows-future"
-version = "0.2.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
"windows-core",
- "windows-link 0.1.3",
+ "windows-link",
"windows-threading",
]
@@ -347,12 +473,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "windows-link"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
-
[[package]]
name = "windows-link"
version = "0.2.1"
@@ -361,30 +481,30 @@ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-numerics"
-version = "0.2.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
"windows-core",
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
name = "windows-result"
-version = "0.3.4"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
dependencies = [
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
name = "windows-strings"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
@@ -402,7 +522,7 @@ version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
- "windows-link 0.2.1",
+ "windows-link",
]
[[package]]
@@ -411,7 +531,7 @@ version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
- "windows-link 0.2.1",
+ "windows-link",
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
@@ -424,11 +544,11 @@ dependencies = [
[[package]]
name = "windows-threading"
-version = "0.1.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
dependencies = [
- "windows-link 0.1.3",
+ "windows-link",
]
[[package]]
diff --git a/StarFetch/Cargo.toml b/StarFetch/Cargo.toml
index 6015cd0..a6c4c2f 100644
--- a/StarFetch/Cargo.toml
+++ b/StarFetch/Cargo.toml
@@ -1,10 +1,34 @@
[package]
name = "starfetch"
-version = "0.1.0"
+version = "0.2.4"
edition = "2021"
+description = "A fast and stylish system information fetch tool."
+authors = ["Linus Shyu <0x11@linusshyu.dev>", "cloudsmithy", "Daicx"]
+license = "MIT"
+readme = "README.md"
+repository = "https://github.com/Linus-Shyu/StarFetch_Core"
[dependencies]
ansi_term = "0.12"
-sysinfo = "0.37.2"
+sysinfo = "0.38.0"
systemstat = "0.2"
terminal_size = "0.4.3"
+clap = { version = "4.5", features = ["derive"] }
+
+# === Debian/Ubuntu 打包配置 ===
+[package.metadata.deb]
+maintainer = "Linus Shyu <0x11@linusshyu.dev>"
+section = "utils"
+priority = "optional"
+extended-description = """
+StarFetch is a high-performance system information tool written in Rust.
+Part of the Star Lake AI ecosystem, designed for speed and aesthetic.
+"""
+license-file = ["LICENSE", "4"] # 确保根目录有 LICENSE 文件
+
+assets = [
+ ["target/release/starfetch", "usr/bin/", "755"],
+ ["README.md", "usr/share/doc/starfetch/README", "644"],
+]
+
+depends = "$auto"
diff --git a/StarFetch/src/hyperlink.rs b/StarFetch/src/hyperlink.rs
index c96cd6a..5a41ee8 100644
--- a/StarFetch/src/hyperlink.rs
+++ b/StarFetch/src/hyperlink.rs
@@ -1,4 +1,4 @@
-// Cheak the Terminal type
+// Check the Terminal type
fn detect_terminal() -> TerminalType {
// Terminal variable
if let Ok(term_program) = std::env::var("TERM_PROGRAM") {
@@ -16,7 +16,7 @@ fn detect_terminal() -> TerminalType {
}
}
- // Cheak Terminal
+ // Check Terminal
if let Ok(term) = std::env::var("TERM") {
if term.contains("xterm") || term.contains("screen") {
return TerminalType::XTerm;
@@ -69,8 +69,19 @@ pub fn hyperlink(text: &str, url: &str) -> String {
}
}
-// Exchange data to string text ans rendering
+// Exchange data to string text and rendering
pub fn styled_developer_name() -> String {
"Linus Shyu".to_string()
}
+pub fn styled_developer_name_dylan() -> String {
+ "Dylan Su".to_string()
+}
+
+pub fn styled_developer_name_cloudsmithy() -> String {
+ "cloudsmithy".to_string()
+}
+
+pub fn styled_developer_name_daicx() -> String {
+ "Daicx".to_string()
+}
diff --git a/StarFetch/src/main.rs b/StarFetch/src/main.rs
index 128cadd..f9861cb 100644
--- a/StarFetch/src/main.rs
+++ b/StarFetch/src/main.rs
@@ -3,25 +3,141 @@ mod art;
mod hyperlink;
mod system;
+use clap::Parser;
+
+#[derive(Parser)]
+#[command(
+ disable_help_flag = true,
+ name = "starfetch",
+ about = "A Beauty & fast system information tool",
+ long_about = None,
+ version
+)]
+struct Args {
+ /// Show installed package count (brew, apt, winget, etc.)
+ #[arg(short, long, alias = "p")]
+ packages: bool,
+ /// Show cpu information
+ #[arg(short = 'c', long, alias = "c")]
+ cpu: bool,
+ /// Show time information
+ #[arg(short = 't', long, alias = "t")]
+ time: bool,
+ /// Hardware information
+ #[arg(short = 'k', long, alias = "k")]
+ hardware: bool,
+ /// memory information
+ #[arg(short = 'm', long, alias = "m")]
+ memory: bool,
+ /// swap information
+ #[arg(short = 's', long, alias = "s")]
+ swap: bool,
+ /// disk information
+ #[arg(short = 'd', long, alias = "d")]
+ disk: bool,
+ #[arg(short = 'h', long, alias = "h")]
+ help: bool,
+ #[arg(short = 'a', long, alias = "a")]
+ about: bool,
+}
+
fn main() {
- // Output the ascii painting
+ let args = Args::parse();
+
+ // -p / --packages: only show package count, then exit
+ if args.packages {
+ system::print_packages();
+ return;
+ }
+
+ // -c / --cpu: show the cpu information
+ if args.cpu {
+ system::print_cpu_info();
+ return;
+ }
+
+ // -t / --time: show time information
+ if args.time {
+ system::system_uptime();
+ return ;
+ }
+
+ // -k / --kernel: show system information
+ if args.hardware {
+ system::print_hardware_info();
+ return ;
+ }
+
+ // -m / --memory: show memory information
+ if args.memory {
+ system::print_memory_info();
+ return ;
+ }
+
+ // -s / --swap: show physical RAM information
+ if args.swap {
+ system::print_swap_info();
+ return ;
+ }
+
+ // -d / --disk:show disk information
+ if args.disk {
+ system::print_disk_info();
+ return ;
+ }
+
+ // -h / --help
+ if args.help {
+ system::print_system_help_info();
+ return ;
+
+ }
+ // -a / --about
+ if args.about {
+ system::print_about();
+ return ;
+ }
+
+
+ // Full interface
println!("{}", art::adaptive_art());
- // Output link & text
print!("Developed by ");
- println!(
+ print!(
"{}",
hyperlink::hyperlink(
&hyperlink::styled_developer_name(),
"https://github.com/Linus-Shyu"
)
);
+ print!(", ");
+ print!(
+ "{}",
+ hyperlink::hyperlink(
+ &hyperlink::styled_developer_name_dylan(),
+ "https://github.com/xs10l3"
+ )
+ );
+ print!(", ");
+ print!(
+ "{}",
+ hyperlink::hyperlink(
+ &hyperlink::styled_developer_name_cloudsmithy(),
+ "https://github.com/cloudsmithy"
+ )
+ );
+ print!(", and ");
+ print!(
+ "{}",
+ hyperlink::hyperlink(
+ &hyperlink::styled_developer_name_daicx(),
+ "https://github.com/daicx0904"
+ )
+ );
- // Opimization the UI
println!();
- // Output system information
- let _sys = system::init_system(); // Init the library
+ let _sys = system::init_system();
system::print_hardware_info();
system::system_uptime();
system::print_packages();
@@ -30,3 +146,4 @@ fn main() {
system::print_swap_info();
system::print_disk_info();
}
+
diff --git a/StarFetch/src/system.rs b/StarFetch/src/system.rs
index cac4bfd..992f271 100644
--- a/StarFetch/src/system.rs
+++ b/StarFetch/src/system.rs
@@ -11,13 +11,111 @@ pub fn init_system() -> SysInfoSystem {
sys
}
+// Helper function to calculate maximum width across all system info lines
+fn calculate_max_info_width() -> usize {
+ let mut max_len = 0;
+ let mut sys = SysInfoSystem::new_all();
+ sys.refresh_all();
+
+ // Hostname
+ let host_name = SysInfoSystem::host_name().unwrap_or_else(|| "Unknown".to_string());
+ max_len = max_len.max(host_name.len());
+
+ // OS line
+ if let Some(os_name) = SysInfoSystem::name() {
+ max_len = max_len.max(format!("OS: {}", os_name).len());
+ }
+
+ // Kernel line
+ if let Some(kernel) = SysInfoSystem::kernel_version() {
+ max_len = max_len.max(format!("Kernel: {}", kernel).len());
+ }
+
+ // Uptime line (max estimated)
+ max_len = max_len.max("Uptime: 999 Days 99 Hours 99 Minutes".len());
+
+ // Brew Packages (check actual)
+ if let Ok(output) = Command::new("brew").args(["list", "--formula"]).output() {
+ if output.status.success() {
+ let count = String::from_utf8_lossy(&output.stdout).lines().count();
+ if count > 0 {
+ max_len = max_len.max(format!("Packages: {} (brew)", count).len());
+ }
+ }
+ }
+
+ // APT Packages (check actual)
+ if let Ok(output) = Command::new("dpkg").args(["-l"]).output() {
+ if output.status.success() {
+ let count = String::from_utf8_lossy(&output.stdout)
+ .lines()
+ .filter(|line| line.starts_with("ii"))
+ .count();
+ if count > 0 {
+ max_len = max_len.max(format!("Packages: {} (apt)", count).len());
+ }
+ }
+ }
+
+ // Winget Packages
+ if let Ok(output) = Command::new("winget")
+ .args(["list", "--accept-source-agreements"])
+ .output()
+ {
+ if output.status.success() {
+ let full_output = String::from_utf8_lossy(&output.stdout);
+ let line_count = full_output.lines()
+ .filter(|l| !l.trim().is_empty())
+ .count();
+ if line_count > 2 {
+ let count = line_count - 2;
+ max_len = max_len.max(format!("Packages: {} (winget)", count).len());
+ }
+ }
+ }
+
+ // CPU lines
+ max_len = max_len.max(format!("CPU Cores: {}", sys.cpus().len()).len());
+
+ if let Some(cpu) = sys.cpus().first() {
+ max_len = max_len.max(format!("CPU Brand: {}", cpu.brand()).len());
+ max_len = max_len.max(format!("CPU Frequency: {} MHz", cpu.frequency()).len());
+ }
+
+ max_len = max_len.max("CPU Usage: 100.00%".len());
+
+ // Memory lines
+ let total_mem = sys.total_memory() as f64 / 1024.0 / 1024.0 / 1024.0;
+ max_len = max_len.max(format!("Total Memory: {:.2} GB", total_mem).len());
+
+ let used_mem = sys.used_memory() as f64 / 1024.0 / 1024.0 / 1024.0;
+ max_len = max_len.max(format!("Used Memory: {:.2} GB", used_mem).len());
+
+ // Swap lines
+ let total_swap = sys.total_swap() as f64 / 1024.0 / 1024.0 / 1024.0;
+ max_len = max_len.max(format!("Total Swap Memory: {:.2} GB", total_swap).len());
+
+ let used_swap = sys.used_swap() as f64 / 1024.0 / 1024.0 / 1024.0;
+ max_len = max_len.max(format!("Used Swap Memory: {:.2} GB", used_swap).len());
+
+ // Disk lines (estimate maximum)
+ max_len = max_len.max("Total Disk: 9999.99 GB".len());
+ max_len = max_len.max("Used Disk: 9999.99 GB".len());
+ max_len = max_len.max("Available Disk: 9999.99 GB".len());
+
+ max_len
+}
+
pub fn print_hardware_info() {
// Setting & Output host name
let host_name = SysInfoSystem::host_name().unwrap_or_else(|| "Unknown".to_string());
println!("{}", Cyan.paint(&host_name));
- // Setting & Output "-"
- let separator = "-".repeat(host_name.len());
+ // Calculate maximum width across ALL system info lines
+ let max_len = calculate_max_info_width();
+
+ // Output separator with calculated width
+ let separator = "-".repeat(max_len);
println!("{}", separator);
// Setting & Output OS name
@@ -31,34 +129,91 @@ pub fn print_hardware_info() {
}
}
-// System uptime
+// Format and print uptime from seconds (shared helper)
+fn print_uptime_seconds(secs: u64) {
+ let days = secs / 86400;
+ let hours = (secs % 86400) / 3600;
+ let minutes = (secs % 3600) / 60;
+ println!(
+ "{} {} {} {} {} {} {}",
+ Green.paint("Uptime:"),
+ Cyan.paint(days.to_string()),
+ Green.paint("Days"),
+ Cyan.paint(hours.to_string()),
+ Green.paint("Hours"),
+ Cyan.paint(minutes.to_string()),
+ Green.paint("Minutes")
+ );
+}
+
+// Max uptime to consider valid (~10 years) to reject boot_time/epoch bugs on some platforms
+const MAX_UPTIME_SECS: u64 = 10 * 365 * 24 * 3600;
+
+/// On macOS/BSD, try "sysctl -n kern.boottime" and parse secs for fallback.
+fn uptime_from_sysctl_kern_boottime() -> Option {
+ let output = Command::new("sysctl")
+ .args(["-n", "kern.boottime"])
+ .output()
+ .ok()?;
+ if !output.status.success() {
+ return None;
+ }
+ // e.g. "{ sec = 1234567890, usec = 123456 }"
+ let s = String::from_utf8_lossy(&output.stdout);
+ let s = s.trim();
+ let prefix = "sec = ";
+ let start = s.find(prefix).map(|i| i + prefix.len())?;
+ let rest = &s[start..];
+ let end = rest.find(|c: char| !c.is_ascii_digit()).unwrap_or(rest.len());
+ let secs_str = &rest[..end];
+ let boot_secs: u64 = secs_str.parse().ok()?;
+ let now = std::time::SystemTime::now()
+ .duration_since(std::time::UNIX_EPOCH)
+ .ok()?
+ .as_secs();
+ let uptime = now.saturating_sub(boot_secs);
+ if uptime <= MAX_UPTIME_SECS {
+ Some(uptime)
+ } else {
+ None
+ }
+}
+
+// System uptime: try systemstat first, then sysctl (macOS), then sysinfo, else N/A.
pub fn system_uptime() {
- // Init the sys
let sys = System::new();
+ let secs = match sys.uptime() {
+ Ok(duration) => {
+ let s = duration.as_secs();
+ if s <= MAX_UPTIME_SECS {
+ Some(s)
+ } else {
+ None
+ }
+ }
+ Err(_) => None,
+ };
- // Match the result of uptime retrieval
- match sys.uptime() {
- // Successful uptime retrieval
- Ok(uptime) => {
- // Calculate the time
- let days = uptime.as_secs() / 86400;
- let hours = (uptime.as_secs() % 86400) / 3600;
- let minutes = (uptime.as_secs() % 3600) / 60;
-
- // Output the Data
- println!(
- "{} {} {} {} {} {} {}",
- Green.paint("Uptime:"),
- Cyan.paint(days.to_string()),
- Green.paint("Days"),
- Cyan.paint(hours.to_string()),
- Green.paint("Hours"),
- Cyan.paint(minutes.to_string()),
- Green.paint("Minutes")
- );
+ let secs = secs.or_else(uptime_from_sysctl_kern_boottime).or_else(|| {
+ let now = std::time::SystemTime::now()
+ .duration_since(std::time::UNIX_EPOCH)
+ .map(|d| d.as_secs())
+ .unwrap_or(0);
+ let boot = SysInfoSystem::boot_time();
+ let mut s = now.saturating_sub(boot);
+ if s == 0 || s > MAX_UPTIME_SECS {
+ s = SysInfoSystem::uptime();
}
- // Error case for uptime retrieval
- Err(e) => eprintln!("Error getting uptime: {}", e),
+ if s > 0 && s <= MAX_UPTIME_SECS {
+ Some(s)
+ } else {
+ None
+ }
+ });
+
+ match secs {
+ Some(s) => print_uptime_seconds(s),
+ None => println!("{} {}", Green.paint("Uptime:"), Cyan.paint("N/A")),
}
}
@@ -68,7 +223,7 @@ pub fn print_packages() {
// macOS: Homebrew
if let Ok(output) = Command::new("brew")
- .args(&["list", "--formula"])
+ .args(["list", "--formula"])
.output()
{
if output.status.success() {
@@ -81,6 +236,71 @@ pub fn print_packages() {
}
}
+ // Linux: APT (try dpkg first)
+ let mut apt_found = false;
+ if let Ok(output) = Command::new("dpkg")
+ .args(["-l"])
+ .output()
+ {
+ if output.status.success() {
+ let count = String::from_utf8_lossy(&output.stdout)
+ .lines()
+ .filter(|line| line.starts_with("ii"))
+ .count();
+ if count > 0 {
+ package_managers.push(("apt", count));
+ apt_found = true;
+ }
+ }
+ }
+
+ // Fallback to apt list if dpkg fails
+ if !apt_found {
+ if let Ok(output) = Command::new("apt")
+ .args(["list", "--installed"])
+ .output()
+ {
+ if output.status.success() {
+ let count = String::from_utf8_lossy(&output.stdout)
+ .lines()
+ .filter(|line| line.contains("/")) // Filter out header lines
+ .count();
+ if count > 0 {
+ package_managers.push(("apt", count));
+ }
+ }
+ }
+ }
+
+ // Winget
+ if let Ok(output) = Command::new("winget").args(["list", "--accept-source-agreements"]).output() {
+ if output.status.success() {
+ let full_output = String::from_utf8_lossy(&output.stdout);
+
+ let line_count = full_output.lines().filter(|l| !l.trim().is_empty()).count();
+
+ if line_count > 2 {
+ package_managers.push(("winget", line_count - 2));
+ }
+ }
+ }
+
+ // Yum
+ if let Ok(output) = Command::new("yum")
+ .args(["list", "installed"])
+ .output()
+ {
+ if output.status.success() {
+ let count = String::from_utf8_lossy(&output.stdout)
+ .lines()
+ .filter(|line| !line.trim().is_empty() && !line.contains("Installed packages"))
+ .count();
+ if count > 0 {
+ package_managers.push(("yum", count));
+ }
+ }
+ }
+
// Output information about packages
if !package_managers.is_empty() {
let packages_str: Vec = package_managers
@@ -214,3 +434,29 @@ pub fn print_disk_info() {
Cyan.paint((available_space as f64 / 1_073_741_824.0).to_string())
);
}
+
+pub fn print_system_help_info() {
+ println!(
+ "{} {} {} {} {} {} {} {}",
+ Green.paint("All command for starfetch \n"),
+ Green.paint("-p / --packages: only show package count, then exit \n"),
+ Green.paint("-c / --cpu: show the cpu information \n"),
+ Green.paint("-t / --time: show time information \n"),
+ Green.paint("-k / --kernel: show system information \n"),
+ Green.paint("-m / --memory: show memory information \n"),
+ Green.paint("-s / --swap: show physical RAM information \n"),
+ Green.paint("-d / --disk: show disk information \n"),
+
+ );
+
+}
+
+pub fn print_about() {
+ println!(
+ "{} {} {} {}",
+ Green.paint("Github Address:https://github.com/Linus-Shyu/StarFetch_Core \n"),
+ Green.paint("Thanks Daicx add Chinese version README.md \n"),
+ Green.paint("Thanks cloudsmithy fix releases.yml \n"),
+ Green.paint("Thanks all users! \n"),
+ );
+}
diff --git a/install.ps1 b/install.ps1
new file mode 100644
index 0000000..0cc8d32
--- /dev/null
+++ b/install.ps1
@@ -0,0 +1,57 @@
+# StarFetch install script (Windows PowerShell)
+# Usage: irm https://raw.githubusercontent.com/Linus-Shyu/StarFetch_Core/master/install.ps1 | iex
+
+$ErrorActionPreference = "Stop"
+$Repo = "Linus-Shyu/StarFetch_Core"
+
+Write-Host "StarFetch installer" -ForegroundColor Cyan
+
+# Get latest release version
+$apiUrl = "https://api.github.com/repos/$Repo/releases/latest"
+try {
+ $release = Invoke-RestMethod -Uri $apiUrl -UseBasicParsing
+} catch {
+ Write-Error "Could not get latest release: $_"
+ exit 1
+}
+
+$version = $release.tag_name -replace "^v", ""
+$assetName = "starfetch-x86_64-pc-windows-msvc.zip"
+$asset = $release.assets | Where-Object { $_.name -eq $assetName }
+if (-not $asset) {
+ Write-Error "Asset $assetName not found in release $($release.tag_name)"
+ exit 1
+}
+
+$downloadUrl = $asset.browser_download_url
+$installDir = Join-Path $env:LOCALAPPDATA "starfetch"
+$binDir = Join-Path $installDir "bin"
+
+Write-Host "Installing starfetch v$version from $assetName"
+New-Item -ItemType Directory -Force -Path $binDir | Out-Null
+
+$zipPath = Join-Path $env:TEMP "starfetch-$version.zip"
+try {
+ Invoke-WebRequest -Uri $downloadUrl -OutFile $zipPath -UseBasicParsing
+ Expand-Archive -Path $zipPath -DestinationPath $binDir -Force
+} finally {
+ if (Test-Path $zipPath) { Remove-Item $zipPath -Force }
+}
+
+$exePath = Join-Path $binDir "starfetch.exe"
+if (-not (Test-Path $exePath)) {
+ Write-Error "starfetch.exe not found after extract"
+ exit 1
+}
+
+# Add to user PATH if not already present
+$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
+if ($userPath -notlike "*$binDir*") {
+ [Environment]::SetEnvironmentVariable("Path", "$userPath;$binDir", "User")
+ $env:Path = "$env:Path;$binDir"
+ Write-Host "Added $binDir to your user PATH."
+}
+
+Write-Host "Installed to $exePath" -ForegroundColor Green
+Write-Host "Run 'starfetch' in a new terminal, or: $exePath"
+& $exePath --version 2>$null
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..2e5498e
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,90 @@
+#!/usr/bin/env bash
+# StarFetch install script (Linux / macOS / BSD)
+# Usage: curl -fsSL https://raw.githubusercontent.com/Linus-Shyu/StarFetch_Core/master/install.sh | bash
+
+set -e
+
+REPO="Linus-Shyu/StarFetch_Core"
+INSTALL_DIR=""
+
+get_latest_version() {
+ if command -v jq &>/dev/null; then
+ curl -sL "https://api.github.com/repos/${REPO}/releases/latest" | jq -r '.tag_name'
+ else
+ curl -sL "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/'
+ fi
+}
+
+detect_asset() {
+ local os arch
+ os=$(uname -s)
+ arch=$(uname -m)
+ case "$os" in
+ Darwin)
+ case "$arch" in
+ x86_64) echo "starfetch-x86_64-apple-darwin.tar.gz" ;;
+ arm64|aarch64) echo "starfetch-aarch64-apple-darwin.tar.gz" ;;
+ *) echo "unsupported: $os $arch" ;;
+ esac
+ ;;
+ Linux|*BSD*|GNU*)
+ case "$arch" in
+ x86_64|amd64) echo "starfetch-x86_64-unknown-linux-gnu.tar.gz" ;;
+ aarch64|arm64) echo "starfetch-aarch64-unknown-linux-gnu.tar.gz" ;;
+ *) echo "unsupported: $os $arch" ;;
+ esac
+ ;;
+ *)
+ echo "unsupported: $os $arch"
+ ;;
+ esac
+}
+
+choose_install_dir() {
+ if [ -w /usr/local/bin ] 2>/dev/null; then
+ INSTALL_DIR="/usr/local/bin"
+ elif [ -w /usr/bin ] 2>/dev/null; then
+ INSTALL_DIR="/usr/bin"
+ else
+ INSTALL_DIR="${HOME}/.local/bin"
+ mkdir -p "$INSTALL_DIR"
+ if ! echo ":$PATH:" | grep -q ":$INSTALL_DIR:"; then
+ echo "Add to your shell profile (e.g. ~/.bashrc or ~/.zshrc):"
+ echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
+ fi
+ fi
+}
+
+main() {
+ echo "StarFetch installer"
+ VERSION=$(get_latest_version)
+ [ -z "$VERSION" ] && { echo "Could not get latest version"; exit 1; }
+ VERSION=${VERSION#v}
+ ASSET=$(detect_asset)
+ if [ -z "$ASSET" ] || [ "$ASSET" != "${ASSET#unsupported}" ]; then
+ echo "Unsupported platform: $(uname -s) $(uname -m)"
+ exit 1
+ fi
+ URL="https://github.com/${REPO}/releases/download/v${VERSION}/${ASSET}"
+ echo "Installing starfetch v${VERSION} from ${ASSET}"
+ choose_install_dir
+ TMP=$(mktemp -d)
+ trap "rm -rf $TMP" EXIT
+ if command -v curl &>/dev/null; then
+ curl -fsSL -o "$TMP/starfetch.tar.gz" "$URL"
+ else
+ wget -q -O "$TMP/starfetch.tar.gz" "$URL"
+ fi
+ tar -xzf "$TMP/starfetch.tar.gz" -C "$TMP"
+ if [ -w "$INSTALL_DIR" ]; then
+ mv "$TMP/starfetch" "$INSTALL_DIR/starfetch"
+ chmod +x "$INSTALL_DIR/starfetch"
+ else
+ sudo mv "$TMP/starfetch" "$INSTALL_DIR/starfetch"
+ sudo chmod +x "$INSTALL_DIR/starfetch"
+ fi
+ echo "Installed to $INSTALL_DIR/starfetch"
+ starfetch --version 2>/dev/null || true
+}
+
+main "$@"
diff --git a/winget/README.md b/winget/README.md
new file mode 100644
index 0000000..94ed628
--- /dev/null
+++ b/winget/README.md
@@ -0,0 +1,23 @@
+# WinGet Manifests
+
+Manifest 使用 1.10.0 规范(winget-pkgs 校验要求),已按目录结构存放:`manifests/l/Linus-Shyu/StarFetch//`。
+
+## 以后发新版本(不用再在命令行里逐项填)
+
+**方式一:用 komac update(推荐)**
+
+第一个版本在 winget-pkgs 合并后,以后只需:
+
+```bash
+komac update Linus-Shyu.StarFetch --version 0.2.4 --urls "https://github.com/Linus-Shyu/StarFetch_Core/releases/download/v0.2.4/starfetch-x86_64-pc-windows-msvc.zip" --submit
+```
+
+Komac 会以已有包为基础,只更新版本和 URL/SHA,不用再填一遍 metadata。
+
+**方式二:用仓库里的 Publish to WinGet 工作流**
+
+发新 Release 后,到 Actions → Publish to WinGet → Run workflow,填 release tag(如 `v0.2.4`),由 winget-releaser(Komac)自动提 PR。
+
+**方式三:复制本目录再改**
+
+复制 `0.2.3/` 为 `<新版本>/`,在三个 yaml 里把 `0.2.3`、InstallerUrl、InstallerSha256、ReleaseDate 等改成新版本,再用 `winget validate` 校验后提交到你的 winget-pkgs fork 并开 PR。
diff --git a/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.installer.yaml b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.installer.yaml
new file mode 100644
index 0000000..63faa7f
--- /dev/null
+++ b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.installer.yaml
@@ -0,0 +1,23 @@
+# Created with komac v2.15.0
+# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.10.0.schema.json
+
+PackageIdentifier: Linus-Shyu.StarFetch
+PackageVersion: 0.2.3
+InstallerType: zip
+NestedInstallerType: portable
+NestedInstallerFiles:
+- RelativeFilePath: starfetch.exe
+ PortableCommandAlias: starfetch
+InstallModes:
+- silent
+- silentWithProgress
+UpgradeBehavior: install
+Commands:
+- starfetch
+ReleaseDate: 2026-02-02
+Installers:
+- Architecture: x64
+ InstallerUrl: https://github.com/Linus-Shyu/StarFetch_Core/releases/download/v0.2.3/starfetch-x86_64-pc-windows-msvc.zip
+ InstallerSha256: 4D8E1F14F4877A7400E5CD6DBA5912B93B616DD905A5DC820C8157FC936926FA
+ManifestType: installer
+ManifestVersion: 1.10.0
diff --git a/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.locale.en-US.yaml b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.locale.en-US.yaml
new file mode 100644
index 0000000..fa8f703
--- /dev/null
+++ b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.locale.en-US.yaml
@@ -0,0 +1,22 @@
+# Created with komac v2.15.0
+# yaml-language-server: $schema=https://aka.ms/winget-manifest.defaultLocale.1.10.0.schema.json
+
+PackageIdentifier: Linus-Shyu.StarFetch
+PackageVersion: 0.2.3
+PackageLocale: en-US
+Publisher: Linus Shyu
+PublisherUrl: https://github.com/Linus-Shyu
+PublisherSupportUrl: https://linusshyu.dev/starfetch/
+Author: Linus Shyu
+PackageName: StarFetch
+PackageUrl: https://github.com/Linus-Shyu/StarFetch_Core
+License: MIT
+LicenseUrl: https://github.com/Linus-Shyu/StarFetch_Core/blob/HEAD/LICENSE
+Copyright: Linus Shyu 2026
+CopyrightUrl: https://linusshyu.dev/starfetch/
+ShortDescription: This is the Rust Version about NeoFetch.
+Tags:
+- neofetch
+ReleaseNotesUrl: https://github.com/Linus-Shyu/StarFetch_Core/releases/tag/v0.2.3
+ManifestType: defaultLocale
+ManifestVersion: 1.10.0
diff --git a/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.yaml b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.yaml
new file mode 100644
index 0000000..9d88331
--- /dev/null
+++ b/winget/manifests/l/Linus-Shyu/StarFetch/0.2.3/Linus-Shyu.StarFetch.yaml
@@ -0,0 +1,8 @@
+# Created with komac v2.15.0
+# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.10.0.schema.json
+
+PackageIdentifier: Linus-Shyu.StarFetch
+PackageVersion: 0.2.3
+DefaultLocale: en-US
+ManifestType: version
+ManifestVersion: 1.10.0